-
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
user activation tests might be racy #36221
Comments
Most of these tests respond to As for racy behavior, in Chrome the tests with sub-frames (those containing "sameorigin" and "crossorigin" in the names) are marked as flaky because of possible delays in loading hit-test data for a subframe. I suspect Test Driver can't help here because it should dispatch the click to whichever element is "ready", but I could be wrong here. |
The chained-setTimeout test is also flaky on the WebKit side... so I'm wondering if we really need that test? or can we refactor it in some other way so it's not setTimeout dependent? The transient activation duration is UA-determined, so I'm wondering if it's worth testing that at all? |
This test is about Also, please let me know if the flakiness happens at an |
The "consumption-sameorigin.html" appears to be super flaky too. Here are two test runs (repeat 20 times):
I think loading both iframes is going to lead to the above. They should be loaded in order or in some more predictable manner. |
Sent #36304 to fix "consumption-sameorigin.html" |
They are just timing out and not finishing to run. I'll need to investigate further where they are getting stuck. |
I still don't think this test is correct or very useful, to be honest... These tests assume that it will be at least 30ms (it's not a bad assumption!), but it's not a correct assumption either as it's left to the user agent. |
The test is about chaining The exact timing is not important so I suggested reducing the delay to
Finding out where the test JS gets stuck would be helpful. Please keep me posted. |
No problem. I'm just trying to understand. I'm still not following how chaining/recursive calls to
What am I missing? |
@mustaqahmed about the general issue with these tests, the problem (for webkit at least) is that the A general mitigation strategy that's worked for me so far has been to run them For a bit more context, we are implementing |
You are perfectly on track: this shouldn't affect any activation states because UAv2 defines them simply as a state of the
In Chrome, we have the same challenge in subframes but the top-frame seems fine with just
We sensed that from your first comment here, and we are looking forward to a solid interop story here 😃! Thanks for cc-ing me in discussions that may benefit from our past impl experience. |
Ah, ok. Now it makes sense! Thank you! 🙏 When implementing (and having not been part of the UAv1 discussions), I was really confused when I saw this test as it didn't match anything in the spec. I totally get that we might want to have regression testing in WPT, but I wonder if we should move things like this to something like a I know this test doesn't break anything, but it was quite confusing to try work out what it was doing and why. |
I am a bit reserved about a "legacy" folder testing current expectations. We need to avoid any misinterpretation that these are "old behavior" or "failures here are not that important". The fact that this test (and similar ones based on |
I've seen "legacy-" used a lot in various filenames. See:
Maybe we can just prefix them with that? |
Thanks for the suggestion to check existing "legacy" tests. I just sampled The tests we are discussing here are asserting behaviors that are unsupported by the old user activation spec. So "legacy" in the name would be misleading IMHO. |
Closing, as we addressed the missing Thanks again for your help and time @mustaqahmed! Really appreciate your patience while I (continue to) get up to speed. |
@mustaqahmed, I noticed that some tests in #35836 are missing
await
on calls totest_driver.click()
. I want to confirm to it won't be an issue?I think we should add
await
to those tests regardless... if those tests get updated, that might be overlooked leading to problems.The text was updated successfully, but these errors were encountered: