-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add tests for <summary>'s activation behavior #4539
Conversation
Notifying @Ms2ger, @ayg, @gsnedders, @jdm, @jgraham, @sideshowbarker, @zcorpan, and @zqzhang. (Learn how reviewing works.) |
FirefoxTesting revision 2065c4f All results/html/semantics/interactive-elements/the-summary-element/activation-behavior.html
|
ChromeTesting revision 5d41b89 Unstable results
All results/html/semantics/interactive-elements/the-summary-element/activation-behavior.html
|
Any ideas on what would be causing this test to be unstable in Chrome? Is the stability checker on the fritz perchance, or is this some actual bug in my tests that I just can't decipher? |
The stability checker is working as designed as far as I know. At least I’m not aware of anything that’s known to have broken in it recently. As far as the test failures, maybe @jgraham has some insight. |
I can't reproduce the unstable results, having reloaded the test ~20 times. :-( |
I can confirm instability in the following contexts:
Firefox Nightly behaves as expected on both platforms. It looks like Chromium does not update the <details>
<summary id="d">Summary</summary>
Content
</details>
<script>document.getElementById('d').click();</script> Demo: https://bl.ocks.org/jugglinmike/e5f13288f675836e2cca8aec8d2a2424 Note that the The test is reported as flaky because a DOM with more elements (such as the one under test) occasionally prompts Chromium to honor the click. Demo: https://bl.ocks.org/jugglinmike/661f878cc5448a86072c40c3d3336a93 The flakyness may be more prominent when the document is loaded directly (in other words, not from within an So this may be a bug Chromium. Probably I'm overlooking some reality of expected behavior during DOM loading, but just in case this is legitimate, I've filed a report on the Chromium issue tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=681711 |
Thanks so much @jugglinmike, that's super-valuable! I added my diagnosis of the Chrome issue in https://bugs.chromium.org/p/chromium/issues/detail?id=681711#c2 . Now the question becomes, what is our strategy for merging or not merging tests that expose flakiness bugs in engines? Should I work around the Chrome bug (e.g. delay for some time to wait for the page to render and all layout objects to be created before starting the test suite), thus giving Chrome a free pass here? Or should we merge anyway, despite Travis not wanting us to? @gsnedders, @jgraham, thoughts? |
So the problem with flaky tests is that they will tend to just be disabled when you import them, so you end up without coverage for either the original issue or the flakiness. So unfortunately it's probably better to work around the issue in the test. The counterargument in this case is that Chrome may not import the test immediately anyway so hopefully the bug will be fixed by the time that the test is imported into the Blink repo. Basically I'm happy for you to take either path in this specific case. |
I think if you work around a bug in a test, it would be good to have a separate test testing the bug you're working around, or at least an issue in web-platform-tests repo to add such a test. |
Wouldn't such a separate test not pass the stability checker? |
Since tkent fixed the suspected Chrome bug already I think we should merge this as-is. However, I don't have privileges to do so since the stability checker failed. @jgraham, is that something you can do? |
Fixes #2246. This also fixes the value that the open attribute is set to to be the empty string, instead of "open", matching existing implementations. Tests at web-platform-tests/wpt#4539 show that both implementers of <details> follow these same semantics, despite there having been no spec previously. The only exception is that Blink included a being-rendered check, but that was removed; see https://bugs.chromium.org/p/chromium/issues/detail?id=681711. There's still some discussion ongoing as to whether we should change the content models to disallow interactive descendants of <summary> elements, happening in #2272.
Depends on how you write the test. You could repeat the unstable thing in the test say 50 times and fail the test if it ever gives an unexpected result. Or you could let it have unstable result, I suppose. |
Or in some cases you can make one of the relevant things take a long time to complete, like here maybe having a slow-loading stylesheet... |
Fixes whatwg#2246. This also fixes the value that the open attribute is set to to be the empty string, instead of "open", matching existing implementations. Tests at web-platform-tests/wpt#4539 show that both implementers of <details> follow these same semantics, despite there having been no spec previously. The only exception is that Blink included a being-rendered check, but that was removed; see https://bugs.chromium.org/p/chromium/issues/detail?id=681711. There's still some discussion ongoing as to whether we should change the content models to disallow interactive descendants of <summary> elements, happening in whatwg#2272.
Follows whatwg/html#2256.