[wpt-sync] Sync PR 25550 - Make testdriver click/send_keys/actions work in more browsing contexts
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox83 fixed)
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 25550 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/25550
Details from upstream follow.
b'James Graham <james@hoppipolla.co.uk>' wrote:
Make testdriver click/send_keys/actions work in more browsing contexts
This is a slightly hacky change to allow testdriver actions to work in
more browsing contexts. The basic idea is that when we want to run an
action in a different borsing context, we pass wptrunner a context
list like [window_id, frame_id...], and use that to select the correct
browsing context just for the duration of the action, before switching
back.There are a number of limitations with the current patch, some more
serious than others:
So far this is only implmented for testdriver commands that take an
explicit element. Other commands could be modified to also allow
passing in an explicit context.It must be possible to get a window reference and set the name
property (see below). This means this approach only works for
windows that are same origin with the test window.WebDriver implementations don't generally support returning a window
object from script, so we can't return a window handle
directly. Instead we either use the existing window.name property or
add a window.name when we try to start the action. Then in wptrunner
we do a linear search of all windows to find the one with the
appropriate name. We have to use window.name rather than writing a
custom property into the window global because the way marionette
sandboxes js we aren't able to read the global property.However despite these limitations this makes the feature considerably
more versatile than it was previously.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests and 1 subtests
Status Summary
Firefox
OK : 3
PASS: 3
Chrome
OK : 3
PASS: 3
Safari
OK : 3
PASS: 3
Links
Comment 4•5 years ago
|
||
bugherder |
Description
•