Open
Bug 1203917
Opened 10 years ago
Updated 3 years ago
wpt /html/editing/focus/focus-management/focus-events.html test unstable on linux/e10s
Categories
(Testing :: web-platform-tests, defect)
Testing
web-platform-tests
Tracking
(e10s+)
NEW
| Tracking | Status | |
|---|---|---|
| e10s | + | --- |
People
(Reporter: jgraham, Unassigned)
References
(Blocks 1 open bug)
Details
Disabled for now
Updated•10 years ago
|
tracking-e10s:
--- → +
Comment 1•9 years ago
|
||
I see focus and I immediately think of you, Neil :). Can you please take a look at this e10s-only failure?
Flags: needinfo?(enndeakin)
Comment 2•9 years ago
|
||
Probably because the test framework isn't waiting for the window to be focused before running the test. I know nothing of these tests so I can't really be much help.
Flags: needinfo?(enndeakin)
Comment 3•9 years ago
|
||
James, can you please answer Neil's question about how the harness ensures that the tests have focus while running?
Flags: needinfo?(james)
Comment 4•9 years ago
|
||
Note that the test here runs without waiting for the page to load either. Depending on the way the window/frame is already focused, the focus event may be delayed until after the page show.
| Reporter | ||
Comment 5•9 years ago
|
||
It could be getting that wrong indeed. What's the correct way to ensure that the window is focused before running the test?
Flags: needinfo?(james)
| Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(enndeakin)
Comment 6•9 years ago
|
||
Generally, you want to ensure that the content area is focused when loading the test page by calling focus() on its window. If you have access to the browser chrome and are opening a new tab, there is a TabOpen event fired on the tab itself.
I don't know how this test framework works so I don't really know how to give a specific answer as to how you should be doing that. If you could point to where the test opens the test page I might be able to give some general pointers.
Flags: needinfo?(enndeakin)
Updated•9 years ago
|
Flags: needinfo?(james)
| Reporter | ||
Comment 7•9 years ago
|
||
We have a window, into which the following script (with placeholders substituted) is executed:
https://dxr.mozilla.org/mozilla-central/source/testing/web-platform/harness/wptrunner/executors/testharness_marionette.js
That causes the test to load in a new window. In the test window, the following script is run (after the harness loads, but before any tests have run):
https://dxr.mozilla.org/mozilla-central/source/testing/web-platform/harness/wptrunner/testharnessreport.js
We can add script to either of those places. Ideally it would run in content scope, but it may be possible to run in Chrome scope with some effort. It's also possible to make it conditional on a property being set in the test manifest, if required, although if we can avoid that without serious cost, that would be better.
Flags: needinfo?(james) → needinfo?(enndeakin)
Comment 8•9 years ago
|
||
So I see no code in there that waits for the window to be focused. You could always check by adding a listener for the "focus" event to the opened window and check if it fires after the test has run. If so, then this is the problem here.
In mochitests we use waitForFocus (in SimpleTest.js) to handle waiting for a window to be both loaded and focused. It's possible it could be adpated for these tests.
Flags: needinfo?(enndeakin)
See Also: → 1775118
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•