Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove test-level assert property from tests #14409

Merged
merged 3 commits into from
Dec 10, 2018

Conversation

qiuzhong
Copy link
Contributor

@qiuzhong qiuzhong commented Dec 7, 2018

test-level asserts is the only remaining use of is for test-level
assert metadata. Remove all the assert property from tests and mark
them as test comments if possible.
Related: #14394

test-level asserts is the only remaining use of is for test-level
assert metadata. Remove all the assert property from tests and mark
them as test comments if possible.
Related: web-platform-tests#14394
@@ -10,7 +10,8 @@ function wp_test(func, msg, properties)
if (performanceNamespace === undefined || performanceNamespace == null)
{
// show a single error that window.performance is undefined
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
// The window.performance attribute provides a hosting area for performance related attributes.
test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute"});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For help and author may I suggest moving the information to the top of the test files using the existing style for that? Otherwise these same tests will need to be updated again to remove the properties entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foolip , I move them to the head of test files.

For `help` and `author`, moving the information to the top of the
test files.
Related: web-platform-tests#14394
Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % single nit. I'll push a commit to fix that.

@@ -4,6 +4,10 @@
<title>CSS Test: CSSOM StyleSheet Initial Values</title>
<link rel="author" title="Bear Travis" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/cssom-1/#css-style-sheets">
<link rel="help" href="http://www.w3.org/TR/cssom-1/#the-linkstyle-interface">
<link rel="help" href="https://www.w3.org/TR/cssom-1/#the-linkstyle-interface">
<link rel="help" href="http://www.w3.org/TR/cssom-1/#css-style-sheets">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was already present above.

@foolip
Copy link
Member

foolip commented Dec 10, 2018

There's some preexisting flakiness here:

https://tools.taskcluster.net/groups/POzAsNBJQd6tqMf6yT_yag/tasks/GJDhtVt_QzaLfLIj2SBRlA/details:

Test Subtest Results Messages
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/empty.py?id=audio-source-mpeg is expected to have initiatorType audio PASS: 9/10, MISSING: 1/10
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/empty.py?id=beacon is expected to have initiatorType beacon PASS: 6/10, MISSING: 4/10
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/empty.py?id=video-track is expected to have initiatorType track PASS: 9/10, MISSING: 1/10
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/empty.py?id=audio-source-ogg is expected to have initiatorType audio PASS: 2/10, MISSING: 8/10
/resource-timing/resource_reparenting.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=move_to_child is expected to have initiatorType img PASS: 6/10, MISSING: 4/10
/resource-timing/resource_reparenting.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=move_to_child is expected to be in the Resource Timing buffer FAIL: 4/10, MISSING: 6/10 assert_unreached: Reached unreachable code

https://tools.taskcluster.net/groups/POzAsNBJQd6tqMf6yT_yag/tasks/PHx9hP8jQM2zOPeisrZ4Tw/details

Test Subtest Results Messages
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/fonts/Ahem.ttf is expected to have initiatorType css FAIL: 1/10, MISSING: 9/10 assert_equals: http://web-platform.test:8000/fonts/Ahem.ttf is expected to have initiatorType css expected "css" but got "other"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/fonts/Ahem.ttf?id=n1 is expected to have initiatorType css FAIL: 1/10, MISSING: 9/10 assert_equals: http://web-platform.test:8000/fonts/Ahem.ttf?id=n1 is expected to have initiatorType css expected "css" but got "other"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/media/test.ogv?id=video-source is expected to have initiatorType video FAIL: 2/10, MISSING: 8/10 assert_equals: http://web-platform.test:8000/media/test.ogv?id=video-source is expected to have initiatorType video expected "video" but got "other"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=1 is expected to have initiatorType css FAIL: 9/10, PASS: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/blue.png?id=1 is expected to have initiatorType css expected "css" but got "img"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=2 is expected to have initiatorType css FAIL: 9/10, PASS: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/blue.png?id=2 is expected to have initiatorType css expected "css" but got "img"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=cursor is expected to have initiatorType css FAIL: 9/10, PASS: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/blue.png?id=cursor is expected to have initiatorType css expected "css" but got "img"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=input is expected to have initiatorType input FAIL: 9/10, PASS: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/blue.png?id=input is expected to have initiatorType input expected "input" but got "img"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=n1 is expected to have initiatorType css FAIL: 9/10, PASS: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/blue.png?id=n1 is expected to have initiatorType css expected "css" but got "img"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/blue.png?id=svg-image is expected to have initiatorType image FAIL: 9/10, PASS: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/blue.png?id=svg-image is expected to have initiatorType image expected "image" but got "img"
/resource-timing/resource_initiator_types.html http://web-platform.test:8000/resource-timing/resources/nested.css?id=prefetch is expected to have initiatorType link FAIL: 9/10, MISSING: 1/10 assert_equals: http://web-platform.test:8000/resource-timing/resources/nested.css?id=prefetch is expected to have initiatorType link expected "link" but got "other"
/user-timing/measure_associated_with_navigation_timing.html Second measure of current mark to navigationStart should be negative value. FAIL: 1/10, PASS: 9/10 assert_true: Second measure of current mark to navigationStart should be negative value. expected true got false
/user-timing/measure_associated_with_navigation_timing.html Measure from domComplete event to most recent mark "a" should have longer duration. FAIL: 1/10, PASS: 9/10 assert_true: Measure from domComplete event to most recent mark "a" should have longer duration. expected true got false
/user-timing/measure_associated_with_navigation_timing.html Measure from most recent mark to navigationStart should have longer duration. FAIL: 1/10, PASS: 9/10 assert_true: Measure from most recent mark to navigationStart should have longer duration. expected true got false

@foolip
Copy link
Member

foolip commented Dec 10, 2018

I've filed #14433 and #14434 about flaky tests.

@foolip foolip merged commit 9f2b713 into web-platform-tests:master Dec 10, 2018
@foolip
Copy link
Member

foolip commented Dec 10, 2018

Diff of runs before/after this change:
https://wpt.fyi/results/?label=taskcluster&product=chrome@226f3b50a6&product=chrome@9f2b7133fa&diff
https://wpt.fyi/results/?label=taskcluster&product=firefox@226f3b50a6&product=firefox@9f2b7133fa&diff

There are apparent regressions, but not in the directories changed, so I suspect this was flakiness.

@lukebjerring FYI if you're keeping track of people/occurrences of people trying to get this info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants