diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index c884dc82eab..628b1fab770 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -2,6 +2,3 @@ [listeners are called when +

Manifest attached to document that does not have a browsing context

+

+ To pass, the user agent must not use the manifest in the unattached document. +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/link-relationship/link-rel-manifest.html b/tests/wpt/web-platform-tests/html/links/manifest/link-relationship/link-rel-manifest.html new file mode 100644 index 00000000000..2d9fd789480 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/link-relationship/link-rel-manifest.html @@ -0,0 +1,16 @@ + + + Test that "manifest" is a supported value for the `rel` of a `link` + + + + + diff --git a/tests/wpt/web-platform-tests/html/links/manifest/link-relationship/link-tree-order-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/link-relationship/link-tree-order-manual.html new file mode 100644 index 00000000000..aa9ec9c12d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/link-relationship/link-tree-order-manual.html @@ -0,0 +1,13 @@ + +Test that name member is supported + + + + + +

+ If when installing the name is "pass" then the test has passed. +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json-manual.html new file mode 100644 index 00000000000..5d1a4987047 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json-manual.html @@ -0,0 +1,9 @@ + +Test JSON MIME Type support (application/json) + + +

Test JSON MIME Type support for web manifest

+

+ To pass, the use agent must treat the manifest valid (name is "pass"). The + response's Content-Type metadata is a JSON MIME type "application/json". +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json.webmanifest b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json.webmanifest new file mode 100644 index 00000000000..c51d155a24c --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json.webmanifest @@ -0,0 +1,3 @@ +{ + "name": "pass" +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json.webmanifest.headers b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json.webmanifest.headers new file mode 100644 index 00000000000..75f88565564 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-json.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/json; charset=utf-8 \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json-manual.html new file mode 100644 index 00000000000..f41c4fdab03 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json-manual.html @@ -0,0 +1,10 @@ + +Test JSON MIME Type support (application/manifest+json) + + +

Test JSON MIME Type support for web manifest

+

+ To pass, the use agent must treat the manifest valid (name is "pass"). The + response's Content-Type metadata is a JSON MIME type + "application/manifest+json". +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json.webmanifest b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json.webmanifest new file mode 100644 index 00000000000..c51d155a24c --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json.webmanifest @@ -0,0 +1,3 @@ +{ + "name": "pass" +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers new file mode 100644 index 00000000000..23f36ea27ce --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-application-manifest+json.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid-manual.html new file mode 100644 index 00000000000..45c2000a453 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid-manual.html @@ -0,0 +1,9 @@ + +Test JSON MIME Type support (application/json) + + +

Test JSON MIME Type support for web manifest

+

+ To pass, the use agent must treat the manifest as invalid. The + response's Content-Type metadata is an invalid mime type. +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid.webmanifest b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid.webmanifest new file mode 100644 index 00000000000..66051f078ac --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid.webmanifest @@ -0,0 +1,3 @@ +{ + "name": "fail - invalid MIME type" +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid.webmanifest.headers b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid.webmanifest.headers new file mode 100644 index 00000000000..ac903866342 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-invalid.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: ׺°”˜`”°º× INVALID MIME TYPE ׺°”˜`”°º× \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none-manual.html new file mode 100644 index 00000000000..8f934155e14 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none-manual.html @@ -0,0 +1,9 @@ + +Test JSON MIME Type support (application/json) + + +

Test JSON MIME Type support for web manifest

+

+ To pass, the use agent must treat the manifest as invalid. The + response's does not contain any Content-Type HTTP header. +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none.webmanifest b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none.webmanifest new file mode 100644 index 00000000000..cae1d82a320 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none.webmanifest @@ -0,0 +1,3 @@ +{ + "name": "fail - no Content-Type HTTP header" +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none.webmanifest.headers b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-none.webmanifest.headers new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json-manual.html new file mode 100644 index 00000000000..4597d6ddbda --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json-manual.html @@ -0,0 +1,9 @@ + +Test JSON MIME Type support (text/json) + + +

Test JSON MIME Type support for web manifest

+

+ To pass, the use agent must treat the manifest valid (name is "pass"). The + response's Content-Type metadata is a JSON MIME type "text/json". +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json.webmanifest b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json.webmanifest new file mode 100644 index 00000000000..c51d155a24c --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json.webmanifest @@ -0,0 +1,3 @@ +{ + "name": "pass" +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json.webmanifest.headers b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json.webmanifest.headers new file mode 100644 index 00000000000..3f4f83f9223 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/mime-type-text-json.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: text/json; charset=utf-8 \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/no-manifest-from-iframe-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/no-manifest-from-iframe-manual.html new file mode 100644 index 00000000000..7b52e487314 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/no-manifest-from-iframe-manual.html @@ -0,0 +1,21 @@ + + + Don't install manifests that are not top-level from browsing contexts + + +

Don't install manifests that are not top-level from browsing contexts

+

+ To pass, the user agent must not use the manifest in iframe. The user agent + must behave as if there is no manifest present. +

+ diff --git a/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain-manual.html b/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain-manual.html new file mode 100644 index 00000000000..fdf5abf099b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain-manual.html @@ -0,0 +1,9 @@ + +Test JSON MIME Type support (text/plain) + + +

Test JSON MIME Type support for web manifest

+

+ To pass, the use agent must treat the manifest as not present. The response's + Content-Type metadata "text/plain" is NOT a JSON MIME type. +

diff --git a/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest b/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest new file mode 100644 index 00000000000..eac6871328f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest @@ -0,0 +1,3 @@ +{ + "name": "fail - MIME type is text/plain" +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers b/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers new file mode 100644 index 00000000000..80fbe8db6cb --- /dev/null +++ b/tests/wpt/web-platform-tests/html/links/manifest/wrong-mime-type-text-plain.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: text/plain; charset=utf-8 \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/form-echo.py b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/form-echo.py index a7f0dc87efd..72f1f51ce50 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/form-echo.py +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/form-echo.py @@ -1,7 +1,7 @@ def main(request, response): bytes = bytearray(request.raw_input.read()) - bytes_string = " ".join("%02x" % b for b in bytes) + bytes_string = b" ".join(b"%02x" % b for b in bytes) return ( - [("Content-Type", "text/plain")], + [(b"Content-Type", b"text/plain")], bytes_string ) diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py index 5fc67faa880..23f8d3b6d18 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py @@ -1,2 +1,12 @@ +from six import PY3 + +from wptserve.utils import isomorphic_decode + def main(request, response): - return ([("Content-Type", "text/html")], "") + testinput = request.POST.first(b"testinput") + if PY3: + # The test asserts the string representation of this FieldStorage + # object, but unfortunately the value property has different types in + # Python 2 and 3. Unify them to native strings. + testinput.value = isomorphic_decode(testinput.value) + return ([(b"Content-Type", b"text/html")], u"") diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-target/form-target-iframe-helper.py b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-target/form-target-iframe-helper.py index 291221a9f6b..bbc3b71e942 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-target/form-target-iframe-helper.py +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-target/form-target-iframe-helper.py @@ -1,3 +1,3 @@ def main(request, response): - return ([("Content-Type", "text/plain")], - "OK") + return ([(b"Content-Type", b"text/plain")], + b"OK") diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed.html index 1b3f8631a57..ee12316421e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/inserted-or-removed.html @@ -55,6 +55,22 @@ test(() => { assert_equals(target.selectedOptions[0].textContent, 'Second'); }, 'The last selected OPTION should win; Inserted by DOM API'); +test(() => { + const target = document.querySelector("#by-dom"); + target.innerHTML = ''; + const inner = ` + `; + + // Emulate what jQuery 1.x/2.x does in append(inner). + const fragment = document.createDocumentFragment(); + const div = document.createElement('div'); + div.innerHTML = ''; + while (div.firstChild.firstChild) + fragment.appendChild(div.firstChild.firstChild); + target.appendChild(fragment); + assert_equals(target.selectedOptions[0].textContent, 'Second'); +}, 'The last selected OPTION should win; Inserted by jQuery append()'); + test(() => { const target = document.querySelector("#by-innerHTML"); target.innerHTML = '' + diff --git a/tests/wpt/web-platform-tests/html/semantics/links/downloading-resources/resources/inspect-header.py b/tests/wpt/web-platform-tests/html/semantics/links/downloading-resources/resources/inspect-header.py index d868ccd81e2..2c68e475ffd 100644 --- a/tests/wpt/web-platform-tests/html/semantics/links/downloading-resources/resources/inspect-header.py +++ b/tests/wpt/web-platform-tests/html/semantics/links/downloading-resources/resources/inspect-header.py @@ -1,18 +1,18 @@ def main(request, response): - headers = [("Content-Type", "text/plain")] - command = request.GET.first("cmd").lower() - test_id = request.GET.first("id") - header = request.GET.first("header") - if command == "put": - request.server.stash.put(test_id, request.headers.get(header, "")) + headers = [(b"Content-Type", b"text/plain")] + command = request.GET.first(b"cmd").lower() + test_id = request.GET.first(b"id") + header = request.GET.first(b"header") + if command == b"put": + request.server.stash.put(test_id, request.headers.get(header, b"")) - elif command == "get": + elif command == b"get": stashed_header = request.server.stash.take(test_id) if stashed_header is not None: - headers.append(("x-request-" + header, stashed_header)) + headers.append((b"x-request-" + header, stashed_header)) else: - response.set_error(400, "Bad Command") - return "ERROR: Bad Command!" + response.set_error(400, u"Bad Command") + return b"ERROR: Bad Command!" - return headers, "" + return headers, b"" diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-404.py b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-404.py index a9b394d7ed6..abb85139b39 100644 --- a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-404.py +++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-404.py @@ -1,2 +1,2 @@ def main(request, response): - return 404, [("Content-Type", "text/html")], 'Some content for the masses.' * 100 + return 404, [(b"Content-Type", b"text/html")], b'Some content for the masses.' * 100 diff --git a/tests/wpt/web-platform-tests/interfaces/pointerevents.idl b/tests/wpt/web-platform-tests/interfaces/pointerevents.idl index 8a42b5a8446..e977ce73420 100644 --- a/tests/wpt/web-platform-tests/interfaces/pointerevents.idl +++ b/tests/wpt/web-platform-tests/interfaces/pointerevents.idl @@ -9,11 +9,11 @@ dictionary PointerEventInit : MouseEventInit { double height = 1; float pressure = 0; float tangentialPressure = 0; - long tiltX = 0; - long tiltY = 0; + long tiltX; + long tiltY; long twist = 0; - double altitudeAngle = 0; - double azimuthAngle = 0; + double altitudeAngle; + double azimuthAngle; DOMString pointerType = ""; boolean isPrimary = false; sequence coalescedEvents = []; diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-bad-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html similarity index 96% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child-bad-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html index cfa39aaee03..8c18711093c 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-bad-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testSameAgentCluster, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frameIndex = 0; for (const badValue of ["", "?0", "true", "\"?1\"", "1", "?2", "(?1)"]) { diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-ports.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-port.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-ports.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-port.sub.https.html index e203d0c3c67..10df411a96f 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-ports.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-port.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][]}}:{{ports[https][1]}}", "?1"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html index ece3b9732a5..034c8a3090b 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testSameAgentCluster, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][]}}", "?1"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html index ab060e24f49..3894f560f04 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][www]}}", "?1"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-with-params-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html similarity index 96% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-with-params-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html index e1459b9cc08..a47729bb032 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-with-params-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][www]}}", "?1;param1;param2=value2"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-ports.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-port.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-ports.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-port.sub.https.html index a33dcd25ee3..09389e338ab 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-ports.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-port.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][]}}:{{ports[https][1]}}"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/getter-data-url.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-port.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/getter-data-url.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-port.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html index 7edebe9bd88..7070c1b891d 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testSameAgentCluster, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][]}}"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-same.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-same.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html index f0cd3c48113..32e5a1768d8 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][www]}}"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-subdomain.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-subdomain.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-ports.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-port.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-ports.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-port.sub.https.html index d20bd347a51..96669c30d14 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-ports.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-port.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][]}}:{{ports[https][1]}}", "?1"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/getter-removed-iframe.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-port.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/getter-removed-iframe.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-port.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html index c4917819617..a83582f747a 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testSameAgentCluster, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][]}}", "?1"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-same.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-same.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html similarity index 95% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html index fc5b19843cb..7010e4c5f4f 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { await insertIframe("{{hosts[][www]}}", "?1"); diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-subdomain.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-subdomain.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html index 17b82bc09df..a8437c5966f 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testSameAgentCluster, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Must be sequential, not parallel: the non-isolated frame must load first. diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-ports.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomainport.sub.https.html similarity index 96% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-ports.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomainport.sub.https.html index f5de8877f67..4103373df6c 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-ports.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomainport.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testSameAgentCluster, testDifferentAgentClusters, -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-different.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-different.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html index 17ee8a678a6..06d58b3a9c4 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-no-child2-yes-children-different.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-yes-child2-no-not-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-yes-child2-no-not-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html index 7b7b2a2f191..68c9fe1aa6d 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-yes-child2-no-not-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-yes-child2-no-children-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-yes-child2-no-children-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html index f6955c55c25..4e95827ce68 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child1-yes-child2-no-children-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Must be sequential, not parallel: the isolated frame must load first. diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html index 0f2f29025e7..f261b8eea2c 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/getter-sandboxed-iframe.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/getter-sandboxed-iframe.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-different.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-different.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html index 1635bd63848..86c951dd826 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-different.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-ports-no.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-ports-no.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html index dc157a9eef9..997fa0859f1 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Must be sequential, not parallel: the non-isolaed frame must load first. diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-subdomain-no.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-subdomain-no.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-different.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-different.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html index c830e1548c0..7631bdd1bd4 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-different.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-ports.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-no-ports.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-ports.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomainport.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-ports.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomainport.sub.https.html index 230162471cf..e578e350208 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-ports.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomainport.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-ports.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomainport.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child-yes-ports.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomainport.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-not-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-not-subdomain.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html index 784e100f617..edcdcbabd76 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-not-subdomain.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-different.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-different.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-children-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-children-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html index 033fdd2827f..f8503312460 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-children-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Must be sequential, not parallel: the isolated frame must load first. diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-same.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-no-children-same.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-same.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-same.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html index 2de08307fcb..6ae6fac7718 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-same.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html @@ -12,7 +12,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-different.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-different.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-different.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-different.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html index 2c1f1341df5..53eaea13ca2 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-different.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html @@ -11,7 +11,7 @@ import { insertIframe, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-ports.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-ports.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-ports.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomainport.sub.https.html similarity index 96% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-ports.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomainport.sub.https.html index bf8731663be..370f3dc773f 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-ports.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomainport.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; promise_setup(async () => { // Order of loading should not matter, but we make it sequential to ensure the diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-same.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomainport.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-no-child2-yes-children-same.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomainport.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/README.md b/tests/wpt/web-platform-tests/origin-isolation/README.md index b028fcd9a36..8ff8de614fd 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/README.md +++ b/tests/wpt/web-platform-tests/origin-isolation/README.md @@ -1,3 +1,26 @@ # Origin isolation tests -These tests are for the proposal at [WICG/origin-isolation](https://github.com/WICG/origin-isolation). They should eventually move into a subdirectory of `html/` if/when that proposal merges into the HTML Standard. +These tests are for the proposal at +[WICG/origin-isolation](https://github.com/WICG/origin-isolation). They should +eventually move into a subdirectory of `html/` if/when that proposal merges into +the HTML Standard. + +## Test filenames + +The tests in `2-iframes` follow the file naming pattern + +``` +parent-[yes|no]-child1-[yes|no]-[designator]-child2-[yes|no]-[designator] +``` + +Here: + +* `yes` or `no` refers to whether the `Origin-Isolation` header is set or unset. +* `designator` explains how the child differs from the parent: e.g. by being a + subdomain, or having a different port, or both. There's also `same` if it's + same-origin. + +Other directories have variations on this, e.g. `1-iframe/` does the same thing +but for a single `child` instead of `child1` and `child2`, and `navigation/` +uses `1` and `2` to represent the two different locations the single iframe will +be navigated to. diff --git a/tests/wpt/web-platform-tests/origin-isolation/getter-data-url.https.html b/tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/data-url.https.html similarity index 67% rename from tests/wpt/web-platform-tests/origin-isolation/getter-data-url.https.html rename to tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/data-url.https.html index da2c87b1270..6933f35930d 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/getter-data-url.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/data-url.https.html @@ -4,13 +4,17 @@ + +
diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-children-same.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/data-url.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-no-children-same.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/data-url.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/getter-removed-iframe.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/removed-iframe.sub.https.html similarity index 75% rename from tests/wpt/web-platform-tests/origin-isolation/getter-removed-iframe.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/removed-iframe.sub.https.html index a1373468e22..fd838cdbb55 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/getter-removed-iframe.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/removed-iframe.sub.https.html @@ -1,13 +1,17 @@ -window.crossOriginIsolated for a removed frame +window.originIsolationRestricted for a removed frame + +
+ +
diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-different.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/sandboxed-iframe.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-different.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/getter-special-cases/sandboxed-iframe.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-same-no-2-ports-yes.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-same-no-2-ports-yes.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html index dc449e22509..ff9ea4dca8c 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-same-no-2-ports-yes.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html @@ -14,7 +14,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-same-no-2-subdomain-yes.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-same-no-2-subdomain-yes.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html index 6815aa97a65..f599cb986d9 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-same-no-2-subdomain-yes.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html @@ -14,7 +14,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-no-2-subdomain-yes.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-no-2-subdomain-yes.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html index 2887ea85f60..8777b656e33 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-no-2-subdomain-yes.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html @@ -13,7 +13,7 @@ import { setBothDocumentDomains, testSameAgentCluster, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-no-2-subdomain2-yes.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-no-2-subdomain2-yes.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html index cd01f969d4f..22f35eb9149 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-no-2-subdomain2-yes.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html @@ -14,7 +14,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html index a4ee8e1f927..ac51e6ef80c 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html @@ -14,7 +14,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-yes-2-subdomain-no.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-yes-2-subdomain-no.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html index 245a833192e..425983423ba 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-no-1-subdomain-yes-2-subdomain-no.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html @@ -13,7 +13,7 @@ import { setBothDocumentDomains, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-ports-no.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-ports-no.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html index 9b554c3cecf..2d9c9ac98d0 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-ports-no.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html @@ -14,7 +14,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-ports.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-ports.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-subdomain-no.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html similarity index 97% rename from tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-subdomain-no.sub.https.html rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html index 07a6b01d9f0..abf0da2b5d6 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/navigation-parent-yes-1-same-no-2-subdomain-no.sub.https.html +++ b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html @@ -14,7 +14,7 @@ import { testSameAgentCluster, testDifferentAgentClusters, testOriginIsolationRestricted -} from "./resources/helpers.mjs"; +} from "../resources/helpers.mjs"; let frame1; promise_setup(async () => { diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-same.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html.headers similarity index 100% rename from tests/wpt/web-platform-tests/origin-isolation/parent-yes-child1-yes-child2-yes-children-same.sub.https.html.headers rename to tests/wpt/web-platform-tests/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html.headers diff --git a/tests/wpt/web-platform-tests/origin-isolation/insecure-http.sub.html b/tests/wpt/web-platform-tests/origin-isolation/insecure-http.sub.html index 83df16af455..583ca2f441b 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/insecure-http.sub.html +++ b/tests/wpt/web-platform-tests/origin-isolation/insecure-http.sub.html @@ -7,7 +7,11 @@
diff --git a/tests/wpt/web-platform-tests/origin-isolation/resources/README.md b/tests/wpt/web-platform-tests/origin-isolation/resources/README.md index dd5e192bcd5..9292fe3894e 100644 --- a/tests/wpt/web-platform-tests/origin-isolation/resources/README.md +++ b/tests/wpt/web-platform-tests/origin-isolation/resources/README.md @@ -1,6 +1,6 @@ Why are there `.headers` files here for the `.mjs` scripts? -Because `../getter-sandboxed-iframe.sub.https.html` is testing an opaque origin, -which is cross-origin with these scripts. Since ` diff --git a/tests/wpt/web-platform-tests/signed-exchange/resources/prefetch-test-cert.py b/tests/wpt/web-platform-tests/signed-exchange/resources/prefetch-test-cert.py index 26c24844699..e1dffebe185 100644 --- a/tests/wpt/web-platform-tests/signed-exchange/resources/prefetch-test-cert.py +++ b/tests/wpt/web-platform-tests/signed-exchange/resources/prefetch-test-cert.py @@ -5,7 +5,7 @@ from wptserve.utils import isomorphic_decode def main(request, response): stash_id = request.GET.first(b"id") if request.server.stash.take(stash_id) is not None: - response.status = (404, u"Not Found") + response.status = (404, b"Not Found") response.headers.set(b"Content-Type", b"text/plain") return u"not found" request.server.stash.put(stash_id, True) diff --git a/tests/wpt/web-platform-tests/streams/queuing-strategies-size-function-per-global.window.js b/tests/wpt/web-platform-tests/streams/queuing-strategies-size-function-per-global.window.js new file mode 100644 index 00000000000..0f869f13b34 --- /dev/null +++ b/tests/wpt/web-platform-tests/streams/queuing-strategies-size-function-per-global.window.js @@ -0,0 +1,14 @@ +const iframe = document.createElement('iframe'); +document.body.appendChild(iframe); + +for (const type of ['CountQueuingStrategy', 'ByteLengthQueuingStrategy']) { + test(() => { + const myQs = new window[type]({ highWaterMark: 1 }); + const yourQs = new iframe.contentWindow[type]({ highWaterMark: 1 }); + assert_not_equals(myQs.size, yourQs.size, + 'size should not be the same object'); + }, `${type} size should be different for objects in different realms`); +} + +// Cleanup the document to avoid messing up the result page. +iframe.remove(); diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml b/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml index 657abf1b8e3..9e8e689d816 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml @@ -4,7 +4,7 @@ components: workerType: ci schedulerId: taskcluster-github deadline: "24 hours" - image: webplatformtests/wpt:0.41 + image: webplatformtests/wpt:0.42 maxRunTime: 7200 artifacts: public/results: diff --git a/tests/wpt/web-platform-tests/tools/docker/Dockerfile b/tests/wpt/web-platform-tests/tools/docker/Dockerfile index cf44e13cb1d..6b49393bc87 100644 --- a/tests/wpt/web-platform-tests/tools/docker/Dockerfile +++ b/tests/wpt/web-platform-tests/tools/docker/Dockerfile @@ -20,6 +20,7 @@ RUN apt-get -qqy update \ libvirt-daemon-system \ libvirt-clients \ libunwind8 \ + libxcb-shape0-dev \ locales \ openjdk-8-jre-headless \ pulseaudio \ diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt index 176705f3af5..2731feda5c0 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt @@ -5,6 +5,6 @@ mozleak==0.2 moznetwork==1.1.0 mozprocess==1.0.0 mozprofile==2.5.0 -mozrunner==7.8.0 +mozrunner==8.0.0 mozversion==2.3.0 psutil==5.7.0 diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py index 76200c1f938..120488aa7b3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py @@ -131,11 +131,11 @@ def test_get_cookie_with_same_site_flag(session, url, same_site): assert isinstance(cookie, dict) assert "name" in cookie - assert isinstance(cookie["name"], basestring) + assert isinstance(cookie["name"], text_type) assert "value" in cookie - assert isinstance(cookie["value"], basestring) + assert isinstance(cookie["value"], text_type) assert "sameSite" in cookie - assert isinstance(cookie["sameSite"], basestring) + assert isinstance(cookie["sameSite"], text_type) assert cookie["name"] == "foo" assert cookie["value"] == "bar" diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py index 28eaf29f737..3dd64ca456f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py @@ -19,8 +19,8 @@ def test_tripleclick_at_coordinates(session, mouse_chain): div = session.find.css("div", all=False) div_rect = div.rect div_centre = { - "x": div_rect["x"] + div_rect["width"]/2, - "y": div_rect["y"] + div_rect["height"]/2 + "x": div_rect["x"] + int(div_rect["width"]/2), + "y": div_rect["y"] + int(div_rect["height"]/2) } mouse_chain \ .pointer_move(div_centre["x"], div_centre["y"]) \ diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/authentication.py b/tests/wpt/web-platform-tests/webdriver/tests/support/authentication.py index 1e88a9e730d..25a8eb95d11 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/authentication.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/authentication.py @@ -16,13 +16,13 @@ def main(request, response): user = request.auth.username password = request.auth.password - if user == "user" and password == "password": - return "Authentication done" + if user == b"user" and password == b"password": + return b"Authentication done" - realm = "test" - if "realm" in request.GET: - realm = request.GET.first("realm") + realm = b"test" + if b"realm" in request.GET: + realm = request.GET.first(b"realm") - return ((401, "Unauthorized"), - [("WWW-Authenticate", 'Basic realm="' + realm + '"')], - "Please login with credentials 'user' and 'password'") + return ((401, b"Unauthorized"), + [(b"WWW-Authenticate", b'Basic realm="' + realm + b'"')], + b"Please login with credentials 'user' and 'password'") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py b/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py index 15bc26e54c6..d23ca75d1c8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py @@ -68,22 +68,22 @@ def iframe(src, **kwargs): def main(request, response): - doc = request.GET.first("doc", None) - mime = request.GET.first("mime", None) - charset = request.GET.first("charset", None) + doc = request.GET.first(b"doc", None) + mime = request.GET.first(b"mime", None) + charset = request.GET.first(b"charset", None) if doc is None: - return 404, [("Content-Type", - "text/plain")], "Missing doc parameter in query" + return 404, [(b"Content-Type", + b"text/plain")], b"Missing doc parameter in query" content_type = [] if mime is not None: content_type.append(mime) if charset is not None: - content_type.append("charset={}".format(charset)) + content_type.append(b"charset=%s" % charset) - headers = {"X-XSS-Protection": "0"} + headers = {b"X-XSS-Protection": b"0"} if len(content_type) > 0: - headers["Content-Type"] = ";".join(content_type) + headers[b"Content-Type"] = b";".join(content_type) return 200, headers.items(), doc diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub.html new file mode 100644 index 00000000000..ae2369394e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub.html @@ -0,0 +1,45 @@ + + +The current page being cross-origin must prevent the BroadcastChannel message from being seen + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/broadcastchannel-incumbent.sub.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/broadcastchannel-incumbent.sub.html new file mode 100644 index 00000000000..31a4221c1db --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/broadcastchannel-incumbent.sub.html @@ -0,0 +1,34 @@ + + +The incumbent page being cross-origin must not prevent the BroadcastChannel message from being seen + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/messageport-current.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/messageport-current.html new file mode 100644 index 00000000000..ee172c6138d --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/messageport-current.html @@ -0,0 +1,39 @@ + + +Making the current page become non-active must prevent message transmission + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/messageport-incumbent.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/messageport-incumbent.html new file mode 100644 index 00000000000..4d47fb8124b --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/messageport-incumbent.html @@ -0,0 +1,35 @@ + + +Making the incumbent page become non-active must not prevent message transmission + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/current-document-domain.sub.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/current-document-domain.sub.html new file mode 100644 index 00000000000..1b15f72ca48 --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/current-document-domain.sub.html @@ -0,0 +1,10 @@ + + +Current page used as a test helper + +

Current

+ + diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/current.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/current.html new file mode 100644 index 00000000000..d05709dd439 --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/current.html @@ -0,0 +1,5 @@ + + +Current page used as a test helper + +

Current

diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/incumbent-document-domain.sub.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/incumbent-document-domain.sub.html new file mode 100644 index 00000000000..4791c29be7c --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/incumbent-document-domain.sub.html @@ -0,0 +1,14 @@ + + +Incumbent page used as a test helper + +

Incumbent

+ + diff --git a/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/incumbent.html b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/incumbent.html new file mode 100644 index 00000000000..a06e93c7ab4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/multi-globals/support/incumbent.html @@ -0,0 +1,13 @@ + + +Incumbent page used as a test helper + +

Incumbent

+ + diff --git a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-header-sorted.py b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-header-sorted.py index e40da43fe3d..4e708a9d6b5 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-header-sorted.py +++ b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-header-sorted.py @@ -1,18 +1,18 @@ def main(request, response): - response.headers.set('Cache-Control', 'no-store') - response.headers.set('Access-Control-Allow-Origin', - request.headers.get('origin')) + response.headers.set(b'Cache-Control', b'no-store') + response.headers.set(b'Access-Control-Allow-Origin', + request.headers.get(b'origin')) - headers = 'x-custom-s,x-custom-test,x-custom-u,x-custom-ua,x-custom-v' - if request.method == 'OPTIONS': - response.headers.set('Access-Control-Max-Age', '0') - response.headers.set('Access-Control-Allow-Headers', headers) + headers = b'x-custom-s,x-custom-test,x-custom-u,x-custom-ua,x-custom-v' + if request.method == u'OPTIONS': + response.headers.set(b'Access-Control-Max-Age', b'0') + response.headers.set(b'Access-Control-Allow-Headers', headers) # Access-Control-Request-Headers should be sorted. - if headers != request.headers.get('Access-Control-Request-Headers'): + if headers != request.headers.get(b'Access-Control-Request-Headers'): response.status = 400 else: - if request.headers.get('x-custom-s'): - response.content = 'PASS' + if request.headers.get(b'x-custom-s'): + response.content = b'PASS' else: response.status = 400 - response.content = 'FAIL' + response.content = b'FAIL' diff --git a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-headers-origin.py b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-headers-origin.py index 6fbb96e557b..b8fb22050aa 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-headers-origin.py +++ b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-headers-origin.py @@ -1,12 +1,12 @@ def main(request, response): - response.headers.set("Cache-Control", "no-store") - response.headers.set("Access-Control-Allow-Origin", "*") + response.headers.set(b"Cache-Control", b"no-store") + response.headers.set(b"Access-Control-Allow-Origin", b"*") - if request.method == "OPTIONS": - if "origin" in request.headers.get("Access-Control-Request-Headers").lower(): + if request.method == u"OPTIONS": + if b"origin" in request.headers.get(b"Access-Control-Request-Headers").lower(): response.status = 400 - response.content = "Error: 'origin' included in Access-Control-Request-Headers" + response.content = b"Error: 'origin' included in Access-Control-Request-Headers" else: - response.headers.set("Access-Control-Allow-Headers", "x-pass") + response.headers.set(b"Access-Control-Allow-Headers", b"x-pass") else: - response.content = request.headers.get("x-pass") + response.content = request.headers.get(b"x-pass") diff --git a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-invalid-status.py b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-invalid-status.py index e613229eed7..2a59059cc66 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-invalid-status.py +++ b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-invalid-status.py @@ -1,16 +1,16 @@ def main(request, response): try: - code = int(request.GET.first("code", None)) + code = int(request.GET.first(b"code", None)) except: code = None - if request.method == "OPTIONS": + if request.method == u"OPTIONS": if code: response.status = code - response.headers.set("Access-Control-Max-Age", 1) - response.headers.set("Access-Control-Allow-Headers", "x-pass") + response.headers.set(b"Access-Control-Max-Age", 1) + response.headers.set(b"Access-Control-Allow-Headers", b"x-pass") else: response.status = 200 - response.headers.set("Cache-Control", "no-store") - response.headers.set("Access-Control-Allow-Origin", request.headers.get("origin")) + response.headers.set(b"Cache-Control", b"no-store") + response.headers.set(b"Access-Control-Allow-Origin", request.headers.get(b"origin")) diff --git a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-must-not-contain-cookie.py b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-must-not-contain-cookie.py index eb49bf562d1..89a0451dd4e 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-must-not-contain-cookie.py +++ b/tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-request-must-not-contain-cookie.py @@ -1,12 +1,12 @@ def main(request, response): - if request.method == "OPTIONS" and request.cookies.get("foo"): + if request.method == u"OPTIONS" and request.cookies.get(b"foo"): response.status = 400 else: - response.headers.set("Cache-Control", "no-store") - response.headers.set("Access-Control-Allow-Origin", request.headers.get("origin")) - response.headers.set("Access-Control-Allow-Credentials", "true") - response.headers.set("Access-Control-Allow-Headers", "X-Proprietary-Header") - response.headers.set("Connection", "close") + response.headers.set(b"Cache-Control", b"no-store") + response.headers.set(b"Access-Control-Allow-Origin", request.headers.get(b"origin")) + response.headers.set(b"Access-Control-Allow-Credentials", b"true") + response.headers.set(b"Access-Control-Allow-Headers", b"X-Proprietary-Header") + response.headers.set(b"Connection", b"close") - if request.cookies.get("foo"): - response.content = request.cookies["foo"].value + if request.cookies.get(b"foo"): + response.content = request.cookies[b"foo"].value diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth1/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth1/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth1/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth1/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth10/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth10/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth10/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth10/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth11/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth11/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth11/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth11/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth2/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth2/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth2/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth2/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth2/corsenabled.py b/tests/wpt/web-platform-tests/xhr/resources/auth2/corsenabled.py index b06bd3d9aac..bec6687dbe9 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth2/corsenabled.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth2/corsenabled.py @@ -1,17 +1,18 @@ import imp import os -here = os.path.dirname(__file__) +from wptserve.utils import isomorphic_decode +here = os.path.dirname(isomorphic_decode(__file__)) def main(request, response): - response.headers.set('Access-Control-Allow-Origin', request.headers.get("origin")) - response.headers.set('Access-Control-Allow-Credentials', 'true') - response.headers.set('Access-Control-Allow-Methods', 'GET') - response.headers.set('Access-Control-Allow-Headers', 'authorization, x-user, x-pass') - response.headers.set('Access-Control-Expose-Headers', 'x-challenge, xhr-user, ses-user') - auth = imp.load_source("", os.path.abspath(os.path.join(here, os.pardir, "authentication.py"))) - if request.method == "OPTIONS": - return "" + response.headers.set(b'Access-Control-Allow-Origin', request.headers.get(b"origin")) + response.headers.set(b'Access-Control-Allow-Credentials', b'true') + response.headers.set(b'Access-Control-Allow-Methods', b'GET') + response.headers.set(b'Access-Control-Allow-Headers', b'authorization, x-user, x-pass') + response.headers.set(b'Access-Control-Expose-Headers', b'x-challenge, xhr-user, ses-user') + auth = imp.load_source(u"", os.path.abspath(os.path.join(here, os.pardir, u"authentication.py"))) + if request.method == u"OPTIONS": + return b"" else: return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth3/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth3/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth3/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth3/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth4/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth4/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth4/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth4/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth5/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth5/auth.py index bc739f5eb59..e18319e3de8 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth5/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth5/auth.py @@ -1,13 +1,15 @@ +from wptserve.utils import isomorphic_decode + def main(request, response): - if request.auth.username == 'usr' and request.auth.password == 'secret': - response.headers.set('Content-type', 'text/plain') - content = "" + if request.auth.username == b'usr' and request.auth.password == b'secret': + response.headers.set(b'Content-type', b'text/plain') + content = b"" else: response.status = 401 - response.headers.set('Status', '401 Authorization required') - response.headers.set('WWW-Authenticate', 'Basic realm="test"') - content = 'User name/password wrong or not given: ' + response.headers.set(b'Status', b'401 Authorization required') + response.headers.set(b'WWW-Authenticate', b'Basic realm="test"') + content = b'User name/password wrong or not given: ' - content += "%s\n%s" % (request.auth.username, - request.auth.password) + content += b"%s\n%s" % (request.auth.username, + request.auth.password) return content diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth6/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth6/auth.py index bc739f5eb59..e18319e3de8 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth6/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth6/auth.py @@ -1,13 +1,15 @@ +from wptserve.utils import isomorphic_decode + def main(request, response): - if request.auth.username == 'usr' and request.auth.password == 'secret': - response.headers.set('Content-type', 'text/plain') - content = "" + if request.auth.username == b'usr' and request.auth.password == b'secret': + response.headers.set(b'Content-type', b'text/plain') + content = b"" else: response.status = 401 - response.headers.set('Status', '401 Authorization required') - response.headers.set('WWW-Authenticate', 'Basic realm="test"') - content = 'User name/password wrong or not given: ' + response.headers.set(b'Status', b'401 Authorization required') + response.headers.set(b'WWW-Authenticate', b'Basic realm="test"') + content = b'User name/password wrong or not given: ' - content += "%s\n%s" % (request.auth.username, - request.auth.password) + content += b"%s\n%s" % (request.auth.username, + request.auth.password) return content diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth7/corsenabled.py b/tests/wpt/web-platform-tests/xhr/resources/auth7/corsenabled.py index 998922d0760..7a060627b70 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth7/corsenabled.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth7/corsenabled.py @@ -1,18 +1,20 @@ import imp import os -here = os.path.dirname(__file__) +from wptserve.utils import isomorphic_decode + +here = os.path.dirname(isomorphic_decode(__file__)) def main(request, response): - response.headers.set('Access-Control-Allow-Origin', request.headers.get("origin")) - response.headers.set('Access-Control-Allow-Credentials', 'true') - response.headers.set('Access-Control-Allow-Methods', 'GET') - response.headers.set('Access-Control-Allow-Headers', 'authorization, x-user, x-pass') - response.headers.set('Access-Control-Expose-Headers', 'x-challenge, xhr-user, ses-user') - auth = imp.load_source("", os.path.join(here, - os.pardir, - "authentication.py")) - if request.method == "OPTIONS": - return "" + response.headers.set(b'Access-Control-Allow-Origin', request.headers.get(b"origin")) + response.headers.set(b'Access-Control-Allow-Credentials', b'true') + response.headers.set(b'Access-Control-Allow-Methods', b'GET') + response.headers.set(b'Access-Control-Allow-Headers', b'authorization, x-user, x-pass') + response.headers.set(b'Access-Control-Expose-Headers', b'x-challenge, xhr-user, ses-user') + auth = imp.load_source(u"", os.path.join(here, + os.pardir, + u"authentication.py")) + if request.method == u"OPTIONS": + return b"" else: return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth8/corsenabled-no-authorize.py b/tests/wpt/web-platform-tests/xhr/resources/auth8/corsenabled-no-authorize.py index 947422fbfc5..af8e7c4c170 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth8/corsenabled-no-authorize.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth8/corsenabled-no-authorize.py @@ -1,19 +1,20 @@ import imp import os -here = os.path.dirname(__file__) +from wptserve.utils import isomorphic_decode +here = os.path.dirname(isomorphic_decode(__file__)) def main(request, response): - response.headers.set('Access-Control-Allow-Origin', request.headers.get("origin")) - response.headers.set('Access-Control-Allow-Credentials', 'true') - response.headers.set('Access-Control-Allow-Methods', 'GET') - response.headers.set('Access-Control-Allow-Headers', 'x-user, x-pass') - response.headers.set('Access-Control-Expose-Headers', 'x-challenge, xhr-user, ses-user') - auth = imp.load_source("", os.path.join(here, - os.pardir, - "authentication.py")) - if request.method == "OPTIONS": - return "" + response.headers.set(b'Access-Control-Allow-Origin', request.headers.get(b"origin")) + response.headers.set(b'Access-Control-Allow-Credentials', b'true') + response.headers.set(b'Access-Control-Allow-Methods', b'GET') + response.headers.set(b'Access-Control-Allow-Headers', b'x-user, x-pass') + response.headers.set(b'Access-Control-Expose-Headers', b'x-challenge, xhr-user, ses-user') + auth = imp.load_source(u"", os.path.join(here, + os.pardir, + u"authentication.py")) + if request.method == u"OPTIONS": + return b"" else: return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/auth9/auth.py b/tests/wpt/web-platform-tests/xhr/resources/auth9/auth.py index 8b6682686c8..5ef36933609 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/auth9/auth.py +++ b/tests/wpt/web-platform-tests/xhr/resources/auth9/auth.py @@ -1,10 +1,12 @@ import imp import os -here = os.path.split(os.path.abspath(__file__))[0] +from wptserve.utils import isomorphic_decode + +here = os.path.split(os.path.abspath(isomorphic_decode(__file__)))[0] def main(request, response): - auth = imp.load_source("", os.path.join(here, - "..", - "authentication.py")) + auth = imp.load_source(u"", os.path.join(here, + u"..", + u"authentication.py")) return auth.main(request, response) diff --git a/tests/wpt/web-platform-tests/xhr/resources/authentication.py b/tests/wpt/web-platform-tests/xhr/resources/authentication.py index 618d285cf6e..50b5c801d61 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/authentication.py +++ b/tests/wpt/web-platform-tests/xhr/resources/authentication.py @@ -1,24 +1,24 @@ def main(request, response): session_user = request.auth.username session_pass = request.auth.password - expected_user_name = request.headers.get("X-User", None) + expected_user_name = request.headers.get(b"X-User", None) token = expected_user_name if session_user is None and session_pass is None: if token is not None and request.server.stash.take(token) is not None: - return 'FAIL (did not authorize)' + return b'FAIL (did not authorize)' else: if token is not None: - request.server.stash.put(token, "1") - status = (401, 'Unauthorized') - headers = [('WWW-Authenticate', 'Basic realm="test"')] - return status, headers, 'FAIL (should be transparent)' + request.server.stash.put(token, b"1") + status = (401, b'Unauthorized') + headers = [(b'WWW-Authenticate', b'Basic realm="test"')] + return status, headers, b'FAIL (should be transparent)' else: - if request.server.stash.take(token) == "1": - challenge = "DID" + if request.server.stash.take(token) == b"1": + challenge = b"DID" else: - challenge = "DID-NOT" - headers = [('XHR-USER', expected_user_name), - ('SES-USER', session_user), - ("X-challenge", challenge)] - return headers, session_user + "\n" + session_pass + challenge = b"DID-NOT" + headers = [(b'XHR-USER', expected_user_name), + (b'SES-USER', session_user), + (b"X-challenge", challenge)] + return headers, session_user + b"\n" + session_pass diff --git a/tests/wpt/web-platform-tests/xhr/resources/chunked.py b/tests/wpt/web-platform-tests/xhr/resources/chunked.py index 1e87c1ca561..6f67d9097f9 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/chunked.py +++ b/tests/wpt/web-platform-tests/xhr/resources/chunked.py @@ -1,17 +1,17 @@ def main(request, response): - chunks = ["First chunk\r\n", - "Second chunk\r\n", - "Yet another (third) chunk\r\n", - "Yet another (fourth) chunk\r\n", - ] - response.headers.set("Transfer-Encoding", "chunked") - response.headers.set("Trailer", "X-Test-Me") - response.headers.set("Content-Type", "text/plain") + chunks = [b"First chunk\r\n", + b"Second chunk\r\n", + b"Yet another (third) chunk\r\n", + b"Yet another (fourth) chunk\r\n", + ] + response.headers.set(b"Transfer-Encoding", b"chunked") + response.headers.set(b"Trailer", b"X-Test-Me") + response.headers.set(b"Content-Type", b"text/plain") response.write_status_headers() for value in chunks: - response.writer.write("%x\r\n" % len(value)) + response.writer.write(b"%x\r\n" % len(value)) response.writer.write(value) - response.writer.write("\r\n") - response.writer.write("0\r\n") - response.writer.write("X-Test-Me: Trailer header value\r\n\r\n") + response.writer.write(b"\r\n") + response.writer.write(b"0\r\n") + response.writer.write(b"X-Test-Me: Trailer header value\r\n\r\n") diff --git a/tests/wpt/web-platform-tests/xhr/resources/conditional.py b/tests/wpt/web-platform-tests/xhr/resources/conditional.py index 5a11a31a4d6..2c248305e69 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/conditional.py +++ b/tests/wpt/web-platform-tests/xhr/resources/conditional.py @@ -1,29 +1,29 @@ def main(request, response): - tag = request.GET.first("tag", None) - match = request.headers.get("If-None-Match", None) - date = request.GET.first("date", "") - modified = request.headers.get("If-Modified-Since", None) - cors = request.GET.first("cors", None) + tag = request.GET.first(b"tag", None) + match = request.headers.get(b"If-None-Match", None) + date = request.GET.first(b"date", b"") + modified = request.headers.get(b"If-Modified-Since", None) + cors = request.GET.first(b"cors", None) - if request.method == "OPTIONS": - response.headers.set("Access-Control-Allow-Origin", "*") - response.headers.set("Access-Control-Allow-Headers", "IF-NONE-MATCH") - return "" + if request.method == u"OPTIONS": + response.headers.set(b"Access-Control-Allow-Origin", b"*") + response.headers.set(b"Access-Control-Allow-Headers", b"IF-NONE-MATCH") + return b"" if tag: - response.headers.set("ETag", '"%s"' % tag) + response.headers.set(b"ETag", b'"%s"' % tag) elif date: - response.headers.set("Last-Modified", date) + response.headers.set(b"Last-Modified", date) if cors: - response.headers.set("Access-Control-Allow-Origin", "*") + response.headers.set(b"Access-Control-Allow-Origin", b"*") if ((match is not None and match == tag) or (modified is not None and modified == date)): - response.status = (304, "SUPERCOOL") - return "" + response.status = (304, b"SUPERCOOL") + return b"" else: if not cors: - response.headers.set("Access-Control-Allow-Origin", "*") - response.headers.set("Content-Type", "text/plain") - return "MAYBE NOT" + response.headers.set(b"Access-Control-Allow-Origin", b"*") + response.headers.set(b"Content-Type", b"text/plain") + return b"MAYBE NOT" diff --git a/tests/wpt/web-platform-tests/xhr/resources/content.py b/tests/wpt/web-platform-tests/xhr/resources/content.py index 3786f3aa075..764ca367bbc 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/content.py +++ b/tests/wpt/web-platform-tests/xhr/resources/content.py @@ -1,17 +1,19 @@ +from wptserve.utils import isomorphic_encode + def main(request, response): - response_ctype = '' + response_ctype = b'' - if "response_charset_label" in request.GET: - response_ctype = ";charset=" + request.GET.first("response_charset_label") + if b"response_charset_label" in request.GET: + response_ctype = b";charset=" + request.GET.first(b"response_charset_label") - headers = [("Content-type", "text/plain" + response_ctype), - ("X-Request-Method", request.method), - ("X-Request-Query", request.url_parts.query if request.url_parts.query else "NO"), - ("X-Request-Content-Length", request.headers.get("Content-Length", "NO")), - ("X-Request-Content-Type", request.headers.get("Content-Type", "NO"))] + headers = [(b"Content-type", b"text/plain" + response_ctype), + (b"X-Request-Method", isomorphic_encode(request.method)), + (b"X-Request-Query", isomorphic_encode(request.url_parts.query) if request.url_parts.query else b"NO"), + (b"X-Request-Content-Length", request.headers.get(b"Content-Length", b"NO")), + (b"X-Request-Content-Type", request.headers.get(b"Content-Type", b"NO"))] - if "content" in request.GET: - content = request.GET.first("content") + if b"content" in request.GET: + content = request.GET.first(b"content") else: content = request.body diff --git a/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py b/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py index 68cece452c9..e0db9feeab0 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py +++ b/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py @@ -1,5 +1,7 @@ from six import PY3 +from wptserve.utils import isomorphic_encode + def get_response(raw_headers, filter_value, filter_name): result = b"" # Type of raw_headers is in Python 2 and in @@ -11,7 +13,7 @@ def get_response(raw_headers, filter_value, filter_name): # in Python 3. if PY3: header_list = [ - (s + u'\r\n').encode("iso-8859-1") for s in raw_headers.as_string().splitlines() if s + isomorphic_encode(s + u'\r\n') for s in raw_headers.as_string().splitlines() if s ] else: header_list = raw_headers.headers