Closed Bug 1667968 Opened 6 years ago Closed 5 years ago

[wpt-sync] Sync PR 25833 - Support testdriver in cross-origin windows/frames

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 25833 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/25833
Details from upstream follow.

b'James Graham <james@hoppipolla.co.uk>' wrote:

Support testdriver in cross-origin windows/frames

Adds support for using testdriver in cross-origin scenarios in which
it's possible to postMessage between the window invoking the action
and the test window (this means it doesn't work for rel=noopener
windows).

There are several changes here:

  • All testdriver commands that don't accept an element argument
    accept a context argument which is a Window in which to run the
    command.

  • testdriver.js can be loaded in a window that doesn't contain
    testharness.js. In such a window the code must call
    test_driver.set_test_context() with a handle for the top-level test
    window. After doing this it can use testdriver like normal, and can
    use test_driver.messge_test() to postMessge data to the test window.

  • Since there are now multiple windows able to use testdriver, the
    single active command is replaced with a map of commands, and each
    command gets an id that's passed up to the harness and used to
    identify the response.

PR 25833 applied with additional changes from upstream: 141c517755d3419b9d2b142adee46a165aae0842
Whiteboard: [wptsync downstream] → [wptsync downstream error]
PR 25833 applied with additional changes from upstream: be72f38b98c0b8099fa352e30b2989b4ba9f215e
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 5 tests and 1 subtests

Status Summary

Firefox

OK : 5
PASS: 11

Chrome

OK : 5
PASS: 11

Safari

OK : 5
PASS: 10
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/28f7805cf0eb [wpt PR 25833] - Support testdriver in cross-origin windows/frames, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Blocks: 1596585
Blocks: 1597285
You need to log in before you can comment on or make changes to this bug.