Bug 233944 - [CSS Cascade Layers] Unflake and fix web-platform-tests/css/css-cascade/layer-statement-before-import.html
Summary: [CSS Cascade Layers] Unflake and fix web-platform-tests/css/css-cascade/layer...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
URL:
Keywords: InRadar
Depends on:
Blocks: 220779
  Show dependency treegraph
 
Reported: 2021-12-07 11:49 PST by Antti Koivisto
Modified: 2021-12-13 08:52 PST (History)
11 users (show)

See Also:


Attachments
Patch (9.44 KB, patch)
2021-12-13 04:56 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2021-12-07 11:49:22 PST
Newly imported 

imported/w3c/web-platform-tests/css/css-cascade/layer-statement-before-import.html

is flaky.
Comment 1 Antti Koivisto 2021-12-13 04:56:40 PST
Created attachment 446987 [details]
Patch
Comment 2 Antti Koivisto 2021-12-13 04:57:08 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/32029
Comment 3 EWS Watchlist 2021-12-13 04:58:27 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 4 Tim Nguyen (:ntim) 2021-12-13 05:32:16 PST
Comment on attachment 446987 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446987&action=review

> LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-statement-before-import.html:170
> +      await new Promise(resolve => {
> +        styleElement.onload = resolve;
> +        styleElement.onerror = resolve;

Shouldn't we reject on error?

```
await new Promise((resolve, reject) => {
  styleElement.onload = resolve;
  styleElement.onerror = reject;
});
```

or alternatively:

```
await new Promise(resolve => {
  styleElement.onload = resolve;
  styleElement.onerror = t.unreached_func("Style element should load");
});
```
Comment 5 Antti Koivisto 2021-12-13 05:44:14 PST
doesn't really matter for this test?
Comment 6 Simon Fraser (smfr) 2021-12-13 08:27:06 PST
Comment on attachment 446987 [details]
Patch

r+ but address Tim's test issue if appropriate.
Comment 7 EWS 2021-12-13 08:51:17 PST
Committed r286949 (245174@main): <https://commits.webkit.org/245174@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446987 [details].
Comment 8 Radar WebKit Bug Importer 2021-12-13 08:52:22 PST
<rdar://problem/86414213>