WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 186045
webkit-test-runner: Add support for the reftest-wait class name
https://bugs.webkit.org/show_bug.cgi?id=186045
Summary
webkit-test-runner: Add support for the reftest-wait class name
Frédéric Wang (:fredw)
Reported
2018-05-28 23:34:16 PDT
From the WPT doc, reftest-wait is a mechanism similar to testRunner's waitUntilDone / notifyDone(): "Controlling When Comparison Occurs By default reftest screenshots are taken after the load event has fired, and web fonts (if any) are loaded. In some cases it is necessary to delay the screenshot later than this, for example because some DOM manipulation is required to set up the desired test conditions. To enable this, the test may have a class="reftest-wait" attribute specified on the root element. This will cause the screenshot to be delayed until the load event has fired and the reftest-wait class has been removed from the root element. Note that in neither case is exact timing of the screenshot guaranteed: it is only guaranteed to be after those events." The reftest-wait attributed is already used by the following tests imported into WebKit: ./FileAPI/url/url_xmlhttprequest_img.html ./css/css-grid/abspos/absolute-positioning-changing-containing-block-001.html ./css/css-grid/abspos/grid-item-absolute-positioning-dynamic-001.html ./css/css-grid/abspos/grid-positioned-item-dynamic-change-001.html ./css/css-ui/text-overflow-005.html ./css/css-ui/text-overflow-017.html ./css/css-ui/text-overflow-021.html ./css/mediaqueries/min-width-tables-001.html ./css/selectors/focus-within-001.html ./css/selectors/focus-within-002.html ./css/selectors/focus-within-003.html ./css/selectors/focus-within-004.html ./css/selectors/focus-within-005.html ./css/selectors/focus-within-006-expected.html ./css/selectors/focus-within-006.html ./css/selectors/focus-within-007.html ./css/selectors/focus-within-008.html ./css/selectors/focus-within-010.html ./css/selectors/focus-within-shadow-001.html ./css/selectors/focus-within-shadow-002.html ./css/selectors/focus-within-shadow-003.html ./css/selectors/focus-within-shadow-004.html ./css/selectors/focus-within-shadow-005.html ./css/selectors/focus-within-shadow-006.html ./css/selectors/selector-placeholder-shown-type-change-001.html ./css/selectors/selector-placeholder-shown-type-change-002.html ./css/selectors/selector-placeholder-shown-type-change-003.html ./css/selectors/selector-read-write-type-change-002.html ./css/selectors/selector-required-type-change-002.html ./mathml/relations/html5-tree/href-click-1.html ./mathml/relations/html5-tree/href-click-2.html Probably, most of them pass because the expected final rendering happens fast enough. However, this is a bit fragile and might lead to flacky tests. Attached is a patch that moves WPT's reftest_wait_0 test so that one can run it with Tools/Scripts/run-webkit-tests reftest_wait_0.html. As indicated in the test description, it is expected to fail since: - reftest_wait_0.html is a doc with a red background but after 2 seconds the background color is changed to green (The end of the test is controlled via the reftest-wait attribute). - reftest_wait_0-expected.html is a doc with a red background. However, because webkit-test-runner does not support reftest-wait, the screenshot of reftest_wait_0.html is actually taken before the background color is turned into green.
Attachments
Patch (move reftest_wait_0 to LayoutTests root)
(1.31 KB, patch)
2018-05-28 23:35 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch (proof of concept)
(2.14 KB, patch)
2018-05-30 05:02 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch (WIP)
(8.62 KB, patch)
2018-06-06 09:46 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(19.64 KB, patch)
2018-06-06 23:45 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-sierra
(627.42 KB, application/zip)
2018-06-07 00:11 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews104 for mac-sierra-wk2
(2.98 MB, application/zip)
2018-06-07 00:37 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews114 for mac-sierra
(369.65 KB, application/zip)
2018-06-07 00:38 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews201 for win-future
(269.10 KB, application/zip)
2018-06-07 01:08 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(9.82 MB, application/zip)
2018-06-07 01:28 PDT
,
EWS Watchlist
no flags
Details
Patch
(20.55 KB, patch)
2018-06-07 01:30 PDT
,
Frédéric Wang (:fredw)
ews-watchlist
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-sierra
(2.46 MB, application/zip)
2018-06-07 02:18 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews105 for mac-sierra-wk2
(2.92 MB, application/zip)
2018-06-07 02:21 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(2.59 MB, application/zip)
2018-06-07 02:54 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews200 for win-future
(12.84 MB, application/zip)
2018-06-07 03:09 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews114 for mac-sierra
(3.04 MB, application/zip)
2018-06-07 03:09 PDT
,
EWS Watchlist
no flags
Details
Patch
(20.85 KB, patch)
2018-06-07 06:34 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(22.57 KB, patch)
2018-06-07 07:25 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews206 for win-future
(12.73 MB, application/zip)
2018-06-07 11:22 PDT
,
EWS Watchlist
no flags
Details
Patch
(13.96 KB, patch)
2020-09-07 15:46 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(14.40 KB, patch)
2020-09-07 16:10 PDT
,
Darin Adler
koivisto
: review+
Details
Formatted Diff
Diff
Patch for landing
(20.93 KB, patch)
2020-09-09 13:34 PDT
,
Darin Adler
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing
(22.12 KB, patch)
2020-09-09 16:59 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Show Obsolete
(20)
View All
Add attachment
proposed patch, testcase, etc.
Frédéric Wang (:fredw)
Comment 1
2018-05-28 23:35:11 PDT
Created
attachment 341479
[details]
Patch (move reftest_wait_0 to LayoutTests root)
Frédéric Wang (:fredw)
Comment 2
2018-05-30 05:02:41 PDT
Created
attachment 341562
[details]
Patch (proof of concept) This patch shows how to emulate reftest-wait with some helper JS script that relies on testRunner's waitUntiDone/notifyDone. I wonder if we should make the test runner script inject such JS code or if class="reftest-wait" should be handled in any other way...
Frédéric Wang (:fredw)
Comment 3
2018-06-06 09:46:48 PDT
Created
attachment 342053
[details]
Patch (WIP)
Frédéric Wang (:fredw)
Comment 4
2018-06-06 23:45:33 PDT
Created
attachment 342129
[details]
Patch
EWS Watchlist
Comment 5
2018-06-07 00:11:31 PDT
Comment on
attachment 342129
[details]
Patch
Attachment 342129
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/8048035
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 6
2018-06-07 00:11:32 PDT
Created
attachment 342130
[details]
Archive of layout-test-results from ews103 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 7
2018-06-07 00:37:31 PDT
Comment on
attachment 342129
[details]
Patch
Attachment 342129
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/8048232
New failing tests: compositing/debug-borders-dynamic.html
EWS Watchlist
Comment 8
2018-06-07 00:37:32 PDT
Created
attachment 342134
[details]
Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 9
2018-06-07 00:38:42 PDT
Comment on
attachment 342129
[details]
Patch
Attachment 342129
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/8048159
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 10
2018-06-07 00:38:43 PDT
Created
attachment 342135
[details]
Archive of layout-test-results from ews114 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 11
2018-06-07 01:08:15 PDT
Comment on
attachment 342129
[details]
Patch
Attachment 342129
[details]
did not pass win-ews (win): Output:
http://webkit-queues.webkit.org/results/8049058
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 12
2018-06-07 01:08:17 PDT
Created
attachment 342137
[details]
Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
EWS Watchlist
Comment 13
2018-06-07 01:28:57 PDT
Comment on
attachment 342129
[details]
Patch
Attachment 342129
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/8048826
New failing tests: http/tests/webfont/font-loading-system-fallback-visibility.html http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html
EWS Watchlist
Comment 14
2018-06-07 01:28:59 PDT
Created
attachment 342140
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
Frédéric Wang (:fredw)
Comment 15
2018-06-07 01:30:28 PDT
Created
attachment 342141
[details]
Patch
EWS Watchlist
Comment 16
2018-06-07 02:18:01 PDT
Comment on
attachment 342141
[details]
Patch
Attachment 342141
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/8050515
New failing tests: testing/reftest-wait-long.html testing/reftest-wait-other-class-names.html
EWS Watchlist
Comment 17
2018-06-07 02:18:03 PDT
Created
attachment 342142
[details]
Archive of layout-test-results from ews101 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 18
2018-06-07 02:21:17 PDT
Comment on
attachment 342141
[details]
Patch
Attachment 342141
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/8050556
New failing tests: compositing/debug-borders-dynamic.html
EWS Watchlist
Comment 19
2018-06-07 02:21:19 PDT
Created
attachment 342143
[details]
Archive of layout-test-results from ews105 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 20
2018-06-07 02:54:16 PDT
Comment on
attachment 342141
[details]
Patch
Attachment 342141
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/8050675
New failing tests: http/tests/webfont/font-loading-system-fallback-visibility.html http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html
EWS Watchlist
Comment 21
2018-06-07 02:54:18 PDT
Created
attachment 342144
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
EWS Watchlist
Comment 22
2018-06-07 03:08:51 PDT
Comment on
attachment 342141
[details]
Patch
Attachment 342141
[details]
did not pass win-ews (win): Output:
http://webkit-queues.webkit.org/results/8051148
New failing tests: testing/reftest-wait-long.html testing/reftest-wait-other-class-names.html
EWS Watchlist
Comment 23
2018-06-07 03:09:02 PDT
Created
attachment 342145
[details]
Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
EWS Watchlist
Comment 24
2018-06-07 03:09:51 PDT
Comment on
attachment 342141
[details]
Patch
Attachment 342141
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/8050924
New failing tests: testing/reftest-wait-long.html testing/reftest-wait-other-class-names.html
EWS Watchlist
Comment 25
2018-06-07 03:09:52 PDT
Created
attachment 342146
[details]
Archive of layout-test-results from ews114 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
Frédéric Wang (:fredw)
Comment 26
2018-06-07 06:34:39 PDT
Created
attachment 342154
[details]
Patch
Frédéric Wang (:fredw)
Comment 27
2018-06-07 07:25:41 PDT
Created
attachment 342158
[details]
Patch
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 28
2018-06-07 07:55:18 PDT
Comment on
attachment 342158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342158&action=review
> Tools/Scripts/webkitpy/port/driver.py:510 > + command += "'--check-reftest-wait"
Something seems to be off about the quotes at the start here.
Frédéric Wang (:fredw)
Comment 29
2018-06-07 09:37:09 PDT
Comment on
attachment 342158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342158&action=review
>> Tools/Scripts/webkitpy/port/driver.py:510 >> + command += "'--check-reftest-wait" > > Something seems to be off about the quotes at the start here.
The single quote is just a separator between arguments, it does not need to be closed (see the rest of the _command_from_driver_input function for more context).
youenn fablet
Comment 30
2018-06-07 10:29:12 PDT
Do you know how Chrome is handling ref-test? If we have to handle various classes of documents, maybe it would be better to handle them in JS directly. Like updating testharnessreport.js to handle these classes, or maybe a script dedicated to handle these classes. This would require updating the tests to include that script (which would be specialized for each browser) so we would need to discuss this on WPT GitHub first.
Frédéric Wang (:fredw)
Comment 31
2018-06-07 10:45:01 PDT
(In reply to youenn fablet from
comment #30
)
> Do you know how Chrome is handling ref-test?
> No, I have not checked. I would need to investigate that...
> If we have to handle various classes of documents, maybe it would be better > to handle them in JS directly. > Like updating testharnessreport.js to handle these classes, or maybe a > script dedicated to handle these classes. > This would require updating the tests to include that script (which would be > specialized for each browser) so we would need to discuss this on WPT GitHub > first.
Yeah, I had initially tried testharnessreport.js, however reftests generally don't include such scripts. Injecting the script in the TestRunner is maybe not the best approach but I'm not sure it will be better to have the import script insert a script or to have to modify all the WPT reftests that use reftest-wait...
Frédéric Wang (:fredw)
Comment 32
2018-06-07 11:06:50 PDT
(In reply to Frédéric Wang (:fredw) from
comment #31
)
> (In reply to youenn fablet from
comment #30
) > > Do you know how Chrome is handling ref-test? > > > > No, I have not checked. I would need to investigate that...
Apparently, Chromium does a similar thing as my patch and injects a script to emulate reftest-wait support:
https://cs.chromium.org/chromium/src/content/shell/test_runner/test_runner.cc?rcl=383ea4e718310f7d214061c8081202cc2f2937c2&l=314
> > If we have to handle various classes of documents, maybe it would be better > > to handle them in JS directly.
Just to clarify, I think "reftest-wait" is the only document class with a special semantics in WPT tests.
EWS Watchlist
Comment 33
2018-06-07 11:22:38 PDT
Comment on
attachment 342158
[details]
Patch
Attachment 342158
[details]
did not pass win-ews (win): Output:
http://webkit-queues.webkit.org/results/8059600
New failing tests: http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html http/tests/preload/onload_event.html
EWS Watchlist
Comment 34
2018-06-07 11:22:49 PDT
Created
attachment 342193
[details]
Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 35
2018-06-08 03:00:27 PDT
We're definitely not requiring upstream that reftests must contain a script, so something along the lines of what's proposed here makes sense to me.
Frédéric Wang (:fredw)
Comment 36
2018-06-11 00:55:00 PDT
Comment on
attachment 342158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342158&action=review
> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:426 > + "})();";
I think Chromium's injected script has a few improvements over the one I proposed in
attachment 342158
[details]
, so I think we can take it:
https://cs.chromium.org/chromium/src/content/shell/test_runner/test_runner.cc?rcl=383ea4e718310f7d214061c8081202cc2f2937c2&l=314
In particular, Chromium and upstream WPT also wait for web fonts to be loaded (Chromium does not do it when reftest-wait is absent, see
https://bugs.chromium.org/p/chromium/issues/detail?id=848804
) so "checkReftestWait" is maybe not a good name. Note that document.font.ready is buggy in WebKit see
bug 174030
and
https://github.com/web-platform-tests/wpt/pull/10025
Frédéric Wang (:fredw)
Comment 37
2018-06-27 01:47:26 PDT
Comment on
attachment 342158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342158&action=review
> LayoutTests/ChangeLog:11 > + * http/wpt/reftest-wait/reftest-wait-events-expected.html: Added.
I noticed that WPT actually has tests for reftest-wait support, so probably we should import infrastructure/.
Ryosuke Niwa
Comment 38
2018-06-27 15:52:56 PDT
Ugh... this is so ugly. Why can't WPT define a specific JS function helper for browsers to hook in instead of relying on having some browser specific detection of the class name?
Ryosuke Niwa
Comment 39
2018-06-27 15:54:46 PDT
(In reply to Ms2ger from
comment #35
)
> We're definitely not requiring upstream that reftests must contain a script, > so something along the lines of what's proposed here makes sense to me.
Why not? If the way the tests identify the time to record the actual result is removing the class name from the document element, why can't that code simply invoke a function instead? Given the amount of boilerplate WPT requires elsewhere, that seems to have a low cost. I'm not at all excited to hard-code this insane ad-hoc convention WPT has into WTR or DRT.
Ryosuke Niwa
Comment 40
2018-06-27 16:12:24 PDT
Comment on
attachment 342158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342158&action=review
>>> Tools/Scripts/webkitpy/port/driver.py:510 >>> + command += "'--check-reftest-wait" >> >> Something seems to be off about the quotes at the start here. > > The single quote is just a separator between arguments, it does not need to be closed (see the rest of the _command_from_driver_input function for more context).
Why do we need to have a runtime option for this? Why can't we always check for this condition.
> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:404 > +static const char* checkReftestWaitScript =
I don't think it makes sense to implement a logic like this in JS if we're modifying WTR since we already have a code to wait for sub-resources to load. If we're going with the injected script route, we're much better off adding a generic mechanism to inject arbitrary JS into the test. I really don't want WPT specific logic creeping into WTR or DRT. r- because of this.
Frédéric Wang (:fredw)
Comment 41
2018-06-28 01:29:00 PDT
Comment on
attachment 342158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=342158&action=review
>>>> Tools/Scripts/webkitpy/port/driver.py:510 >>>> + command += "'--check-reftest-wait" >>> >>> Something seems to be off about the quotes at the start here. >> >> The single quote is just a separator between arguments, it does not need to be closed (see the rest of the _command_from_driver_input function for more context). > > Why do we need to have a runtime option for this? Why can't we always check for this condition.
Not sure I understand your question, but this --check-reftest-wait command is passed to the WTR and DRT binaries. I'm not sure they know whether we are executing a reftest or whether a test is a WPT, unless you suggest to copy the logic into WTR and DRT too.
>> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:404 >> +static const char* checkReftestWaitScript = > > I don't think it makes sense to implement a logic like this in JS if we're modifying WTR > since we already have a code to wait for sub-resources to load. > If we're going with the injected script route, we're much better off adding a generic mechanism to inject arbitrary JS into the test. > I really don't want WPT specific logic creeping into WTR or DRT. r- because of this.
I also didn't like this approach, it was mostly a first attempt to open discussion however I was surprised that Chromium people actually did the same thing and supported this approach in a mail exchanges Youenn and I had with them. One argument in favor of this is that the sync logic is nontrivial, apparently one needs to properly check that web fonts are ready before taking the screenshot. This is needed even for tests without reftest-wait class, so that is one more argument in favor of a generic injection mechanism (another argument is that the same code would probably need to be injected in DRT too).
Frédéric Wang (:fredw)
Comment 42
2018-06-28 01:49:09 PDT
(In reply to Ryosuke Niwa from
comment #38
)
> Ugh... this is so ugly. Why can't WPT define a specific JS function helper > for browsers to hook in instead of relying on having some browser specific > detection of the class name?
(In reply to Ryosuke Niwa from
comment #39
)
> (In reply to Ms2ger from
comment #35
) > > We're definitely not requiring upstream that reftests must contain a script, > > so something along the lines of what's proposed here makes sense to me. > > Why not? If the way the tests identify the time to record the actual result > is removing the class name from the document element, why can't that code > simply invoke a function instead? Given the amount of boilerplate WPT > requires elsewhere, that seems to have a low cost.
Regarding this reftest-wait class, I see tree options: 1) Implement support in WebKit 2) Implement a conversion mechanism in the script importer/exporter (reftest-wait <-> wait/done) 3) Convince upstream WPT to implement a new wait/done mechanism (and update tests) (2) seems a bit fragile. We already have import/export issue with reftests, so I don't really want to make that worse. reftest-wait is already a well-established convention inherited from initial 2007 implementation in Mozilla and is used everywhere in upstream WPT, so I doubt (3) will be easy, but we can try. (1) is what I tried here and that's what Chromium people decided too and they seem to be happy with that. We've already discussed this by private emails with Youenn and some Google/WPT people. Maybe we should open a public discussion with the rest of the browser vendors and WPT authors...
Carlos Alberto Lopez Perez
Comment 43
2019-10-10 06:52:42 PDT
I have been hit by this on
bug 202783
. This is affecting a lot of tests already, many of them incorrectly marked. $ grep -rl reftest-wait LayoutTests/|grep html$|wc -l 118
Antti Koivisto
Comment 44
2019-11-22 03:30:13 PST
Would be nice to get this landed. I'm running into reftest-wait tests I'd like to enable.
Simon Fraser (smfr)
Comment 45
2020-01-05 09:53:31 PST
Ditto. I'd like imported/w3c/web-platform-tests/css/css-display/display-none-inline-img.html to work.
Frédéric Wang (:fredw)
Comment 46
2020-02-04 07:00:28 PST
@Simon @Antti @Carlos Just for the record, I'm not working on this as we didn't have an agreement on the way to proceed. I think we should restart discussion on blink-dev. The status is basically what I said in
comment 42
.
Frédéric Wang (:fredw)
Comment 47
2020-02-04 07:04:09 PST
(In reply to Frédéric Wang (:fredw) from
comment #46
)
> discussion on blink-dev.
webkit-dev sorry -- multi-browser work :-)
Radar WebKit Bug Importer
Comment 48
2020-02-18 11:24:41 PST
<
rdar://problem/59558132
>
Hector Lopez
Comment 49
2020-08-24 10:02:45 PDT
imported/w3c/web-platform-tests/css/css-display/display-none-inline-img.html Test expectation changed to ImageOnlyFailure Test expectation changed:
https://trac.webkit.org/changeset/266065/webkit
Darin Adler
Comment 50
2020-09-04 15:27:26 PDT
This test is marked as failing with this bug number: imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html But it’s passing for me. What’s the actual situation?
Alexey Proskuryakov
Comment 51
2020-09-04 16:42:07 PDT
Looks like it's failing pretty consistently on macOS, and flaky on iOS:
https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Fcss-animations%2Fanimation-delay-010.html
Darin Adler
Comment 52
2020-09-04 16:59:22 PDT
Passed for me on Big Sur.
Sam Sneddon [:gsnedders]
Comment 53
2020-09-07 09:47:49 PDT
(In reply to Darin Adler from
comment #50
)
> This test is marked as failing with this bug number: > > imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html > > But it’s passing for me. What’s the actual situation?
On the whole we should expect anything affected by this to be flaky.
Darin Adler
Comment 54
2020-09-07 09:50:35 PDT
If true, then there should be a flakiness expectation rather than a failure expectation.
Darin Adler
Comment 55
2020-09-07 12:22:45 PDT
Planning to work on this today.
Darin Adler
Comment 56
2020-09-07 15:46:50 PDT
Comment hidden (obsolete)
Created
attachment 408200
[details]
Patch
Darin Adler
Comment 57
2020-09-07 16:10:32 PDT
Created
attachment 408201
[details]
Patch
Antti Koivisto
Comment 58
2020-09-08 01:06:24 PDT
Comment on
attachment 408201
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=408201&action=review
> Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1995 > - if (injectedBundle.pageCount()) > - injectedBundle.page()->dump(); > - else > + if (!injectedBundle.pageCount()) { > injectedBundle.done(); > + return; > + } > + > + pollForRefTestWaitAttributeRemoval();
This reads poorly. Dumping is the important thing, reftest-wait is a minor feature required by a few tests. Maybe call it 'dumpRespectingRefTestWait' or similar? (same for the other runners)
> LayoutTests/ChangeLog:9 > + * TestExpectations: Expect a pass on the test that directly tests this feature. > + There are multiple other tests that should now be passing.
What's the plan for enabling them?
Alexey Proskuryakov
Comment 59
2020-09-08 09:31:26 PDT
> What's the plan for enabling them?
Someone needs to find potentially affected tests by grepping for reftest-wait, and to check result history a day or two after this lands. Perhaps bot watchers could?
Darin Adler
Comment 60
2020-09-08 09:56:22 PDT
Comment on
attachment 408201
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=408201&action=review
Currently have a power outage at my house so I can’t do a new version of the patch yet. Will figure out how this is affecting the tests that are failing on the bots and upload a new version that fixes the tests (more likely) or the machinery (less likely).
>> Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1995 >> + pollForRefTestWaitAttributeRemoval(); > > This reads poorly. Dumping is the important thing, reftest-wait is a minor feature required by a few tests. > > Maybe call it 'dumpRespectingRefTestWait' or similar? (same for the other runners)
I’ll rename. The tricky thing about this naming is that the function is both the thing you call to start polling, and the function used by the polling cycle. So one name ends up serving for both. I emphasized the "poll" half because it’s what explains the strange arguments and function type signature.
>> LayoutTests/ChangeLog:9 >> + There are multiple other tests that should now be passing. > > What's the plan for enabling them?
I think Alexey’s plan makes sense. It’s easy to grep for the affected tests.
Antti Koivisto
Comment 61
2020-09-08 10:47:45 PDT
> The tricky thing about this naming is that the function is both the thing > you call to start polling, and the function used by the polling cycle. So > one name ends up serving for both. I emphasized the "poll" half because it’s > what explains the strange arguments and function type signature.
One option is to keep the common case dump() in here and call pollForRefTestWaitAttributeRemoval() only when the attribute is present. Slightly more complicated than needed but also very readable.
Darin Adler
Comment 62
2020-09-08 10:59:28 PDT
(In reply to Antti Koivisto from
comment #61
)
> > The tricky thing about this naming is that the function is both the thing > > you call to start polling, and the function used by the polling cycle. So > > one name ends up serving for both. I emphasized the "poll" half because it’s > > what explains the strange arguments and function type signature. > > One option is to keep the common case dump() in here and call > pollForRefTestWaitAttributeRemoval() only when the attribute is present. > Slightly more complicated than needed but also very readable.
With threads it would be: waitUntilRefTestWaitIsRemoved(); dump(); I’d like to write code like that. Maybe: afterRefTestWaitIsRemoved([] { dump(); });
Darin Adler
Comment 63
2020-09-08 20:24:54 PDT
Renamed it to dumpAfterWaitAttributeIsRemoved.
Darin Adler
Comment 64
2020-09-09 13:34:32 PDT
Comment hidden (obsolete)
Created
attachment 408361
[details]
Patch for landing
Darin Adler
Comment 65
2020-09-09 16:59:13 PDT
Created
attachment 408385
[details]
Patch for landing
EWS
Comment 66
2020-09-10 04:29:27 PDT
Committed
r266817
: <
https://trac.webkit.org/changeset/266817
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 408385
[details]
.
Truitt Savell
Comment 67
2020-09-10 08:57:48 PDT
It looks like the changes in
https://trac.webkit.org/changeset/266817/webkit
have broken 5 tests for all Mac: imported/w3c/web-platform-tests/css/css-ui/text-overflow-017.html [ Timeout ] imported/w3c/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html [ Timeout ] imported/w3c/web-platform-tests/html/rendering/replaced-elements/embedded-content/cross-domain-iframe.sub.html [ Timeout ] imported/w3c/web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html [ Timeout ] imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/reset-algorithm-rendering.html [ Timeout ] and 1 test for Mac wk1: imported/w3c/web-platform-tests/css/css-position/fixed-z-index-blend.html [ ImageOnlyFailure ] Diff:
https://build.webkit.org/results/Apple-Catalina-Release-WK1-Tests/r266817%20(8910)/imported/w3c/web-platform-tests/css/css-position/fixed-z-index-blend-diffs.html
History:
https://results.webkit.org/?suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Fcss-position%2Ffixed-z-index-blend.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Fcss-ui%2Ftext-overflow-017.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Fcss-values%2Fvh_not_refreshing_on_chrome.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Frendering%2Freplaced-elements%2Fembedded-content%2Fcross-domain-iframe.sub.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fforms%2Fthe-option-element%2Fdynamic-content-change-rendering.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fforms%2Fthe-select-element%2Freset-algorithm-rendering.html
The timeouts appear to have been constantly failing tests before this change.
Alexey Proskuryakov
Comment 68
2020-09-10 09:53:22 PDT
This is likely OK, and needs expectations update (skipping for timeouts). I looked at text-overflow-017.html, and it appears to be a bad test that requires a manual click - unless there is some other magical machinery that clicks elements automagically. EWS has the design choice that it doesn't run tests with failure expectations at all, so it cannot catch it when something changes from failure to timeout or to crash.
Sam Sneddon [:gsnedders]
Comment 69
2020-09-10 10:14:20 PDT
(In reply to Alexey Proskuryakov from
comment #68
)
> This is likely OK, and needs expectations update (skipping for timeouts). I > looked at text-overflow-017.html, and it appears to be a bad test that > requires a manual click - unless there is some other magical machinery that > clicks elements automagically. > > EWS has the design choice that it doesn't run tests with failure > expectations at all, so it cannot catch it when something changes from > failure to timeout or to crash.
I too only looked at text-overflow-017.html, but I'll note it has a <meta name=flags content=interact> (see
https://web-platform-tests.org/writing-tests/css-metadata.html?highlight=interact
) so ideally we'd be treating it as a manual test. We (read: me) should really look into
https://github.com/web-platform-tests/wpt/issues/5381
again now; commented there that we should probably do something soon which means we can then more easily filter out tests that WPT considers manual.
Truitt Savell
Comment 70
2020-09-10 10:17:15 PDT
Skipped the 5 Timeouts in
https://trac.webkit.org/changeset/266831/webkit
Alexey Proskuryakov
Comment 71
2020-09-11 12:41:43 PDT
I looked at another test that turned into a timeout, and it's interesting. imported/w3c/web-platform-tests/html/semantics/forms/the-option-element/dynamic-content-change-rendering.html It completes after a TestRendered event fires, but there is nothing in the test that does that. It's fired by web-platform-tests/tools/wptrunner/wptrunner/executors/test-wait.js. Which I guess means that for a complete reftest-wait implementation, we need that in DRT/WKTR?
Alexey Proskuryakov
Comment 72
2020-09-11 12:45:37 PDT
Okay, why not look at all of them. Most tests that had to be skipped use TestRendered. One appears to fail because we don't/cannot implement multiple test domains the way WPT wants to, and one appears to be just a failure.
Darin Adler
Comment 73
2020-09-11 15:26:18 PDT
TestRendered event? Well it’s easy to fire an event; happy to add the code for that. Where is that documented?
Simon Fraser (smfr)
Comment 74
2020-09-11 15:33:42 PDT
https://web-platform-tests.org/writing-tests/reftests.html
Darin Adler
Comment 75
2020-09-11 18:10:03 PDT
(In reply to Alexey Proskuryakov from
comment #72
)
> Most tests that had to be skipped use TestRendered. One appears to fail > because we don't/cannot implement multiple test domains the way WPT wants > to, and one appears to be just a failure.
I only see 3 tests in the tree that are using TestRendered. Are there more than 3?
Alexey Proskuryakov
Comment 76
2020-09-11 20:29:52 PDT
I think that's it as far as ones that we imported go. I think that all three are in the list that needed to be skipped (either macOS, or iOS, or both).
Frédéric Wang (:fredw)
Comment 77
2020-09-14 05:33:28 PDT
(In reply to Simon Fraser (smfr) from
comment #74
)
>
https://web-platform-tests.org/writing-tests/reftests.html
Apparently crashtests have a similar attribute but it's called test-wait:
https://web-platform-tests.org/writing-tests/crashtest.html
Darin Adler
Comment 78
2020-09-14 11:03:54 PDT
While I am. irritated to hear that, sounds like a "too many cooks" situation, it’s trivial to make the tools check for both. I don’t want a mess of modes and options, so I’d prefer to just implement both unconditionally unless there is an obvious reason we can’t. For the same reason, I made the code always send the TestRendered event, not conditionally. Are we running crash tests in LayoutTests right now? Is there one that is crashing or flaky because of the lack of "test-wait"? Could someone file a new bug with the details; it is so easy to fix this. (Sadly need to rename source files that I named ReftestFunctions.h/cpp.)
Frédéric Wang (:fredw)
Comment 79
2020-09-14 11:22:17 PDT
(In reply to Darin Adler from
comment #78
)
> While I am. irritated to hear that, sounds like a "too many cooks" > situation, it’s trivial to make the tools check for both. > > I don’t want a mess of modes and options, so I’d prefer to just implement > both unconditionally unless there is an obvious reason we can’t. For the > same reason, I made the code always send the TestRendered event, not > conditionally. > > Are we running crash tests in LayoutTests right now? Is there one that is > crashing or flaky because of the lack of "test-wait"? Could someone file a > new bug with the details; it is so easy to fix this. (Sadly need to rename > source files that I named ReftestFunctions.h/cpp.)
AFAIK, it's a new feature. I just learned about it because I was writing my first WPT crashtest today in Chromium... Maybe someone who is more up-to-date about WPT development can give more explanation (Sam, Youenn?). Also cc'in Emilio who presented this at the last year web engines hackfest. I don't know if we import/run crashtests in WebKit, but my understanding is that ignoring class="test-wait" would just make the crashtest exit early and so we could potential miss crashes.
Alexey Proskuryakov
Comment 80
2020-09-14 13:36:26 PDT
We don't have support for tests crashing without causing bad effects (instability due to system load; trouble collecting crash logs).
Hector Lopez
Comment 81
2020-09-14 17:58:25 PDT
imported/w3c/web-platform-tests/css/css-ui/text-overflow-017.html imported/w3c/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html Test were noted on this bug as a constant timeouts. Test expectations to skip were made to Mac but also a constant timeout on iOS. History:
https://results.webkit.org/?suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fforms%2Fthe-option-element%2Fdynamic-content-change-rendering.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fforms%2Fthe-select-element%2Freset-algorithm-rendering.html
Test expectations skipped for iOS:
https://trac.webkit.org/changeset/267061/webkit
Emilio Cobos Álvarez (:emilio)
Comment 82
2020-09-15 00:31:00 PDT
(In reply to Darin Adler from
comment #78
)
> While I am. irritated to hear that, sounds like a "too many cooks" > situation, it’s trivial to make the tools check for both. > > I don’t want a mess of modes and options, so I’d prefer to just implement > both unconditionally unless there is an obvious reason we can’t. For the > same reason, I made the code always send the TestRendered event, not > conditionally.
Yes, that seems reasonable. I'm not aware of the details of why the chosen class is different (reftest-wait predates crashtests, and my guess is that someone complained that crashtests aren't _technically_ reftests so the new class was born, but...). (In reply to Alexey Proskuryakov from
comment #80
)
> We don't have support for tests crashing without causing bad effects > (instability due to system load; trouble collecting crash logs).
Well, the point is that those tests shouldn't crash, if they do it's a bug to fix in WebKit :). I guess skipping them until the bug is fixed if it causes problems and enabling them when the problem is fixed seems the easiest path forward there.
Darin Adler
Comment 83
2020-09-15 11:56:29 PDT
Lets stop discussing "test-wait" here. Someone should file another bug to track adding it. It’s very easy to add support, but I prefer not to do it until we have at least one use of it in a test.
Frédéric Wang (:fredw)
Comment 84
2020-09-24 03:09:08 PDT
(In reply to Darin Adler from
comment #83
)
> Lets stop discussing "test-wait" here. Someone should file another bug to > track adding it. It’s very easy to add support, but I prefer not to do it > until we have at least one use of it in a test.
OK done in
https://bugs.webkit.org/show_bug.cgi?id=216921
Brent Fulgham
Comment 85
2023-03-31 11:45:17 PDT
WPT has removed the following tests as of 8f71659306c53f3cabad054ed02ac7c4d14de693: imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-dynamic-2.html imported/w3c/web-platform-tests/css/css-backgrounds/background-color-body-propagation-006.html imported/w3c/web-platform-tests/css/css-backgrounds/background-color-root-propagation-002.html imported/w3c/web-platform-tests/css/css-backgrounds/border-radius-dynamic-from-no-radius.html imported/w3c/web-platform-tests/css/css-backgrounds/child-move-reveals-parent-background.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug