[wpt-sync] Sync PR 15262 - [WPT] Merge wpt/{referrer-policy,mixed-content}/generic/common.js
Categories
(Core :: DOM: Security, enhancement, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream][domsecurity-backlog])
Sync web-platform-tests PR 15262 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/15262
Details from upstream follow.
Hiroshige Hayashizaki <hiroshige@chromium.org> wrote:
[WPT] Merge wpt/{referrer-policy,mixed-content}/generic/common.js
To merge wpt/{referrer-policy,mixed-content} test frameworks,
this CL merges their common.js.The new common.js is based on mixed-content's common.js,
with some aspects imported from referrer-policy's common.js:
- Passes results from subresource payloads to resolved promises,
converting if necessary using wrapResult().
This is for referrer-policy tests that rely on subresource
payload to get referrer request headers, while
mixed-content tests don't use the payload information at all.- Accepts
additionalArguments
arguments (to be used to set
referrer-policy-related attributes to elements).- Extends bindEvents() to clean up event listeners on completion
(which is done for some request types in
referrer-policy's common.js).- Imports queryImage() (with renaming to
requestViaImageForReferrerPolicy) from referrer-policy's common.js
(this should be merged with mixed-content version of
image requests, but not now).On mixed-content side:
- expect.py's response for script requests is modified
because postMessage() is required by referrer-policy's common.js.On referrer-policy side:
- referrer-policy-test-case.js is converted to promise-based,
- Move referrer-policy-specific code from common.js
to referrer-policy-test-case.js, including wrapResult().Some manually-written tests are modified, because:
- Functions in referrer-policy's common.js are renamed, and
- Some methods are moved to referrer-policy-test-case.js.
Then now
wpt/{referrer-policy,mixed-content}/generic/common.js
are the same.They are duplicated (i.e. not moved/merged to a single file)
just to avoid mass modification of a large number of
generated files for each step of refactoring,
as these file names are hard-coded there.Bug: 906850
Change-Id: I39f19d08d658c1a898fc453b621d82a2faaaaf6b
Reviewed-on: https://chromium-review.googlesource.com/1455745
WPT-Export-Revision: ab84fa1329f67a0458caa367549adcf2589a6f5c
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=891e510b5cd34edbcf44fbde7644b729c013f02c
Assignee | ||
Comment 2•5 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=42b66c8875e84394f813d0b259462959fa14ac15
Assignee | ||
Comment 3•5 years ago
|
||
Ran 393 tests and 396 subtests OK : 392 PASS : 346 FAIL : 50 Tests that are disabled for instability: /mixed-content/link-prefetch-tag/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/8592c05fe031 [wpt PR 15262] - [WPT] Merge wpt/{referrer-policy,mixed-content}/generic/common.js, a=testonly
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/6d7a636b53c9 [wpt PR 15262] - [WPT] Merge wpt/{referrer-policy,mixed-content}/generic/common.js, a=testonly
Comment 6•5 years ago
|
||
bugherder |
Description
•