Open foolip opened 5 years ago
Most of the asserts probably should not just be removed, but rather kept as comments in the tests.
@foolip , if you don't mind I'll take this issue.
Perfect, thank you!
When merging https://github.com/web-platform-tests/wpt/pull/14409 I tweaked the commit message to close this issue. That was a mistake, because actually there's remaining work to do here. Once the changes have been imported into Chromium I'll restart https://chromium-review.googlesource.com/c/chromium/src/+/1070155 and if that looks good we can remove the test-level properties from testharness.js altogether.
https://chromium-review.googlesource.com/c/chromium/src/+/1070155 has revealed a bunch of tests that use the properties dictionary and that should be inspected and probably changed before we remove support for it:
/css/css-fonts/format-specifiers-variations.html
/css/css-shapes/shape-outside/values/shape-margin-000.html
/css/css-shapes/shape-outside/values/shape-margin-001.html
/css/css-shapes/shape-outside/values/shape-margin-002.html
/css/css-transitions/transition-delay-001.html
/css/css-transitions/transition-duration-001.html
/css/css-transitions/transition-timing-function-001.html
/html/infrastructure/urls/resolving-urls/query-encoding/utf-16be.html
/html/infrastructure/urls/resolving-urls/query-encoding/utf-16le.html
/html/infrastructure/urls/resolving-urls/query-encoding/utf-8.html
/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html
/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252.html
/html/semantics/forms/the-input-element/datetime.html
/html/semantics/forms/the-input-element/range.html
/html/semantics/forms/the-input-element/search_input.html
/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant.html
/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context.html
/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-context.html
/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-row-context.html
/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html
/media-source/mediasource-activesourcebuffers.html
/media-source/mediasource-addsourcebuffer-mode.html
/media-source/mediasource-append-buffer.html
/media-source/mediasource-appendbuffer-quota-exceeded.html
/media-source/mediasource-appendwindow.html
/media-source/mediasource-changetype-play.html
/media-source/mediasource-changetype.html
/media-source/mediasource-closed.html
/media-source/mediasource-config-change-webm-a-bitrate.html
/media-source/mediasource-config-change-webm-av-audio-bitrate.html
/media-source/mediasource-config-change-webm-av-framesize.html
/media-source/mediasource-config-change-webm-av-video-bitrate.html
/media-source/mediasource-config-change-webm-v-bitrate.html
/media-source/mediasource-config-change-webm-v-framerate.html
/media-source/mediasource-config-change-webm-v-framesize.html
/media-source/mediasource-detach.html
/media-source/mediasource-duration-boundaryconditions.html
/media-source/mediasource-endofstream-invaliderror.html
/media-source/mediasource-errors.html
/media-source/mediasource-liveseekable.html
/media-source/mediasource-multiple-attach.html
/media-source/mediasource-play-then-seek-back.html
/media-source/mediasource-play.html
/media-source/mediasource-redundant-seek.html
/media-source/mediasource-removesourcebuffer.html
/media-source/mediasource-seek-beyond-duration.html
/media-source/mediasource-seek-during-pending-seek.html
/media-source/mediasource-seekable.html
/media-source/mediasource-sourcebuffer-mode.html
/media-source/mediasource-sourcebuffer-trackdefaults.html
/media-source/mediasource-sourcebufferlist.html
/media-source/mediasource-timestamp-offset.html
@foolip , so the goal is to remove all the test-level properties support from testharness.js?
I noticed you raise Error on purpose for the test
, async_test
, promise_test
and generate_tests
if the test-level properties are set. Should they be removed from all the test files?
When I looked through some of the list I saw some cases that aren't so obvious what to do about. I think we'll just have to remove the uses that aren't doing anything useful, and then look at what remains and say if we should keep the properties dictionary or not.
New PR filed for removing the these useless properties, including:
promise_test()
: it should
be an object while true/false
are passed.flags
property passed to test()
while it's never used in testharness.jsgenerate_test()
: strings look like test
information were passed and moved to commentshelp
property: moved to the head of the test files as before.async_test
The properties dictionary remains in such case: properties is used explicitly testing function body of promise_test's func
parameter.
After https://github.com/web-platform-tests/wpt/issues/11120, test-level asserts is the only remaining use of test-level metadata. Example: https://github.com/web-platform-tests/wpt/blob/8bb0b769af8d7a6d245db31c0b6029eb3b7da861/hr-time/monotonic-clock.any.js#L1-L3
https://chromium-review.googlesource.com/c/chromium/src/+/1070155 identified tests that use this and will need updating before the feature is removed:
Some false positives due to flakiness is possible.