WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-220364-20210122181310.patch (text/plain), 192.72 KB, created by
Yusuke Suzuki
on 2021-01-22 18:13:10 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2021-01-22 18:13:10 PST
Size:
192.72 KB
patch
obsolete
>Subversion Revision: 271771 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index c1924b254e438f9dff549141d4810305ff5d3aef..45a0784deee01876c8607117d844feb69a9be2d5 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,15 @@ >+2021-01-22 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ Should SharedArrayBuffer/WebAssembly.Memory really throw? >+ https://bugs.webkit.org/show_bug.cgi?id=220364 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Not accessing "shared" field if Options::useSharedArrayBuffer() is false. >+ >+ * wasm/js/WebAssemblyMemoryConstructor.cpp: >+ (JSC::JSC_DEFINE_HOST_FUNCTION): >+ > 2021-01-22 Keith Miller <keith_miller@apple.com> > > Obj-C API should do correct type checks when using a 32-bit address space >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp >index 847ea8d36f13c8228913bea4c16b5d3bc7da8b68..fd9b0632c11226200abfd68e45fdae2d96bd9ac8 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp >@@ -117,16 +117,16 @@ JSC_DEFINE_HOST_FUNCTION(constructJSWebAssemblyMemory, (JSGlobalObject* globalOb > } > > Wasm::MemorySharingMode sharingMode = Wasm::MemorySharingMode::Default; >- JSValue sharedValue = memoryDescriptor->get(globalObject, Identifier::fromString(vm, "shared")); >- RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >- bool shared = sharedValue.toBoolean(globalObject); >- RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >- if (shared) { >- if (!maximumPageCount) >- return throwVMTypeError(globalObject, throwScope, "'maximum' page count must be defined if 'shared' is true"_s); >- if (!Options::useSharedArrayBuffer()) >- return throwVMTypeError(globalObject, throwScope, "Shared WebAssembly.Memory and SharedArrayBuffer are not enabled"_s); >- sharingMode = Wasm::MemorySharingMode::Shared; >+ if (Options::useSharedArrayBuffer()) { >+ JSValue sharedValue = memoryDescriptor->get(globalObject, Identifier::fromString(vm, "shared")); >+ RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >+ bool shared = sharedValue.toBoolean(globalObject); >+ RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >+ if (shared) { >+ if (!maximumPageCount) >+ return throwVMTypeError(globalObject, throwScope, "'maximum' page count must be defined if 'shared' is true"_s); >+ sharingMode = Wasm::MemorySharingMode::Shared; >+ } > } > > auto* jsMemory = JSWebAssemblyMemory::tryCreate(globalObject, vm, webAssemblyMemoryStructure); >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 568b06404e5bfb7748c55e2e9b1acad16761d5f4..68ab690ec21e02483bfffa0d2047550384f12c97 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,161 @@ >+2021-01-22 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ Should SharedArrayBuffer/WebAssembly.Memory really throw? >+ https://bugs.webkit.org/show_bug.cgi?id=220364 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To update wasm/ and common/sab.js, import wasm and common updates. >+ >+ * resources/import-expectations.json: >+ * web-platform-tests/common/__init__.py: Added. >+ * web-platform-tests/common/echo.py: >+ (main): >+ * web-platform-tests/common/get-host-info.sub.js: >+ (get_host_info): >+ * web-platform-tests/common/redirect-opt-in.py: >+ (main): >+ * web-platform-tests/common/sab.js: >+ (const.createBuffer): >+ * web-platform-tests/common/security-features/README.md: >+ * web-platform-tests/common/security-features/__init__.py: Added. >+ * web-platform-tests/common/security-features/scope/__init__.py: Added. >+ * web-platform-tests/common/security-features/scope/document.py: >+ (main): >+ * web-platform-tests/common/security-features/scope/util.py: >+ (get_template): >+ (__noop): >+ (respond): >+ * web-platform-tests/common/security-features/scope/w3c-import.log: >+ * web-platform-tests/common/security-features/scope/worker.py: >+ (main): >+ * web-platform-tests/common/security-features/subresource/audio.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/document.py: >+ (generate_payload): >+ * web-platform-tests/common/security-features/subresource/empty.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/font.py: >+ (decodebytes): >+ (generate_payload): >+ (generate_report_headers_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/image.py: >+ (Image.save): >+ (encode_string_as_bmp_image): >+ (generate_payload): >+ (generate_report_headers_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/referrer.py: >+ (main): >+ * web-platform-tests/common/security-features/subresource/script.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/shared-worker.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/static-import.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/stylesheet.py: >+ (generate_payload): >+ (generate_import_rule): >+ (generate_report_headers_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/subresource.py: >+ (get_template): >+ (redirect): >+ (__get_swapped_origin_netloc): >+ (create_url): >+ (preprocess_redirection): >+ (preprocess_stash_action): >+ (__noop): >+ (respond): >+ * web-platform-tests/common/security-features/subresource/svg.py: >+ (generate_payload): >+ (generate_payload_embedded): >+ (generate_report_headers_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/video.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/worker.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/subresource/xhr.py: >+ (generate_payload): >+ (main): >+ * web-platform-tests/common/security-features/w3c-import.log: >+ * web-platform-tests/common/slow.py: >+ (main): >+ * web-platform-tests/common/square.png: Added. >+ * web-platform-tests/common/stringifiers.js: >+ * web-platform-tests/common/w3c-import.log: >+ * web-platform-tests/wasm/jsapi/META.yml: Added. >+ * web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt: >+ * web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt: >+ * web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/global/type.tentative.any.html: Added. >+ * web-platform-tests/wasm/jsapi/global/type.tentative.any.js: Added. >+ (assert_type): >+ (test): >+ (string_appeared_here.test): >+ * web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/global/type.tentative.any.worker.html: Added. >+ * web-platform-tests/wasm/jsapi/global/w3c-import.log: >+ * web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt: >+ * web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt: >+ * web-platform-tests/wasm/jsapi/instanceTestFactory.js: >+ (const.imports.string_appeared_here.string_appeared_here): >+ (return.verify): >+ * web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/memory/type.tentative.any.html: Added. >+ * web-platform-tests/wasm/jsapi/memory/type.tentative.any.js: Added. >+ (assert_type): >+ (test): >+ * web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker.html: Added. >+ * web-platform-tests/wasm/jsapi/memory/w3c-import.log: >+ * web-platform-tests/wasm/jsapi/module/exports.any-expected.txt: >+ * web-platform-tests/wasm/jsapi/module/exports.any.js: >+ (test): >+ * web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt: >+ * web-platform-tests/wasm/jsapi/module/imports.any-expected.txt: >+ * web-platform-tests/wasm/jsapi/module/imports.any.js: >+ (test): >+ * web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt: >+ * web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.html: Added. >+ * web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js: Added. >+ (test): >+ * web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker.html: Added. >+ * web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.html: Added. >+ * web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js: Added. >+ (test): >+ * web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt: Added. >+ * web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker.html: Added. >+ * web-platform-tests/wasm/jsapi/table/w3c-import.log: >+ * web-platform-tests/wasm/jsapi/w3c-import.log: >+ * web-platform-tests/wasm/webapi/META.yml: Added. >+ * web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt: >+ * web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt: >+ * web-platform-tests/wasm/webapi/invalid-code.any-expected.txt: >+ * web-platform-tests/wasm/webapi/invalid-code.any.js: >+ (string_appeared_here.Invalid.code): >+ * web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt: >+ * web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt: Added. >+ * web-platform-tests/wasm/webapi/modified-contenttype.any.html: Added. >+ * web-platform-tests/wasm/webapi/modified-contenttype.any.js: Added. >+ (string_appeared_here.forEach.method.promise_test.async t): >+ (string_appeared_here.forEach.method.with.Content.Type.set late): >+ * web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt: Added. >+ * web-platform-tests/wasm/webapi/modified-contenttype.any.worker.html: Added. >+ * web-platform-tests/wasm/webapi/w3c-import.log: >+ > 2021-01-22 Devin Rousso <drousso@apple.com> > > [WPT] [Payment Request] slight adjustment to payment-request/payment-request-constructor-thcrash.https.html >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index 5f4c821fd585dbc56684d589877d6cce55080392..ec35da56d3955252613b794e605af62eb82b6bd0 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -1,446 +1,446 @@ > { >- "LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio": "import", >- "LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/": "import", >- "apng": "import", >- "css/css-animations": "import", >- "css/css-box": "import", >- "css/css-color": "import", >- "css/css-flexbox": "import", >- "css/css-masking/clip-path/": "import", >- "css/css-masking/clip-path/clip-path-with-zoo": "import", >- "css/css-masking/clip-path/clip-path-with-zoom*": "import", >- "css/css-masking/clip-path/clip-path-with-zoom-*": "import", >- "css/css-multicol": "import", >- "css/css-position": "import", >- "css/css-shapes": "import", >- "css/css-sizing": "import", >- "css/css-syntax": "import", >- "css/css-text-decor": "import", >- "css/css-values": "import", >- "css/geometry": "import", >- "css/selectors": "import", >- "css/support": "import", >- "custom-elements": "import", >- "density-size-correction": "import", >- "encrypted-media": "import", >- "imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio": "import", >- "paint-timing/": "import", >- "paint-timing/fcp-only": "import", >- "paint-timing/resources": "import", >- "paint-timing/resources/": "import", >- "resources/testharness.js": "import", >- "shadow-dom": "import", >- "streams": "import", >- "tools": "import", >- "web-animations": "import", >- "web-platform-tests/DOM-parsing": "skip", >- "web-platform-tests/DOMEvents": "skip", >- "web-platform-tests/FileAPI": "import", >- "web-platform-tests/IndexedDB": "import", >- "web-platform-tests/WebCryptoAPI": "import", >- "web-platform-tests/WebIDL": "import", >- "web-platform-tests/WebIDL/invalid": "skip", >- "web-platform-tests/WebIDL/valid": "skip", >- "web-platform-tests/XMLHttpRequest": "import", >- "web-platform-tests/XMLHttpRequest/abort-after-stop.htm": "skip", >- "web-platform-tests/XMLHttpRequest/event-error-order.sub.html": "skip", >- "web-platform-tests/XMLHttpRequest/event-timeout-order.htm": "skip", >- "web-platform-tests/XMLHttpRequest/preserve-ua-header-on-redirect.htm": "skip", >- "web-platform-tests/XMLHttpRequest/send-after-setting-document-domain.htm": "skip", >- "web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm": "skip", >- "web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm": "skip", >- "web-platform-tests/accelerometer": "skip", >- "web-platform-tests/ambient-light": "skip", >- "web-platform-tests/animation-timing": "skip", >- "web-platform-tests/annotation-model": "skip", >- "web-platform-tests/annotation-protocol": "skip", >- "web-platform-tests/annotation-vocab": "skip", >- "web-platform-tests/apng": "skip", >- "web-platform-tests/app-uri": "skip", >- "web-platform-tests/assumptions": "skip", >- "web-platform-tests/audio-output": "import", >- "web-platform-tests/auxclick": "skip", >- "web-platform-tests/background-fetch": "import", >- "web-platform-tests/battery-status": "skip", >- "web-platform-tests/beacon": "import", >- "web-platform-tests/bluetooth": "skip", >- "web-platform-tests/browser-payment-api": "skip", >- "web-platform-tests/clear-site-data": "skip", >- "web-platform-tests/clipboard": "skip", >- "web-platform-tests/clipboard-apis": "import", >- "web-platform-tests/common": "import", >- "web-platform-tests/compat": "import", >- "web-platform-tests/console": "import", >- "web-platform-tests/content-security-policy": "import", >- "web-platform-tests/cookies": "skip", >- "web-platform-tests/cookies/resources": "import", >- "web-platform-tests/cookies/secure": "import", >- "web-platform-tests/core-aam": "skip", >- "web-platform-tests/cors": "import", >- "web-platform-tests/credential-management": "import", >- "web-platform-tests/css": "skip", >- "web-platform-tests/css-backgrounds": "skip", >- "web-platform-tests/css-font-display": "skip", >- "web-platform-tests/css-font-loading": "skip", >- "web-platform-tests/css-fonts": "skip", >- "web-platform-tests/css-paint-api": "skip", >- "web-platform-tests/css-scoping": "skip", >- "web-platform-tests/css-scroll-anchoring": "skip", >- "web-platform-tests/css-timing": "skip", >- "web-platform-tests/css-typed-om": "skip", >- "web-platform-tests/css-values": "skip", >- "web-platform-tests/css/WOFF2": "import", >- "web-platform-tests/css/css-align": "import", >- "web-platform-tests/css/css-animations": "import", >- "web-platform-tests/css/css-animations/": "import", >- "web-platform-tests/css/css-backgrounds": "import", >- "web-platform-tests/css/css-cascade": "import", >- "web-platform-tests/css/css-color": "import", >- "web-platform-tests/css/css-content": "import", >- "web-platform-tests/css/css-display": "import", >- "web-platform-tests/css/css-easing": "import", >- "web-platform-tests/css/css-flexbox": "import", >- "web-platform-tests/css/css-font-loading": "import", >- "web-platform-tests/css/css-fonts": "import", >- "web-platform-tests/css/css-fonts/math-script-level-and-math-style/": "import", >- "web-platform-tests/css/css-grid": "import", >- "web-platform-tests/css/css-grid/abspos": "import", >- "web-platform-tests/css/css-grid/alignment/": "import", >- "web-platform-tests/css/css-grid/grid-definition/": "import", >- "web-platform-tests/css/css-grid/grid-items/": "import", >- "web-platform-tests/css/css-grid/layout-algorithm": "import", >- "web-platform-tests/css/css-grid/layout-algorithm/": "import", >- "web-platform-tests/css/css-grid/parsing/": "import", >- "web-platform-tests/css/css-images": "import", >- "web-platform-tests/css/css-lists": "import", >- "web-platform-tests/css/css-lists/parsing": "import", >- "web-platform-tests/css/css-logical": "import", >- "web-platform-tests/css/css-multicol": "import", >- "web-platform-tests/css/css-overflow": "import", >- "web-platform-tests/css/css-overscroll-behavior": "import", >- "web-platform-tests/css/css-properties-values-api": "import", >- "web-platform-tests/css/css-pseudo": "import", >- "web-platform-tests/css/css-scoping": "import", >- "web-platform-tests/css/css-scroll-snap": "import", >- "web-platform-tests/css/css-shadow-parts": "import", >- "web-platform-tests/css/css-shapes": "import", >- "web-platform-tests/css/css-shapes/test-plan/index.html": "skip", >- "web-platform-tests/css/css-sizing/aspect-ratio": "import", >- "web-platform-tests/css/css-text": "import", >- "web-platform-tests/css/css-transitions": "import", >- "web-platform-tests/css/css-ui": "import", >- "web-platform-tests/css/css-variables": "import", >- "web-platform-tests/css/css-writing-modes": "import", >- "web-platform-tests/css/cssom": "import", >- "web-platform-tests/css/cssom-view/": "import", >- "web-platform-tests/css/geometry/": "import", >- "web-platform-tests/css/mediaqueries": "import", >- "web-platform-tests/css/reference": "import", >- "web-platform-tests/css/resources": "import", >- "web-platform-tests/css/selectors": "import", >- "web-platform-tests/css/support": "import", >- "web-platform-tests/custom-elements": "import", >- "web-platform-tests/custom-elements/v0": "skip", >- "web-platform-tests/docs": "import", >- "web-platform-tests/dom": "import", >- "web-platform-tests/dom/events": "import", >- "web-platform-tests/dom/events/scrolling": "import", >- "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html": "skip", >- "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg": "skip", >- "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml": "skip", >- "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml": "skip", >- "web-platform-tests/dom/nodes/Document-createProcessingInstruction.xhtml": "skip", >- "web-platform-tests/dom/nodes/Document-getElementsByTagName.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-childElement-null-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElement-null.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElement-null.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-nochild-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-nochild.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount.svg": "skip", >- "web-platform-tests/dom/nodes/Element-childElementCount.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild-entity.svg": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild-entity.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild-namespace-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild-namespace.svg": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild-namespace.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-firstElementChild.svg": "skip", >- "web-platform-tests/dom/nodes/Element-lastElementChild-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-lastElementChild.svg": "skip", >- "web-platform-tests/dom/nodes/Element-lastElementChild.xhtml": "skip", >- "web-platform-tests/dom/nodes/Element-nextElementSibling-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-nextElementSibling.svg": "skip", >- "web-platform-tests/dom/nodes/Element-previousElementSibling-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-previousElementSibling.svg": "skip", >- "web-platform-tests/dom/nodes/Element-siblingElement-null-svg.svg": "skip", >- "web-platform-tests/dom/nodes/Element-siblingElement-null.svg": "skip", >- "web-platform-tests/dom/nodes/Element-siblingElement-null.xhtml": "skip", >- "web-platform-tests/dom/nodes/Node-nodeName.xhtml": "skip", >- "web-platform-tests/dom/nodes/ParentNode-querySelector-All.xht": "skip", >- "web-platform-tests/dom/traversal": "import", >- "web-platform-tests/dom/traversal/unfinished": "skip", >- "web-platform-tests/domparsing": "import", >- "web-platform-tests/domxpath": "import", >- "web-platform-tests/domxpath/xml_xpath_runner.html": "skip", >- "web-platform-tests/domxpath/xml_xpath_tests.xml": "skip", >- "web-platform-tests/dpub-aam": "skip", >- "web-platform-tests/dpub-aria": "skip", >- "web-platform-tests/editing": "skip", >- "web-platform-tests/encoding": "import", >- "web-platform-tests/encrypted-media": "import", >- "web-platform-tests/encrypted-media/Google": "skip", >- "web-platform-tests/entries-api": "import", >- "web-platform-tests/eventsource": "import", >- "web-platform-tests/ext-xhtml-pubid": "skip", >- "web-platform-tests/feature-policy": "skip", >- "web-platform-tests/feature-policy/resources": "import", >- "web-platform-tests/feature-policy/resources/": "import", >- "web-platform-tests/fetch": "import", >- "web-platform-tests/fetch/api": "import", >- "web-platform-tests/fetch/api/cors": "import", >- "web-platform-tests/fetch/api/redirect": "import", >- "web-platform-tests/fetch/api/resources": "import", >- "web-platform-tests/fetch/origin": "import", >- "web-platform-tests/fetch/range": "import", >- "web-platform-tests/fetch/stale-while-revalidate": "import", >- "web-platform-tests/fullscreen": "skip", >- "web-platform-tests/gamepad": "skip", >- "web-platform-tests/generic-sensor": "skip", >- "web-platform-tests/geolocation-API": "import", >- "web-platform-tests/gyroscope": "skip", >- "web-platform-tests/hr-time": "import", >- "web-platform-tests/html": "import", >- "web-platform-tests/html-imports": "skip", >- "web-platform-tests/html-longdesc": "skip", >- "web-platform-tests/html-media-capture": "skip", >- "web-platform-tests/html/browsers": "import", >- "web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name.html": "skip", >- "web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin_2.html": "skip", >- "web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin_3.html": "skip", >- "web-platform-tests/html/browsers/history/joint-session-history": "skip", >- "web-platform-tests/html/browsers/history/the-history-interface/001.html": "skip", >- "web-platform-tests/html/browsers/history/the-history-interface/002.html": "skip", >- "web-platform-tests/html/browsers/history/the-history-interface/combination_history_002.html": "skip", >- "web-platform-tests/html/browsers/history/the-history-interface/combination_history_003.html": "skip", >- "web-platform-tests/html/browsers/history/the-history-interface/traverse_the_history_3.html": "skip", >- "web-platform-tests/html/browsers/history/the-location-interface/assign_after_load.html": "skip", >- "web-platform-tests/html/browsers/history/the-location-interface/assign_before_load.html": "skip", >- "web-platform-tests/html/browsers/history/the-location-interface/location_assign.html": "skip", >- "web-platform-tests/html/browsers/offline/application-cache-api": "skip", >- "web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.sub.html": "skip", >- "web-platform-tests/html/browsers/sandboxing": "skip", >- "web-platform-tests/html/browsers/the-window-object": "import", >- "web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/": "import", >- "web-platform-tests/html/browsers/windows/browsing-context-first-created.xhtml": "skip", >- "web-platform-tests/html/browsers/windows/browsing-context-names": "import", >- "web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html": "skip", >- "web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.html": "skip", >- "web-platform-tests/html/canvas": "import", >- "web-platform-tests/html/canvas/element": "import", >- "web-platform-tests/html/canvas/offscreen": "import", >- "web-platform-tests/html/canvas/resources": "import", >- "web-platform-tests/html/canvas/tools": "import", >- "web-platform-tests/html/dom": "import", >- "web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html": "skip", >- "web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters": "skip", >- "web-platform-tests/html/dom/reflection-original.html": "skip", >- "web-platform-tests/html/editing": "import", >- "web-platform-tests/html/iana": "import", >- "web-platform-tests/html/infrastructure": "import", >- "web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers": "skip", >- "web-platform-tests/html/interaction": "import", >- "web-platform-tests/html/interaction/focus/the-autofocus-attribute": "import", >- "web-platform-tests/html/obsolete": "skip", >- "web-platform-tests/html/rendering": "skip", >- "web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/": "import", >- "web-platform-tests/html/resources": "import", >- "web-platform-tests/html/semantics": "import", >- "web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives": "skip", >- "web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh": "import", >- "web-platform-tests/html/semantics/embedded-content": "import", >- "web-platform-tests/html/semantics/embedded-content-0": "skip", >- "web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/audio_loop_base.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/error-codes": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/location-of-the-media-resource/currentSrc.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_progress.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/offsets-into-the-media-resource/currentTime.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document-networkState.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/play-in-detached-document.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-max-value.htm": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/synchronising-multiple-media-elements/media-controllers/task-source.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element": "import", >- "web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors": "skip", >- "web-platform-tests/html/semantics/embedded-content/media-elements/video_loop_base.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-area-element/area_nohref.xhtml": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-area-element/test-area.xhtml": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-canvas-element": "import", >- "web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-iframe-element": "import", >- "web-platform-tests/html/semantics/embedded-content/the-img-element/": "import", >- "web-platform-tests/html/semantics/embedded-content/the-img-element/decode": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data": "skip", >- "web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html": "skip", >- "web-platform-tests/html/semantics/forms/textfieldselection/select-event.html": "skip", >- "web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html": "skip", >- "web-platform-tests/html/semantics/forms/the-textarea-element": "import", >- "web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html": "skip", >- "web-platform-tests/html/semantics/interactive-elements/the-summary-element": "skip", >- "web-platform-tests/html/semantics/links/downloading-resources": "import", >- "web-platform-tests/html/semantics/links/following-hyperlinks": "skip", >- "web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements": "skip", >- "web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing": "skip", >- "web-platform-tests/html/semantics/scripting-1/the-script-element/module": "import", >- "web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event.xhtml": "skip", >- "web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.xhtml": "skip", >- "web-platform-tests/html/semantics/tabular-data": "import", >- "web-platform-tests/html/semantics/tabular-data/processing-model-1": "import", >- "web-platform-tests/html/semantics/text-level-semantics/the-data-element": "skip", >- "web-platform-tests/html/syntax": "import", >- "web-platform-tests/html/the-xhtml-syntax": "import", >- "web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents": "import", >- "web-platform-tests/html/tools": "import", >- "web-platform-tests/html/user-activation": "import", >- "web-platform-tests/html/webappapis": "import", >- "web-platform-tests/html/webappapis/dynamic-insertion": "import", >- "web-platform-tests/html/webappapis/dynamic-markup-insertion": "import", >- "web-platform-tests/html/webappapis/idle-callbacks": "skip", >- "web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_raf.html": "skip", >- "web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections": "skip", >- "web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin": "import", >- "web-platform-tests/http": "skip", >- "web-platform-tests/image-decodes": "skip", >- "web-platform-tests/imagebitmap-renderingcontext": "import", >- "web-platform-tests/images": "import", >- "web-platform-tests/infrastructure": "import", >- "web-platform-tests/innerText": "import", >- "web-platform-tests/input-events": "skip", >- "web-platform-tests/interfaces": "import", >- "web-platform-tests/intersection-observer": "import", >- "web-platform-tests/js": "skip", >- "web-platform-tests/keyboard-lock": "skip", >- "web-platform-tests/loading/lazyload": "import", >- "web-platform-tests/longtask-timing": "skip", >- "web-platform-tests/magnetometer": "skip", >- "web-platform-tests/mathml": "import", >- "web-platform-tests/media-capabilities": "skip", >- "web-platform-tests/media-source": "import", >- "web-platform-tests/media/": "import", >- "web-platform-tests/mediacapture-image": "skip", >- "web-platform-tests/mediacapture-record": "import", >- "web-platform-tests/mediacapture-streams": "import", >- "web-platform-tests/mediacapture-streams/": "import", >- "web-platform-tests/mediasession": "import", >- "web-platform-tests/microdata": "skip", >- "web-platform-tests/mimesniff": "import", >- "web-platform-tests/mixed-content": "skip", >- "web-platform-tests/mst-content-hint": "import", >- "web-platform-tests/navigation-timing": "skip", >- "web-platform-tests/netinfo": "skip", >- "web-platform-tests/notifications": "import", >- "web-platform-tests/old-tests": "skip", >- "web-platform-tests/orientation-event": "skip", >- "web-platform-tests/orientation-sensor": "skip", >- "web-platform-tests/page-visibility": "import", >- "web-platform-tests/paint-timing": "skip", >- "web-platform-tests/payment-handler": "skip", >- "web-platform-tests/payment-method-basic-card": "skip", >- "web-platform-tests/payment-method-id": "skip", >- "web-platform-tests/payment-request": "import", >- "web-platform-tests/performance-timeline": "skip", >- "web-platform-tests/picture-in-picture": "import", >- "web-platform-tests/pointerevents": "import", >- "web-platform-tests/pointerlock": "skip", >- "web-platform-tests/preload": "skip", >- "web-platform-tests/presentation-api": "skip", >- "web-platform-tests/progress-events": "skip", >- "web-platform-tests/proximity": "skip", >- "web-platform-tests/quirks-mode": "skip", >- "web-platform-tests/quirks/unitless-length": "import", >- "web-platform-tests/referrer-policy": "import", >- "web-platform-tests/remote-playback": "import", >- "web-platform-tests/requestidlecallback": "import", >- "web-platform-tests/resize-observer": "import", >- "web-platform-tests/resize-observer/": "import", >- "web-platform-tests/resource-timing": "import", >- "web-platform-tests/resources": "import", >- "web-platform-tests/resources/chromium": "skip", >- "web-platform-tests/resources/test": "skip", >- "web-platform-tests/screen-orientation": "skip", >- "web-platform-tests/scroll-anchoring": "skip", >- "web-platform-tests/scroll-into-view": "skip", >- "web-platform-tests/secure-contexts": "import", >- "web-platform-tests/selection": "skip", >- "web-platform-tests/selectors": "skip", >- "web-platform-tests/selectors-api": "skip", >- "web-platform-tests/server-timing": "import", >- "web-platform-tests/service-workers": "import", >- "web-platform-tests/shadow-dom": "import", >- "web-platform-tests/shadow-dom/untriaged": "skip", >- "web-platform-tests/speech-api": "import", >- "web-platform-tests/staticrange": "skip", >- "web-platform-tests/storage": "skip", >- "web-platform-tests/streams": "import", >- "web-platform-tests/streams/writable-streams": "skip", >- "web-platform-tests/subresource-integrity": "import", >- "web-platform-tests/svg": "import", >- "web-platform-tests/svg-aam": "skip", >- "web-platform-tests/test/html/infrastructure": "import", >- "web-platform-tests/testharness_runner.html": "skip", >- "web-platform-tests/tools": "import", >- "web-platform-tests/tools/__init__.py": "import", >- "web-platform-tests/tools/html5lib": "import", >- "web-platform-tests/tools/localpaths.py": "import", >- "web-platform-tests/tools/manifest": "import", >- "web-platform-tests/tools/pywebsocket": "import", >- "web-platform-tests/tools/serve": "import", >- "web-platform-tests/tools/six": "import", >- "web-platform-tests/tools/sslutils": "import", >- "web-platform-tests/tools/wptserve": "import", >- "web-platform-tests/touch-events": "import", >- "web-platform-tests/trusted-types": "skip", >- "web-platform-tests/typedarrays": "skip", >- "web-platform-tests/uievents": "import", >- "web-platform-tests/upgrade-insecure-requests": "skip", >- "web-platform-tests/url": "import", >- "web-platform-tests/user-timing": "import", >- "web-platform-tests/vibration": "skip", >- "web-platform-tests/visual-viewport": "import", >- "web-platform-tests/wai-aria": "skip", >- "web-platform-tests/wasm": "import", >- "web-platform-tests/wasm/jsapi": "import", >- "web-platform-tests/web-animations": "import", >- "web-platform-tests/web-nfc": "skip", >- "web-platform-tests/web-share": "import", >- "web-platform-tests/webaudio": "import", >- "web-platform-tests/webauthn": "skip", >- "web-platform-tests/webdriver": "skip", >- "web-platform-tests/webgl": "skip", >- "web-platform-tests/webmessaging": "import", >- "web-platform-tests/webmessaging/": "import", >- "web-platform-tests/webrtc": "import", >- "web-platform-tests/webrtc/legacy": "skip", >- "web-platform-tests/websockets": "import", >- "web-platform-tests/webstorage": "skip", >- "web-platform-tests/webusb": "skip", >- "web-platform-tests/webvr": "skip", >- "web-platform-tests/webvtt": "skip", >- "web-platform-tests/webxr": "import", >- "web-platform-tests/workers": "import", >- "web-platform-tests/worklets": "import", >- "web-platform-tests/x-frame-options": "skip", >- "web-platform-tests/xhr": "import", >+ "LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio": "import", >+ "LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/": "import", >+ "apng": "import", >+ "css/css-animations": "import", >+ "css/css-box": "import", >+ "css/css-color": "import", >+ "css/css-flexbox": "import", >+ "css/css-masking/clip-path/": "import", >+ "css/css-masking/clip-path/clip-path-with-zoo": "import", >+ "css/css-masking/clip-path/clip-path-with-zoom*": "import", >+ "css/css-masking/clip-path/clip-path-with-zoom-*": "import", >+ "css/css-multicol": "import", >+ "css/css-position": "import", >+ "css/css-shapes": "import", >+ "css/css-sizing": "import", >+ "css/css-syntax": "import", >+ "css/css-text-decor": "import", >+ "css/css-values": "import", >+ "css/geometry": "import", >+ "css/selectors": "import", >+ "css/support": "import", >+ "custom-elements": "import", >+ "density-size-correction": "import", >+ "encrypted-media": "import", >+ "imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio": "import", >+ "paint-timing/": "import", >+ "paint-timing/fcp-only": "import", >+ "paint-timing/resources": "import", >+ "paint-timing/resources/": "import", >+ "resources/testharness.js": "import", >+ "shadow-dom": "import", >+ "streams": "import", >+ "tools": "import", >+ "web-animations": "import", >+ "web-platform-tests/DOM-parsing": "skip", >+ "web-platform-tests/DOMEvents": "skip", >+ "web-platform-tests/FileAPI": "import", >+ "web-platform-tests/IndexedDB": "import", >+ "web-platform-tests/WebCryptoAPI": "import", >+ "web-platform-tests/WebIDL": "import", >+ "web-platform-tests/WebIDL/invalid": "skip", >+ "web-platform-tests/WebIDL/valid": "skip", >+ "web-platform-tests/XMLHttpRequest": "import", >+ "web-platform-tests/XMLHttpRequest/abort-after-stop.htm": "skip", >+ "web-platform-tests/XMLHttpRequest/event-error-order.sub.html": "skip", >+ "web-platform-tests/XMLHttpRequest/event-timeout-order.htm": "skip", >+ "web-platform-tests/XMLHttpRequest/preserve-ua-header-on-redirect.htm": "skip", >+ "web-platform-tests/XMLHttpRequest/send-after-setting-document-domain.htm": "skip", >+ "web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm": "skip", >+ "web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader-existing-session.htm": "skip", >+ "web-platform-tests/accelerometer": "skip", >+ "web-platform-tests/ambient-light": "skip", >+ "web-platform-tests/animation-timing": "skip", >+ "web-platform-tests/annotation-model": "skip", >+ "web-platform-tests/annotation-protocol": "skip", >+ "web-platform-tests/annotation-vocab": "skip", >+ "web-platform-tests/apng": "skip", >+ "web-platform-tests/app-uri": "skip", >+ "web-platform-tests/assumptions": "skip", >+ "web-platform-tests/audio-output": "import", >+ "web-platform-tests/auxclick": "skip", >+ "web-platform-tests/background-fetch": "import", >+ "web-platform-tests/battery-status": "skip", >+ "web-platform-tests/beacon": "import", >+ "web-platform-tests/bluetooth": "skip", >+ "web-platform-tests/browser-payment-api": "skip", >+ "web-platform-tests/clear-site-data": "skip", >+ "web-platform-tests/clipboard": "skip", >+ "web-platform-tests/clipboard-apis": "import", >+ "web-platform-tests/common": "import", >+ "web-platform-tests/compat": "import", >+ "web-platform-tests/console": "import", >+ "web-platform-tests/content-security-policy": "import", >+ "web-platform-tests/cookies": "skip", >+ "web-platform-tests/cookies/resources": "import", >+ "web-platform-tests/cookies/secure": "import", >+ "web-platform-tests/core-aam": "skip", >+ "web-platform-tests/cors": "import", >+ "web-platform-tests/credential-management": "import", >+ "web-platform-tests/css": "skip", >+ "web-platform-tests/css-backgrounds": "skip", >+ "web-platform-tests/css-font-display": "skip", >+ "web-platform-tests/css-font-loading": "skip", >+ "web-platform-tests/css-fonts": "skip", >+ "web-platform-tests/css-paint-api": "skip", >+ "web-platform-tests/css-scoping": "skip", >+ "web-platform-tests/css-scroll-anchoring": "skip", >+ "web-platform-tests/css-timing": "skip", >+ "web-platform-tests/css-typed-om": "skip", >+ "web-platform-tests/css-values": "skip", >+ "web-platform-tests/css/WOFF2": "import", >+ "web-platform-tests/css/css-align": "import", >+ "web-platform-tests/css/css-animations": "import", >+ "web-platform-tests/css/css-animations/": "import", >+ "web-platform-tests/css/css-backgrounds": "import", >+ "web-platform-tests/css/css-cascade": "import", >+ "web-platform-tests/css/css-color": "import", >+ "web-platform-tests/css/css-content": "import", >+ "web-platform-tests/css/css-display": "import", >+ "web-platform-tests/css/css-easing": "import", >+ "web-platform-tests/css/css-flexbox": "import", >+ "web-platform-tests/css/css-font-loading": "import", >+ "web-platform-tests/css/css-fonts": "import", >+ "web-platform-tests/css/css-fonts/math-script-level-and-math-style/": "import", >+ "web-platform-tests/css/css-grid": "import", >+ "web-platform-tests/css/css-grid/abspos": "import", >+ "web-platform-tests/css/css-grid/alignment/": "import", >+ "web-platform-tests/css/css-grid/grid-definition/": "import", >+ "web-platform-tests/css/css-grid/grid-items/": "import", >+ "web-platform-tests/css/css-grid/layout-algorithm": "import", >+ "web-platform-tests/css/css-grid/layout-algorithm/": "import", >+ "web-platform-tests/css/css-grid/parsing/": "import", >+ "web-platform-tests/css/css-images": "import", >+ "web-platform-tests/css/css-lists": "import", >+ "web-platform-tests/css/css-lists/parsing": "import", >+ "web-platform-tests/css/css-logical": "import", >+ "web-platform-tests/css/css-multicol": "import", >+ "web-platform-tests/css/css-overflow": "import", >+ "web-platform-tests/css/css-overscroll-behavior": "import", >+ "web-platform-tests/css/css-properties-values-api": "import", >+ "web-platform-tests/css/css-pseudo": "import", >+ "web-platform-tests/css/css-scoping": "import", >+ "web-platform-tests/css/css-scroll-snap": "import", >+ "web-platform-tests/css/css-shadow-parts": "import", >+ "web-platform-tests/css/css-shapes": "import", >+ "web-platform-tests/css/css-shapes/test-plan/index.html": "skip", >+ "web-platform-tests/css/css-sizing/aspect-ratio": "import", >+ "web-platform-tests/css/css-text": "import", >+ "web-platform-tests/css/css-transitions": "import", >+ "web-platform-tests/css/css-ui": "import", >+ "web-platform-tests/css/css-variables": "import", >+ "web-platform-tests/css/css-writing-modes": "import", >+ "web-platform-tests/css/cssom": "import", >+ "web-platform-tests/css/cssom-view/": "import", >+ "web-platform-tests/css/geometry/": "import", >+ "web-platform-tests/css/mediaqueries": "import", >+ "web-platform-tests/css/reference": "import", >+ "web-platform-tests/css/resources": "import", >+ "web-platform-tests/css/selectors": "import", >+ "web-platform-tests/css/support": "import", >+ "web-platform-tests/custom-elements": "import", >+ "web-platform-tests/custom-elements/v0": "skip", >+ "web-platform-tests/docs": "import", >+ "web-platform-tests/dom": "import", >+ "web-platform-tests/dom/events": "import", >+ "web-platform-tests/dom/events/scrolling": "import", >+ "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html": "skip", >+ "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg": "skip", >+ "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml": "skip", >+ "web-platform-tests/dom/nodes/Document-createProcessingInstruction.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Document-getElementsByTagName.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-childElement-null-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElement-null.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElement-null.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-nochild-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-nochild.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-childElementCount.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild-entity.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild-entity.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild-namespace-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild-namespace.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild-namespace.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-firstElementChild.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-lastElementChild-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-lastElementChild.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-lastElementChild.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Element-nextElementSibling-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-nextElementSibling.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-previousElementSibling-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-previousElementSibling.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-siblingElement-null-svg.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-siblingElement-null.svg": "skip", >+ "web-platform-tests/dom/nodes/Element-siblingElement-null.xhtml": "skip", >+ "web-platform-tests/dom/nodes/Node-nodeName.xhtml": "skip", >+ "web-platform-tests/dom/nodes/ParentNode-querySelector-All.xht": "skip", >+ "web-platform-tests/dom/traversal": "import", >+ "web-platform-tests/dom/traversal/unfinished": "skip", >+ "web-platform-tests/domparsing": "import", >+ "web-platform-tests/domxpath": "import", >+ "web-platform-tests/domxpath/xml_xpath_runner.html": "skip", >+ "web-platform-tests/domxpath/xml_xpath_tests.xml": "skip", >+ "web-platform-tests/dpub-aam": "skip", >+ "web-platform-tests/dpub-aria": "skip", >+ "web-platform-tests/editing": "skip", >+ "web-platform-tests/encoding": "import", >+ "web-platform-tests/encrypted-media": "import", >+ "web-platform-tests/encrypted-media/Google": "skip", >+ "web-platform-tests/entries-api": "import", >+ "web-platform-tests/eventsource": "import", >+ "web-platform-tests/ext-xhtml-pubid": "skip", >+ "web-platform-tests/feature-policy": "skip", >+ "web-platform-tests/feature-policy/resources": "import", >+ "web-platform-tests/feature-policy/resources/": "import", >+ "web-platform-tests/fetch": "import", >+ "web-platform-tests/fetch/api": "import", >+ "web-platform-tests/fetch/api/cors": "import", >+ "web-platform-tests/fetch/api/redirect": "import", >+ "web-platform-tests/fetch/api/resources": "import", >+ "web-platform-tests/fetch/origin": "import", >+ "web-platform-tests/fetch/range": "import", >+ "web-platform-tests/fetch/stale-while-revalidate": "import", >+ "web-platform-tests/fullscreen": "skip", >+ "web-platform-tests/gamepad": "skip", >+ "web-platform-tests/generic-sensor": "skip", >+ "web-platform-tests/geolocation-API": "import", >+ "web-platform-tests/gyroscope": "skip", >+ "web-platform-tests/hr-time": "import", >+ "web-platform-tests/html": "import", >+ "web-platform-tests/html-imports": "skip", >+ "web-platform-tests/html-longdesc": "skip", >+ "web-platform-tests/html-media-capture": "skip", >+ "web-platform-tests/html/browsers": "import", >+ "web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name.html": "skip", >+ "web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin_2.html": "skip", >+ "web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin_3.html": "skip", >+ "web-platform-tests/html/browsers/history/joint-session-history": "skip", >+ "web-platform-tests/html/browsers/history/the-history-interface/001.html": "skip", >+ "web-platform-tests/html/browsers/history/the-history-interface/002.html": "skip", >+ "web-platform-tests/html/browsers/history/the-history-interface/combination_history_002.html": "skip", >+ "web-platform-tests/html/browsers/history/the-history-interface/combination_history_003.html": "skip", >+ "web-platform-tests/html/browsers/history/the-history-interface/traverse_the_history_3.html": "skip", >+ "web-platform-tests/html/browsers/history/the-location-interface/assign_after_load.html": "skip", >+ "web-platform-tests/html/browsers/history/the-location-interface/assign_before_load.html": "skip", >+ "web-platform-tests/html/browsers/history/the-location-interface/location_assign.html": "skip", >+ "web-platform-tests/html/browsers/offline/application-cache-api": "skip", >+ "web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.sub.html": "skip", >+ "web-platform-tests/html/browsers/sandboxing": "skip", >+ "web-platform-tests/html/browsers/the-window-object": "import", >+ "web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/": "import", >+ "web-platform-tests/html/browsers/windows/browsing-context-first-created.xhtml": "skip", >+ "web-platform-tests/html/browsers/windows/browsing-context-names": "import", >+ "web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html": "skip", >+ "web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.html": "skip", >+ "web-platform-tests/html/canvas": "import", >+ "web-platform-tests/html/canvas/element": "import", >+ "web-platform-tests/html/canvas/offscreen": "import", >+ "web-platform-tests/html/canvas/resources": "import", >+ "web-platform-tests/html/canvas/tools": "import", >+ "web-platform-tests/html/dom": "import", >+ "web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html": "skip", >+ "web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters": "skip", >+ "web-platform-tests/html/dom/reflection-original.html": "skip", >+ "web-platform-tests/html/editing": "import", >+ "web-platform-tests/html/iana": "import", >+ "web-platform-tests/html/infrastructure": "import", >+ "web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers": "skip", >+ "web-platform-tests/html/interaction": "import", >+ "web-platform-tests/html/interaction/focus/the-autofocus-attribute": "import", >+ "web-platform-tests/html/obsolete": "skip", >+ "web-platform-tests/html/rendering": "skip", >+ "web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/": "import", >+ "web-platform-tests/html/resources": "import", >+ "web-platform-tests/html/semantics": "import", >+ "web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives": "skip", >+ "web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh": "import", >+ "web-platform-tests/html/semantics/embedded-content": "import", >+ "web-platform-tests/html/semantics/embedded-content-0": "skip", >+ "web-platform-tests/html/semantics/embedded-content/image-maps/image-map-processing-model": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/audio_loop_base.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/error-codes": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/location-of-the-media-resource/currentSrc.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_progress.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/offsets-into-the-media-resource/currentTime.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document-networkState.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/play-in-detached-document.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-max-value.htm": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/synchronising-multiple-media-elements/media-controllers/task-source.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element": "import", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors": "skip", >+ "web-platform-tests/html/semantics/embedded-content/media-elements/video_loop_base.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-area-element/area_nohref.xhtml": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-area-element/test-area.xhtml": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-canvas-element": "import", >+ "web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-iframe-element": "import", >+ "web-platform-tests/html/semantics/embedded-content/the-img-element/": "import", >+ "web-platform-tests/html/semantics/embedded-content/the-img-element/decode": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data": "skip", >+ "web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html": "skip", >+ "web-platform-tests/html/semantics/forms/textfieldselection/select-event.html": "skip", >+ "web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html": "skip", >+ "web-platform-tests/html/semantics/forms/the-textarea-element": "import", >+ "web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html": "skip", >+ "web-platform-tests/html/semantics/interactive-elements/the-summary-element": "skip", >+ "web-platform-tests/html/semantics/links/downloading-resources": "import", >+ "web-platform-tests/html/semantics/links/following-hyperlinks": "skip", >+ "web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements": "skip", >+ "web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing": "skip", >+ "web-platform-tests/html/semantics/scripting-1/the-script-element/module": "import", >+ "web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event.xhtml": "skip", >+ "web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.xhtml": "skip", >+ "web-platform-tests/html/semantics/tabular-data": "import", >+ "web-platform-tests/html/semantics/tabular-data/processing-model-1": "import", >+ "web-platform-tests/html/semantics/text-level-semantics/the-data-element": "skip", >+ "web-platform-tests/html/syntax": "import", >+ "web-platform-tests/html/the-xhtml-syntax": "import", >+ "web-platform-tests/html/the-xhtml-syntax/parsing-xhtml-documents": "import", >+ "web-platform-tests/html/tools": "import", >+ "web-platform-tests/html/user-activation": "import", >+ "web-platform-tests/html/webappapis": "import", >+ "web-platform-tests/html/webappapis/dynamic-insertion": "import", >+ "web-platform-tests/html/webappapis/dynamic-markup-insertion": "import", >+ "web-platform-tests/html/webappapis/idle-callbacks": "skip", >+ "web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_raf.html": "skip", >+ "web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections": "skip", >+ "web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin": "import", >+ "web-platform-tests/http": "skip", >+ "web-platform-tests/image-decodes": "skip", >+ "web-platform-tests/imagebitmap-renderingcontext": "import", >+ "web-platform-tests/images": "import", >+ "web-platform-tests/infrastructure": "import", >+ "web-platform-tests/innerText": "import", >+ "web-platform-tests/input-events": "skip", >+ "web-platform-tests/interfaces": "import", >+ "web-platform-tests/intersection-observer": "import", >+ "web-platform-tests/js": "skip", >+ "web-platform-tests/keyboard-lock": "skip", >+ "web-platform-tests/loading/lazyload": "import", >+ "web-platform-tests/longtask-timing": "skip", >+ "web-platform-tests/magnetometer": "skip", >+ "web-platform-tests/mathml": "import", >+ "web-platform-tests/media-capabilities": "skip", >+ "web-platform-tests/media-source": "import", >+ "web-platform-tests/media/": "import", >+ "web-platform-tests/mediacapture-image": "skip", >+ "web-platform-tests/mediacapture-record": "import", >+ "web-platform-tests/mediacapture-streams": "import", >+ "web-platform-tests/mediacapture-streams/": "import", >+ "web-platform-tests/mediasession": "import", >+ "web-platform-tests/microdata": "skip", >+ "web-platform-tests/mimesniff": "import", >+ "web-platform-tests/mixed-content": "skip", >+ "web-platform-tests/mst-content-hint": "import", >+ "web-platform-tests/navigation-timing": "skip", >+ "web-platform-tests/netinfo": "skip", >+ "web-platform-tests/notifications": "import", >+ "web-platform-tests/old-tests": "skip", >+ "web-platform-tests/orientation-event": "skip", >+ "web-platform-tests/orientation-sensor": "skip", >+ "web-platform-tests/page-visibility": "import", >+ "web-platform-tests/paint-timing": "skip", >+ "web-platform-tests/payment-handler": "skip", >+ "web-platform-tests/payment-method-basic-card": "skip", >+ "web-platform-tests/payment-method-id": "skip", >+ "web-platform-tests/payment-request": "import", >+ "web-platform-tests/performance-timeline": "skip", >+ "web-platform-tests/picture-in-picture": "import", >+ "web-platform-tests/pointerevents": "import", >+ "web-platform-tests/pointerlock": "skip", >+ "web-platform-tests/preload": "skip", >+ "web-platform-tests/presentation-api": "skip", >+ "web-platform-tests/progress-events": "skip", >+ "web-platform-tests/proximity": "skip", >+ "web-platform-tests/quirks-mode": "skip", >+ "web-platform-tests/quirks/unitless-length": "import", >+ "web-platform-tests/referrer-policy": "import", >+ "web-platform-tests/remote-playback": "import", >+ "web-platform-tests/requestidlecallback": "import", >+ "web-platform-tests/resize-observer": "import", >+ "web-platform-tests/resize-observer/": "import", >+ "web-platform-tests/resource-timing": "import", >+ "web-platform-tests/resources": "import", >+ "web-platform-tests/resources/chromium": "skip", >+ "web-platform-tests/resources/test": "skip", >+ "web-platform-tests/screen-orientation": "skip", >+ "web-platform-tests/scroll-anchoring": "skip", >+ "web-platform-tests/scroll-into-view": "skip", >+ "web-platform-tests/secure-contexts": "import", >+ "web-platform-tests/selection": "skip", >+ "web-platform-tests/selectors": "skip", >+ "web-platform-tests/selectors-api": "skip", >+ "web-platform-tests/server-timing": "import", >+ "web-platform-tests/service-workers": "import", >+ "web-platform-tests/shadow-dom": "import", >+ "web-platform-tests/shadow-dom/untriaged": "skip", >+ "web-platform-tests/speech-api": "import", >+ "web-platform-tests/staticrange": "skip", >+ "web-platform-tests/storage": "skip", >+ "web-platform-tests/streams": "import", >+ "web-platform-tests/streams/writable-streams": "skip", >+ "web-platform-tests/subresource-integrity": "import", >+ "web-platform-tests/svg": "import", >+ "web-platform-tests/svg-aam": "skip", >+ "web-platform-tests/test/html/infrastructure": "import", >+ "web-platform-tests/testharness_runner.html": "skip", >+ "web-platform-tests/tools": "import", >+ "web-platform-tests/tools/__init__.py": "import", >+ "web-platform-tests/tools/html5lib": "import", >+ "web-platform-tests/tools/localpaths.py": "import", >+ "web-platform-tests/tools/manifest": "import", >+ "web-platform-tests/tools/pywebsocket": "import", >+ "web-platform-tests/tools/serve": "import", >+ "web-platform-tests/tools/six": "import", >+ "web-platform-tests/tools/sslutils": "import", >+ "web-platform-tests/tools/wptserve": "import", >+ "web-platform-tests/touch-events": "import", >+ "web-platform-tests/trusted-types": "skip", >+ "web-platform-tests/typedarrays": "skip", >+ "web-platform-tests/uievents": "import", >+ "web-platform-tests/upgrade-insecure-requests": "skip", >+ "web-platform-tests/url": "import", >+ "web-platform-tests/user-timing": "import", >+ "web-platform-tests/vibration": "skip", >+ "web-platform-tests/visual-viewport": "import", >+ "web-platform-tests/wai-aria": "skip", >+ "web-platform-tests/wasm": "import", >+ "web-platform-tests/wasm/jsapi": "import", >+ "web-platform-tests/web-animations": "import", >+ "web-platform-tests/web-nfc": "skip", >+ "web-platform-tests/web-share": "import", >+ "web-platform-tests/webaudio": "import", >+ "web-platform-tests/webauthn": "skip", >+ "web-platform-tests/webdriver": "skip", >+ "web-platform-tests/webgl": "skip", >+ "web-platform-tests/webmessaging": "import", >+ "web-platform-tests/webmessaging/": "import", >+ "web-platform-tests/webrtc": "import", >+ "web-platform-tests/webrtc/legacy": "skip", >+ "web-platform-tests/websockets": "import", >+ "web-platform-tests/webstorage": "skip", >+ "web-platform-tests/webusb": "skip", >+ "web-platform-tests/webvr": "skip", >+ "web-platform-tests/webvtt": "skip", >+ "web-platform-tests/webxr": "import", >+ "web-platform-tests/workers": "import", >+ "web-platform-tests/worklets": "import", >+ "web-platform-tests/x-frame-options": "skip", >+ "web-platform-tests/xhr": "import", > "web-platform/test/html/infrastructure": "import" > } >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/__init__.py b/LayoutTests/imported/w3c/web-platform-tests/common/__init__.py >new file mode 100644 >index 0000000000000000000000000000000000000000..a6834b8285a56bef0e1543fd901c7e6f2f8bc202 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/__init__.py >@@ -0,0 +1 @@ >+# This file is required for Python to search this directory for modules. >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/echo.py b/LayoutTests/imported/w3c/web-platform-tests/common/echo.py >index 2ee403645b1bb27cdb27bcea716e166729b81af8..911b54a0b488b9c148a29d5d1cd942d4fbca57b4 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/echo.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/echo.py >@@ -1,6 +1,6 @@ > def main(request, response): > # Without X-XSS-Protection to disable non-standard XSS protection the functionality this > # resource offers is useless >- response.headers.set("X-XSS-Protection", "0") >- response.headers.set("Content-Type", "text/html") >- response.content = request.GET.first("content") >+ response.headers.set(b"X-XSS-Protection", b"0") >+ response.headers.set(b"Content-Type", b"text/html") >+ response.content = request.GET.first(b"content") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/get-host-info.sub.js b/LayoutTests/imported/w3c/web-platform-tests/common/get-host-info.sub.js >index 1c28a7f476f67d513e4627b6133d0c2e0ffc867a..8f37d557583b99235b7a1fa903e54e96f90b9870 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/get-host-info.sub.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/get-host-info.sub.js >@@ -7,6 +7,7 @@ function get_host_info() { > var HTTP_PORT = '{{ports[http][0]}}'; > var HTTP_PORT2 = '{{ports[http][1]}}'; > var HTTPS_PORT = '{{ports[https][0]}}'; >+ var HTTPS_PORT2 = '{{ports[https][1]}}'; > var PROTOCOL = self.location.protocol; > var IS_HTTPS = (PROTOCOL == "https:"); > var HTTP_PORT_ELIDED = HTTP_PORT == "80" ? "" : (":" + HTTP_PORT); >@@ -22,6 +23,7 @@ function get_host_info() { > HTTP_PORT: HTTP_PORT, > HTTP_PORT2: HTTP_PORT2, > HTTPS_PORT: HTTPS_PORT, >+ HTTPS_PORT2: HTTPS_PORT2, > ORIGINAL_HOST: ORIGINAL_HOST, > REMOTE_HOST: REMOTE_HOST, > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/redirect-opt-in.py b/LayoutTests/imported/w3c/web-platform-tests/common/redirect-opt-in.py >index ff5744b181547ab977c3f405bfeb96013a3cc4ce..b5e674a27fb6e2b459b1815ca86fe3c8f1d9b60f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/redirect-opt-in.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/redirect-opt-in.py >@@ -6,15 +6,15 @@ def main(request, response): > location - The resource to redirect to. > """ > status = 302 >- if "status" in request.GET: >+ if b"status" in request.GET: > try: >- status = int(request.GET.first("status")) >+ status = int(request.GET.first(b"status")) > except ValueError: > pass > > response.status = status > >- location = request.GET.first("location") >+ location = request.GET.first(b"location") > >- response.headers.set("Location", location) >- response.headers.set("Timing-Allow-Origin", "*") >+ response.headers.set(b"Location", location) >+ response.headers.set(b"Timing-Allow-Origin", b"*") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/sab.js b/LayoutTests/imported/w3c/web-platform-tests/common/sab.js >index c7fd1a742e64f66744b416584952effe29fda208..d40dd7cca8da10ad321067e638c772550f1a042f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/sab.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/sab.js >@@ -5,6 +5,9 @@ > if (type === "ArrayBuffer") { > return new ArrayBuffer(length); > } else if (type === "SharedArrayBuffer") { >+ if (sabConstructor.name !== "SharedArrayBuffer") { >+ throw new Error("WebAssembly.Memory does not support shared:true"); >+ } > return new sabConstructor(length); > } else { > throw new Error("type has to be ArrayBuffer or SharedArrayBuffer"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/README.md b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/README.md >index fb9a2f108f9faf68bb86f0bd9f848dbd28630ca4..f957541f75ecc37416895d6bc19d1c229c0f71b8 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/README.md >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/README.md >@@ -278,9 +278,9 @@ The ```excluded_tests``` section have objects with the same format as [Test Expa > > Taking the spec JSON, the generator follows this algorithm: > >-* Expand all ```excluded_tests``` to create a blacklist of selections >+* Expand all ```excluded_tests``` to create a denylist of selections > >-* For each `specification` entries: Expand the ```test_expansion``` pattern into selections and check each against the blacklist, if not marked as suppresed, generate the test resources for the selection >+* For each `specification` entries: Expand the ```test_expansion``` pattern into selections and check each against the denylist, if not marked as suppresed, generate the test resources for the selection > > ### SourceContext Resolution > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/__init__.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/__init__.py >new file mode 100644 >index 0000000000000000000000000000000000000000..a6834b8285a56bef0e1543fd901c7e6f2f8bc202 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/__init__.py >@@ -0,0 +1 @@ >+# This file is required for Python to search this directory for modules. >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/__init__.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/__init__.py >new file mode 100644 >index 0000000000000000000000000000000000000000..a6834b8285a56bef0e1543fd901c7e6f2f8bc202 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/__init__.py >@@ -0,0 +1 @@ >+# This file is required for Python to search this directory for modules. >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/document.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/document.py >index 3fc61a1e7baa3bc60968d578930f25f621b536f3..9a9f045e640fd57f66031b59cd9d21da8a55bfe7 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/document.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/document.py >@@ -1,35 +1,36 @@ > import os, sys, json > >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import util >+from wptserve.utils import isomorphic_decode, isomorphic_encode > >+import importlib >+util = importlib.import_module("common.security-features.scope.util") > > def main(request, response): >- policyDeliveries = json.loads(request.GET.first("policyDeliveries", "[]")) >+ policyDeliveries = json.loads(request.GET.first(b"policyDeliveries", b"[]")) > maybe_additional_headers = {} >- meta = '' >- error = '' >+ meta = u'' >+ error = u'' > for delivery in policyDeliveries: >- if delivery['deliveryType'] == 'meta': >- if delivery['key'] == 'referrerPolicy': >- meta += '<meta name="referrer" content="%s">' % delivery['value'] >+ if delivery[u'deliveryType'] == u'meta': >+ if delivery[u'key'] == u'referrerPolicy': >+ meta += u'<meta name="referrer" content="%s">' % delivery[u'value'] > else: >- error = 'invalid delivery key' >- elif delivery['deliveryType'] == 'http-rp': >- if delivery['key'] == 'referrerPolicy': >- maybe_additional_headers['Referrer-Policy'] = delivery['value'] >+ error = u'invalid delivery key' >+ elif delivery[u'deliveryType'] == u'http-rp': >+ if delivery[u'key'] == u'referrerPolicy': >+ maybe_additional_headers[b'Referrer-Policy'] = isomorphic_encode(delivery[u'value']) > else: >- error = 'invalid delivery key' >+ error = u'invalid delivery key' > else: >- error = 'invalid deliveryType' >+ error = u'invalid deliveryType' > >- handler = lambda: util.get_template("document.html.template") % ({ >- "meta": meta, >- "error": error >+ handler = lambda: util.get_template(u"document.html.template") % ({ >+ u"meta": meta, >+ u"error": error > }) > util.respond( > request, > response, > payload_generator=handler, >- content_type="text/html", >+ content_type=b"text/html", > maybe_additional_headers=maybe_additional_headers) >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/util.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/util.py >index 42f8326b36aab10751cf2052354925a7ad0ca867..da5aacf35e99a4bd9de9cb5c3e96e8b1804da054 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/util.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/util.py >@@ -1,10 +1,11 @@ > import os > >+from wptserve.utils import isomorphic_decode > > def get_template(template_basename): >- script_directory = os.path.dirname(os.path.abspath(__file__)) >+ script_directory = os.path.dirname(os.path.abspath(isomorphic_decode(__file__))) > template_directory = os.path.abspath( >- os.path.join(script_directory, "template")) >+ os.path.join(script_directory, u"template")) > template_filename = os.path.join(template_directory, template_basename) > > with open(template_filename, "r") as f: >@@ -12,25 +13,25 @@ def get_template(template_basename): > > > def __noop(request, response): >- return "" >+ return u"" > > > def respond(request, > response, > status_code=200, >- content_type="text/html", >+ content_type=b"text/html", > payload_generator=__noop, >- cache_control="no-cache; must-revalidate", >- access_control_allow_origin="*", >+ cache_control=b"no-cache; must-revalidate", >+ access_control_allow_origin=b"*", > maybe_additional_headers=None): > response.add_required_headers = False > response.writer.write_status(status_code) > > if access_control_allow_origin != None: >- response.writer.write_header("access-control-allow-origin", >+ response.writer.write_header(b"access-control-allow-origin", > access_control_allow_origin) >- response.writer.write_header("content-type", content_type) >- response.writer.write_header("cache-control", cache_control) >+ response.writer.write_header(b"content-type", content_type) >+ response.writer.write_header(b"cache-control", cache_control) > > additional_headers = maybe_additional_headers or {} > for header, value in additional_headers.items(): >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/w3c-import.log >index 39c319386548168bdba18e7beba782747bd111e8..bcd305d7db6eaaf896644496d09f278fd849a3e9 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/w3c-import.log >@@ -14,6 +14,7 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/__init__.py > /LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/document.py > /LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/util.py > /LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/worker.py >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/worker.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/worker.py >index 716bcb8efffb84384dfc5620c1a8f6a0d193a878..6b321e7de17e36338f4264e474fa270408604054 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/worker.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/scope/worker.py >@@ -1,44 +1,44 @@ > import os, sys, json > >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import util >- >+from wptserve.utils import isomorphic_decode, isomorphic_encode >+import importlib >+util = importlib.import_module("common.security-features.scope.util") > > def main(request, response): >- policyDeliveries = json.loads(request.GET.first('policyDeliveries', '[]')) >- worker_type = request.GET.first('type', 'classic') >- commonjs_url = '%s://%s:%s/common/security-features/resources/common.sub.js' % ( >+ policyDeliveries = json.loads(request.GET.first(b'policyDeliveries', b'[]')) >+ worker_type = request.GET.first(b'type', b'classic') >+ commonjs_url = u'%s://%s:%s/common/security-features/resources/common.sub.js' % ( > request.url_parts.scheme, request.url_parts.hostname, > request.url_parts.port) >- if worker_type == 'classic': >- import_line = 'importScripts("%s");' % commonjs_url >+ if worker_type == b'classic': >+ import_line = u'importScripts("%s");' % commonjs_url > else: >- import_line = 'import "%s";' % commonjs_url >+ import_line = u'import "%s";' % commonjs_url > > maybe_additional_headers = {} >- error = '' >+ error = u'' > for delivery in policyDeliveries: >- if delivery['deliveryType'] == 'meta': >- error = '<meta> cannot be used in WorkerGlobalScope' >- elif delivery['deliveryType'] == 'http-rp': >- if delivery['key'] == 'referrerPolicy': >- maybe_additional_headers['Referrer-Policy'] = delivery['value'] >- elif delivery['key'] == 'mixedContent' and delivery['value'] == 'opt-in': >- maybe_additional_headers['Content-Security-Policy'] = 'block-all-mixed-content' >- elif delivery['key'] == 'upgradeInsecureRequests' and delivery['value'] == 'upgrade': >- maybe_additional_headers['Content-Security-Policy'] = 'upgrade-insecure-requests' >+ if delivery[u'deliveryType'] == u'meta': >+ error = u'<meta> cannot be used in WorkerGlobalScope' >+ elif delivery[u'deliveryType'] == u'http-rp': >+ if delivery[u'key'] == u'referrerPolicy': >+ maybe_additional_headers[b'Referrer-Policy'] = isomorphic_encode(delivery[u'value']) >+ elif delivery[u'key'] == u'mixedContent' and delivery[u'value'] == u'opt-in': >+ maybe_additional_headers[b'Content-Security-Policy'] = b'block-all-mixed-content' >+ elif delivery[u'key'] == u'upgradeInsecureRequests' and delivery[u'value'] == u'upgrade': >+ maybe_additional_headers[b'Content-Security-Policy'] = b'upgrade-insecure-requests' > else: >- error = 'invalid delivery key for http-rp: %s' % delivery['key'] >+ error = u'invalid delivery key for http-rp: %s' % delivery[u'key'] > else: >- error = 'invalid deliveryType: %s' % delivery['deliveryType'] >+ error = u'invalid deliveryType: %s' % delivery[u'deliveryType'] > >- handler = lambda: util.get_template('worker.js.template') % ({ >- 'import': import_line, >- 'error': error >+ handler = lambda: util.get_template(u'worker.js.template') % ({ >+ u'import': import_line, >+ u'error': error > }) > util.respond( > request, > response, > payload_generator=handler, >- content_type='text/javascript', >+ content_type=b'text/javascript', > maybe_additional_headers=maybe_additional_headers) >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/audio.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/audio.py >index eb95045e0315ab5c24a826325e1e16a6cd45827d..f16a0f7fbbe2116d85d92bd8a8d0098c532d7670 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/audio.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/audio.py >@@ -1,10 +1,11 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(request, server_data): >- file = os.path.join(request.doc_root, "webaudio", "resources", >- "sin_440Hz_-6dBFS_1s.wav") >+ file = os.path.join(request.doc_root, u"webaudio", u"resources", >+ u"sin_440Hz_-6dBFS_1s.wav") > return open(file, "rb").read() > > >@@ -13,6 +14,5 @@ def main(request, response): > subresource.respond(request, > response, > payload_generator = handler, >- access_control_allow_origin = "*", >- content_type = "audio/wav") >- >+ access_control_allow_origin = b"*", >+ content_type = b"audio/wav") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/document.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/document.py >index 59e0dcd7bc6cd3904b1aa8079ea161a24d2f51e6..52b684a4d9f614c0a18b711dd1a18182ee79fa8c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/document.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/document.py >@@ -1,9 +1,10 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(server_data): >- return subresource.get_template("document.html.template") % server_data >+ return subresource.get_template(u"document.html.template") % server_data > > def main(request, response): > subresource.respond(request, >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/empty.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/empty.py >index 132e85ddeec9119c03a11e030c3e6f09c32735c4..312e12cbed9089b678367a1bd970a8c6261c86ab 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/empty.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/empty.py >@@ -1,14 +1,14 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(server_data): >- return '' >+ return u'' > > def main(request, response): > subresource.respond(request, > response, > payload_generator = generate_payload, >- access_control_allow_origin = "*", >- content_type = "text/plain") >- >+ access_control_allow_origin = b"*", >+ content_type = b"text/plain") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/font.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/font.py >index 26311a9f079080e7fc11995e8c180b12a6201b16..6e33dbbc35a6334586a83fe0762f6b6cb8112e21 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/font.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/font.py >@@ -1,72 +1,81 @@ > import os, sys, base64 >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+import six >+ >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") >+ >+ >+def decodebytes(s): >+ if six.PY3: >+ return base64.decodebytes(six.ensure_binary(s)) >+ return base64.decodestring(s) > > def generate_payload(request, server_data): >- data = ('{"headers": %(headers)s}') % server_data >- if "id" in request.GET: >- request.server.stash.put(request.GET["id"], data) >+ data = (u'{"headers": %(headers)s}') % server_data >+ if b"id" in request.GET: >+ request.server.stash.put(request.GET[b"id"], data) > # Simple base64 encoded .tff font >- return base64.decodestring("AAEAAAANAIAAAwBQRkZUTU6u6MkAAAXcAAAAHE9TLzJWYW" >- "QKAAABWAAAAFZjbWFwAA8D7wAAAcAAAAFCY3Z0IAAhAnkA" >- "AAMEAAAABGdhc3D//wADAAAF1AAAAAhnbHlmCC6aTwAAAx" >- "QAAACMaGVhZO8ooBcAAADcAAAANmhoZWEIkAV9AAABFAAA" >- "ACRobXR4EZQAhQAAAbAAAAAQbG9jYQBwAFQAAAMIAAAACm" >- "1heHAASQA9AAABOAAAACBuYW1lehAVOgAAA6AAAAIHcG9z" >- "dP+uADUAAAWoAAAAKgABAAAAAQAAMhPyuV8PPPUACwPoAA" >- "AAAMU4Lm0AAAAAxTgubQAh/5wFeAK8AAAACAACAAAAAAAA" >- "AAEAAAK8/5wAWgXcAAAAAAV4AAEAAAAAAAAAAAAAAAAAAA" >- "AEAAEAAAAEAAwAAwAAAAAAAgAAAAEAAQAAAEAALgAAAAAA" >- "AQXcAfQABQAAAooCvAAAAIwCigK8AAAB4AAxAQIAAAIABg" >- "kAAAAAAAAAAAABAAAAAAAAAAAAAAAAUGZFZABAAEEAQQMg" >- "/zgAWgK8AGQAAAABAAAAAAAABdwAIQAAAAAF3AAABdwAZA" >- "AAAAMAAAADAAAAHAABAAAAAAA8AAMAAQAAABwABAAgAAAA" >- "BAAEAAEAAABB//8AAABB////wgABAAAAAAAAAQYAAAEAAA" >- "AAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >- "AAAAAAAAAAAAAAAAAAAhAnkAAAAqACoAKgBGAAAAAgAhAA" >- "ABKgKaAAMABwAusQEALzyyBwQA7TKxBgXcPLIDAgDtMgCx" >- "AwAvPLIFBADtMrIHBgH8PLIBAgDtMjMRIREnMxEjIQEJ6M" >- "fHApr9ZiECWAAAAwBk/5wFeAK8AAMABwALAAABNSEVATUh" >- "FQE1IRUB9AH0/UQDhPu0BRQB9MjI/tTIyP7UyMgAAAAAAA" >- "4ArgABAAAAAAAAACYATgABAAAAAAABAAUAgQABAAAAAAAC" >- "AAYAlQABAAAAAAADACEA4AABAAAAAAAEAAUBDgABAAAAAA" >- "AFABABNgABAAAAAAAGAAUBUwADAAEECQAAAEwAAAADAAEE" >- "CQABAAoAdQADAAEECQACAAwAhwADAAEECQADAEIAnAADAA" >- "EECQAEAAoBAgADAAEECQAFACABFAADAAEECQAGAAoBRwBD" >- "AG8AcAB5AHIAaQBnAGgAdAAgACgAYwApACAAMgAwADAAOA" >- "AgAE0AbwB6AGkAbABsAGEAIABDAG8AcgBwAG8AcgBhAHQA" >- "aQBvAG4AAENvcHlyaWdodCAoYykgMjAwOCBNb3ppbGxhIE" >- "NvcnBvcmF0aW9uAABNAGEAcgBrAEEAAE1hcmtBAABNAGUA" >- "ZABpAHUAbQAATWVkaXVtAABGAG8AbgB0AEYAbwByAGcAZQ" >- "AgADIALgAwACAAOgAgAE0AYQByAGsAQQAgADoAIAA1AC0A" >- "MQAxAC0AMgAwADAAOAAARm9udEZvcmdlIDIuMCA6IE1hcm" >- "tBIDogNS0xMS0yMDA4AABNAGEAcgBrAEEAAE1hcmtBAABW" >- "AGUAcgBzAGkAbwBuACAAMAAwADEALgAwADAAMAAgAABWZX" >- "JzaW9uIDAwMS4wMDAgAABNAGEAcgBrAEEAAE1hcmtBAAAA" >- "AgAAAAAAAP+DADIAAAABAAAAAAAAAAAAAAAAAAAAAAAEAA" >- "AAAQACACQAAAAAAAH//wACAAAAAQAAAADEPovuAAAAAMU4" >- "Lm0AAAAAxTgubQ=="); >+ return decodebytes(b"AAEAAAANAIAAAwBQRkZUTU6u6MkAAAXcAAAAHE9TLzJWYW" >+ b"QKAAABWAAAAFZjbWFwAA8D7wAAAcAAAAFCY3Z0IAAhAnkA" >+ b"AAMEAAAABGdhc3D//wADAAAF1AAAAAhnbHlmCC6aTwAAAx" >+ b"QAAACMaGVhZO8ooBcAAADcAAAANmhoZWEIkAV9AAABFAAA" >+ b"ACRobXR4EZQAhQAAAbAAAAAQbG9jYQBwAFQAAAMIAAAACm" >+ b"1heHAASQA9AAABOAAAACBuYW1lehAVOgAAA6AAAAIHcG9z" >+ b"dP+uADUAAAWoAAAAKgABAAAAAQAAMhPyuV8PPPUACwPoAA" >+ b"AAAMU4Lm0AAAAAxTgubQAh/5wFeAK8AAAACAACAAAAAAAA" >+ b"AAEAAAK8/5wAWgXcAAAAAAV4AAEAAAAAAAAAAAAAAAAAAA" >+ b"AEAAEAAAAEAAwAAwAAAAAAAgAAAAEAAQAAAEAALgAAAAAA" >+ b"AQXcAfQABQAAAooCvAAAAIwCigK8AAAB4AAxAQIAAAIABg" >+ b"kAAAAAAAAAAAABAAAAAAAAAAAAAAAAUGZFZABAAEEAQQMg" >+ b"/zgAWgK8AGQAAAABAAAAAAAABdwAIQAAAAAF3AAABdwAZA" >+ b"AAAAMAAAADAAAAHAABAAAAAAA8AAMAAQAAABwABAAgAAAA" >+ b"BAAEAAEAAABB//8AAABB////wgABAAAAAAAAAQYAAAEAAA" >+ b"AAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" >+ b"AAAAAAAAAAAAAAAAAAAhAnkAAAAqACoAKgBGAAAAAgAhAA" >+ b"ABKgKaAAMABwAusQEALzyyBwQA7TKxBgXcPLIDAgDtMgCx" >+ b"AwAvPLIFBADtMrIHBgH8PLIBAgDtMjMRIREnMxEjIQEJ6M" >+ b"fHApr9ZiECWAAAAwBk/5wFeAK8AAMABwALAAABNSEVATUh" >+ b"FQE1IRUB9AH0/UQDhPu0BRQB9MjI/tTIyP7UyMgAAAAAAA" >+ b"4ArgABAAAAAAAAACYATgABAAAAAAABAAUAgQABAAAAAAAC" >+ b"AAYAlQABAAAAAAADACEA4AABAAAAAAAEAAUBDgABAAAAAA" >+ b"AFABABNgABAAAAAAAGAAUBUwADAAEECQAAAEwAAAADAAEE" >+ b"CQABAAoAdQADAAEECQACAAwAhwADAAEECQADAEIAnAADAA" >+ b"EECQAEAAoBAgADAAEECQAFACABFAADAAEECQAGAAoBRwBD" >+ b"AG8AcAB5AHIAaQBnAGgAdAAgACgAYwApACAAMgAwADAAOA" >+ b"AgAE0AbwB6AGkAbABsAGEAIABDAG8AcgBwAG8AcgBhAHQA" >+ b"aQBvAG4AAENvcHlyaWdodCAoYykgMjAwOCBNb3ppbGxhIE" >+ b"NvcnBvcmF0aW9uAABNAGEAcgBrAEEAAE1hcmtBAABNAGUA" >+ b"ZABpAHUAbQAATWVkaXVtAABGAG8AbgB0AEYAbwByAGcAZQ" >+ b"AgADIALgAwACAAOgAgAE0AYQByAGsAQQAgADoAIAA1AC0A" >+ b"MQAxAC0AMgAwADAAOAAARm9udEZvcmdlIDIuMCA6IE1hcm" >+ b"tBIDogNS0xMS0yMDA4AABNAGEAcgBrAEEAAE1hcmtBAABW" >+ b"AGUAcgBzAGkAbwBuACAAMAAwADEALgAwADAAMAAgAABWZX" >+ b"JzaW9uIDAwMS4wMDAgAABNAGEAcgBrAEEAAE1hcmtBAAAA" >+ b"AgAAAAAAAP+DADIAAAABAAAAAAAAAAAAAAAAAAAAAAAEAA" >+ b"AAAQACACQAAAAAAAH//wACAAAAAQAAAADEPovuAAAAAMU4" >+ b"Lm0AAAAAxTgubQ==") > > def generate_report_headers_payload(request, server_data): >- stashed_data = request.server.stash.take(request.GET["id"]) >+ stashed_data = request.server.stash.take(request.GET[b"id"]) > return stashed_data > > def main(request, response): > handler = lambda data: generate_payload(request, data) >- content_type = 'application/x-font-truetype' >+ content_type = b'application/x-font-truetype' > >- if "report-headers" in request.GET: >+ if b"report-headers" in request.GET: > handler = lambda data: generate_report_headers_payload(request, data) >- content_type = 'application/json' >+ content_type = b'application/json' > > subresource.respond(request, > response, > payload_generator = handler, > content_type = content_type, >- access_control_allow_origin = "*") >+ access_control_allow_origin = b"*") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/image.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/image.py >index 42ebc0767bbea9d3d50f4a3f23c7863748e6908d..6991224717e70becbd45709461a3f807c40b2081 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/image.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/image.py >@@ -1,6 +1,11 @@ >-import os, sys, array, math, StringIO >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+import os, sys, array, math >+ >+from six import BytesIO >+ >+from wptserve.utils import isomorphic_decode >+ >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > class Image: > """This class partially implements the interface of the PIL.Image.Image. >@@ -36,9 +41,9 @@ def putdata(self, color_data): > def save(self, f, type): > assert type == "BMP" > # 54 bytes of preambule + image color data. >- filesize = 54 + 3 * self.width * self.height; >+ filesize = 54 + 3 * self.width * self.height > # 14 bytes of header. >- bmpfileheader = bytearray(['B', 'M'] + self._int_to_bytes(filesize) + >+ bmpfileheader = bytearray([ord('B'), ord('M')] + self._int_to_bytes(filesize) + > [0, 0, 0, 0, 54, 0, 0, 0]) > # 40 bytes of info. > bmpinfoheader = bytearray([40, 0, 0, 0] + >@@ -47,7 +52,7 @@ def save(self, f, type): > [1, 0, 24] + (25 * [0])) > > padlength = (4 - (self.width * 3) % 4) % 4 >- bmppad = bytearray([0, 0, 0]); >+ bmppad = bytearray([0, 0, 0]) > padding = bmppad[0 : padlength] > > f.write(bmpfileheader) >@@ -59,7 +64,7 @@ def save(self, f, type): > f.write(padding) > > def encode_string_as_bmp_image(string_data): >- data_bytes = array.array("B", string_data) >+ data_bytes = array.array("B", string_data.encode("utf-8")) > > num_bytes = len(data_bytes) > >@@ -79,33 +84,33 @@ def encode_string_as_bmp_image(string_data): > img.putdata(color_data) > > # Flush image to string. >- f = StringIO.StringIO() >+ f = BytesIO() > img.save(f, "BMP") > f.seek(0) > > return f.read() > > def generate_payload(request, server_data): >- data = ('{"headers": %(headers)s}') % server_data >- if "id" in request.GET: >- request.server.stash.put(request.GET["id"], data) >+ data = (u'{"headers": %(headers)s}') % server_data >+ if b"id" in request.GET: >+ request.server.stash.put(request.GET[b"id"], data) > data = encode_string_as_bmp_image(data) > return data > > def generate_report_headers_payload(request, server_data): >- stashed_data = request.server.stash.take(request.GET["id"]) >+ stashed_data = request.server.stash.take(request.GET[b"id"]) > return stashed_data > > def main(request, response): > handler = lambda data: generate_payload(request, data) >- content_type = 'image/bmp' >+ content_type = b'image/bmp' > >- if "report-headers" in request.GET: >+ if b"report-headers" in request.GET: > handler = lambda data: generate_report_headers_payload(request, data) >- content_type = 'application/json' >+ content_type = b'application/json' > > subresource.respond(request, > response, > payload_generator = handler, > content_type = content_type, >- access_control_allow_origin = "*") >+ access_control_allow_origin = b"*") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/referrer.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/referrer.py >index ad9e24847a108826db1e7124c7bff6f6f1a3fd5c..e36631479e60fab893de7e02d55a3f2ec2a32a15 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/referrer.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/referrer.py >@@ -1,4 +1,4 @@ > def main(request, response): >- referrer = request.headers.get("referer", "") >- response_headers = [("Content-Type", "text/javascript")]; >- return (200, response_headers, "window.referrer = '" + referrer + "'") >+ referrer = request.headers.get(b"referer", b"") >+ response_headers = [(b"Content-Type", b"text/javascript")] >+ return (200, response_headers, b"window.referrer = '" + referrer + b"'") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/script.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/script.py >index 9d7cd0469f0ef9d2da9c322db4257cbdfbf310e8..9701816b9fa126dfe4f855abefedeafaf4e34573 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/script.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/script.py >@@ -1,13 +1,14 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+ >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(server_data): >- return subresource.get_template("script.js.template") % server_data >+ return subresource.get_template(u"script.js.template") % server_data > > def main(request, response): > subresource.respond(request, > response, > payload_generator = generate_payload, >- content_type = "application/javascript") >- >+ content_type = b"application/javascript") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/shared-worker.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/shared-worker.py >index d8fd6876449ee844a758b2b1028588d866746d9e..bdfb61bbb3f4f54bdcb34c9b70d4f6849b14fbec 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/shared-worker.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/shared-worker.py >@@ -1,12 +1,13 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(server_data): >- return subresource.get_template("shared-worker.js.template") % server_data >+ return subresource.get_template(u"shared-worker.js.template") % server_data > > def main(request, response): > subresource.respond(request, > response, > payload_generator = generate_payload, >- content_type = "application/javascript") >+ content_type = b"application/javascript") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/static-import.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/static-import.py >index 0a97dd1a32652b9f41edcb56eefe197ec4276ce1..435753eefb6215699dce9f6201c723055cd31949 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/static-import.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/static-import.py >@@ -1,11 +1,14 @@ >-import os, sys, urllib >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+import os, sys >+from six.moves.urllib.parse import unquote >+ >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(request): >- import_url = urllib.unquote(request.GET['import_url']) >- return subresource.get_template("static-import.js.template") % { >- "import_url": import_url >+ import_url = unquote(isomorphic_decode(request.GET[b'import_url'])) >+ return subresource.get_template(u"static-import.js.template") % { >+ u"import_url": import_url > } > > def main(request, response): >@@ -13,4 +16,4 @@ def main(request, response): > subresource.respond(request, > response, > payload_generator = payload_generator, >- content_type = "application/javascript") >+ content_type = b"application/javascript") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/stylesheet.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/stylesheet.py >index ec62a8cd5f282130f66c1bdfe47240ca4cc625af..29079af922894a3ae052a807f269dde23fbfde4c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/stylesheet.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/stylesheet.py >@@ -1,54 +1,55 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(request, server_data): >- data = ('{"headers": %(headers)s}') % server_data >- type = 'image' >- if "type" in request.GET: >- type = request.GET["type"] >+ data = (u'{"headers": %(headers)s}') % server_data >+ type = b'image' >+ if b"type" in request.GET: >+ type = request.GET[b"type"] > >- if "id" in request.GET: >- request.server.stash.put(request.GET["id"], data) >+ if b"id" in request.GET: >+ request.server.stash.put(request.GET[b"id"], data) > >- if type == 'image': >- return subresource.get_template("image.css.template") % {"id": request.GET["id"]} >+ if type == b'image': >+ return subresource.get_template(u"image.css.template") % {u"id": isomorphic_decode(request.GET[b"id"])} > >- elif type == 'font': >- return subresource.get_template("font.css.template") % {"id": request.GET["id"]} >+ elif type == b'font': >+ return subresource.get_template(u"font.css.template") % {u"id": isomorphic_decode(request.GET[b"id"])} > >- elif type == 'svg': >- return subresource.get_template("svg.css.template") % { >- "id": request.GET["id"], >- "property": request.GET["property"]} >+ elif type == b'svg': >+ return subresource.get_template(u"svg.css.template") % { >+ u"id": isomorphic_decode(request.GET[b"id"]), >+ u"property": isomorphic_decode(request.GET[b"property"])} > > def generate_import_rule(request, server_data): >- return "@import url('%(url)s');" % { >- "url": subresource.create_url(request, swap_origin=True, >- query_parameter_to_remove="import-rule") >+ return u"@import url('%(url)s');" % { >+ u"url": subresource.create_url(request, swap_origin=True, >+ query_parameter_to_remove=u"import-rule") > } > > def generate_report_headers_payload(request, server_data): >- stashed_data = request.server.stash.take(request.GET["id"]) >+ stashed_data = request.server.stash.take(request.GET[b"id"]) > return stashed_data > > def main(request, response): > payload_generator = lambda data: generate_payload(request, data) >- content_type = "text/css" >- referrer_policy = "unsafe-url" >- if "import-rule" in request.GET: >+ content_type = b"text/css" >+ referrer_policy = b"unsafe-url" >+ if b"import-rule" in request.GET: > payload_generator = lambda data: generate_import_rule(request, data) > >- if "report-headers" in request.GET: >+ if b"report-headers" in request.GET: > payload_generator = lambda data: generate_report_headers_payload(request, data) >- content_type = 'application/json' >+ content_type = b'application/json' > >- if "referrer-policy" in request.GET: >- referrer_policy = request.GET["referrer-policy"] >+ if b"referrer-policy" in request.GET: >+ referrer_policy = request.GET[b"referrer-policy"] > > subresource.respond( > request, > response, > payload_generator = payload_generator, > content_type = content_type, >- maybe_additional_headers = { "Referrer-Policy": referrer_policy }) >+ maybe_additional_headers = { b"Referrer-Policy": referrer_policy }) >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/subresource.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/subresource.py >index 582378d41fa38a29da1bbda9a3065d4585a36875..0416c324b31de08fe95bd955129793c6d750324c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/subresource.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/subresource.py >@@ -1,10 +1,13 @@ >-import os, json, urllib, urlparse >+import os, json >+from six.moves.urllib.parse import parse_qsl, SplitResult, urlencode, urlsplit, urlunsplit >+ >+from wptserve.utils import isomorphic_decode, isomorphic_encode > > def get_template(template_basename): >- script_directory = os.path.dirname(os.path.abspath(__file__)) >+ script_directory = os.path.dirname(os.path.abspath(isomorphic_decode(__file__))) > template_directory = os.path.abspath(os.path.join(script_directory, >- "template")) >- template_filename = os.path.join(template_directory, template_basename); >+ u"template")) >+ template_filename = os.path.join(template_directory, template_basename) > > with open(template_filename, "r") as f: > return f.read() >@@ -13,15 +16,15 @@ def get_template(template_basename): > def redirect(url, response): > response.add_required_headers = False > response.writer.write_status(301) >- response.writer.write_header("access-control-allow-origin", "*") >- response.writer.write_header("location", url) >+ response.writer.write_header(b"access-control-allow-origin", b"*") >+ response.writer.write_header(b"location", isomorphic_encode(url)) > response.writer.end_headers() >- response.writer.write("") >+ response.writer.write(u"") > > > # TODO(kristijanburnik): subdomain_prefix is a hardcoded value aligned with > # referrer-policy-test-case.js. The prefix should be configured in one place. >-def __get_swapped_origin_netloc(netloc, subdomain_prefix = "www1."): >+def __get_swapped_origin_netloc(netloc, subdomain_prefix = u"www1."): > if netloc.startswith(subdomain_prefix): > return netloc[len(subdomain_prefix):] > else: >@@ -40,16 +43,16 @@ def create_url(request, > swap_scheme=False, > swap_origin=False, > downgrade=False, >- query_parameter_to_remove="redirection"): >- parsed = urlparse.urlsplit(request.url) >+ query_parameter_to_remove=u"redirection"): >+ parsed = urlsplit(request.url) > destination_netloc = parsed.netloc > > scheme = parsed.scheme > if swap_scheme: >- scheme = "http" if parsed.scheme == "https" else "https" >- hostname = parsed.netloc.split(':')[0] >- port = request.server.config["ports"][scheme][0] >- destination_netloc = ":".join([hostname, str(port)]) >+ scheme = u"http" if parsed.scheme == u"https" else u"https" >+ hostname = parsed.netloc.split(u':')[0] >+ port = request.server.config[u"ports"][scheme][0] >+ destination_netloc = u":".join([hostname, str(port)]) > > if downgrade: > # These rely on some unintuitive cleverness due to WPT's test setup: >@@ -58,107 +61,107 @@ def create_url(request, > # which will be upgraded to `https://[domain]:[https-port]`. > # If the upgrade fails, the load will fail, as we don't serve HTTP over > # the secure port. >- if parsed.scheme == "https": >- scheme = "http" >- elif parsed.scheme == "wss": >- scheme = "ws" >+ if parsed.scheme == u"https": >+ scheme = u"http" >+ elif parsed.scheme == u"wss": >+ scheme = u"ws" > else: >- raise ValueError("Downgrade redirection: Invalid scheme '%s'" % >+ raise ValueError(u"Downgrade redirection: Invalid scheme '%s'" % > parsed.scheme) >- hostname = parsed.netloc.split(':')[0] >- port = request.server.config["ports"][parsed.scheme][0] >- destination_netloc = ":".join([hostname, str(port)]) >+ hostname = parsed.netloc.split(u':')[0] >+ port = request.server.config[u"ports"][parsed.scheme][0] >+ destination_netloc = u":".join([hostname, str(port)]) > > if swap_origin: > destination_netloc = __get_swapped_origin_netloc(destination_netloc) > >- parsed_query = urlparse.parse_qsl(parsed.query, keep_blank_values=True) >- parsed_query = filter(lambda x: x[0] != query_parameter_to_remove, >- parsed_query) >+ parsed_query = parse_qsl(parsed.query, keep_blank_values=True) >+ parsed_query = [x for x in parsed_query if x[0] != query_parameter_to_remove] > >- destination_url = urlparse.urlunsplit(urlparse.SplitResult( >+ destination_url = urlunsplit(SplitResult( > scheme = scheme, > netloc = destination_netloc, > path = parsed.path, >- query = urllib.urlencode(parsed_query), >+ query = urlencode(parsed_query), > fragment = None)) > > return destination_url > > > def preprocess_redirection(request, response): >- if "redirection" not in request.GET: >+ if b"redirection" not in request.GET: > return False > >- redirection = request.GET["redirection"] >+ redirection = request.GET[b"redirection"] > >- if redirection == "no-redirect": >+ if redirection == b"no-redirect": > return False >- elif redirection == "keep-scheme": >+ elif redirection == b"keep-scheme": > redirect_url = create_url(request, swap_scheme=False) >- elif redirection == "swap-scheme": >+ elif redirection == b"swap-scheme": > redirect_url = create_url(request, swap_scheme=True) >- elif redirection == "downgrade": >+ elif redirection == b"downgrade": > redirect_url = create_url(request, downgrade=True) >- elif redirection == "keep-origin": >+ elif redirection == b"keep-origin": > redirect_url = create_url(request, swap_origin=False) >- elif redirection == "swap-origin": >+ elif redirection == b"swap-origin": > redirect_url = create_url(request, swap_origin=True) > else: >- raise ValueError("Invalid redirection type '%s'" % redirection) >+ raise ValueError(u"Invalid redirection type '%s'" % isomorphic_decode(redirection)) > > redirect(redirect_url, response) > return True > > > def preprocess_stash_action(request, response): >- if "action" not in request.GET: >+ if b"action" not in request.GET: > return False > >- action = request.GET["action"] >+ action = request.GET[b"action"] > >- key = request.GET["key"] >+ key = request.GET[b"key"] > stash = request.server.stash >- path = request.GET.get("path", request.url.split('?'))[0] >+ path = request.GET[b"path"] if b"path" in request.GET \ >+ else isomorphic_encode(request.url.split(u'?')[0]) > >- if action == "put": >- value = request.GET["value"] >+ if action == b"put": >+ value = isomorphic_decode(request.GET[b"value"]) > stash.take(key=key, path=path) > stash.put(key=key, value=value, path=path) >- response_data = json.dumps({"status": "success", "result": key}) >- elif action == "purge": >+ response_data = json.dumps({u"status": u"success", u"result": isomorphic_decode(key)}) >+ elif action == b"purge": > value = stash.take(key=key, path=path) > return False >- elif action == "take": >+ elif action == b"take": > value = stash.take(key=key, path=path) > if value is None: >- status = "allowed" >+ status = u"allowed" > else: >- status = "blocked" >- response_data = json.dumps({"status": status, "result": value}) >+ status = u"blocked" >+ response_data = json.dumps({u"status": status, u"result": value}) > else: > return False > > response.add_required_headers = False > response.writer.write_status(200) >- response.writer.write_header("content-type", "text/javascript") >- response.writer.write_header("cache-control", "no-cache; must-revalidate") >+ response.writer.write_header(b"content-type", b"text/javascript") >+ response.writer.write_header(b"cache-control", b"no-cache; must-revalidate") > response.writer.end_headers() > response.writer.write(response_data) > return True > > > def __noop(request, response): >- return "" >+ return u"" > > > def respond(request, > response, > status_code = 200, >- content_type = "text/html", >+ content_type = b"text/html", > payload_generator = __noop, >- cache_control = "no-cache; must-revalidate", >- access_control_allow_origin = "*", >+ cache_control = b"no-cache; must-revalidate", >+ access_control_allow_origin = b"*", > maybe_additional_headers = None): > if preprocess_redirection(request, response): > return >@@ -170,10 +173,10 @@ def respond(request, > response.writer.write_status(status_code) > > if access_control_allow_origin != None: >- response.writer.write_header("access-control-allow-origin", >+ response.writer.write_header(b"access-control-allow-origin", > access_control_allow_origin) >- response.writer.write_header("content-type", content_type) >- response.writer.write_header("cache-control", cache_control) >+ response.writer.write_header(b"content-type", content_type) >+ response.writer.write_header(b"cache-control", cache_control) > > additional_headers = maybe_additional_headers or {} > for header, value in additional_headers.items(): >@@ -181,9 +184,16 @@ def respond(request, > > response.writer.end_headers() > >- server_data = {"headers": json.dumps(request.headers, indent = 4)} >+ new_headers = {} >+ new_val = [] >+ for key, val in request.headers.items(): >+ if len(val) == 1: >+ new_val = isomorphic_decode(val[0]) >+ else: >+ new_val = [isomorphic_decode(x) for x in val] >+ new_headers[isomorphic_decode(key)] = new_val >+ >+ server_data = {u"headers": json.dumps(new_headers, indent = 4)} > > payload = payload_generator(server_data) > response.writer.write(payload) >- >- >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/svg.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/svg.py >index 6353079bb89e190d1851a153109f5c9d2cfeb654..9c569e3bf52c4a712e80dbf06480aaaf110f6463 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/svg.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/svg.py >@@ -1,34 +1,35 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(request, server_data): >- data = ('{"headers": %(headers)s}') % server_data >- if "id" in request.GET: >+ data = (u'{"headers": %(headers)s}') % server_data >+ if b"id" in request.GET: > with request.server.stash.lock: >- request.server.stash.take(request.GET["id"]) >- request.server.stash.put(request.GET["id"], data) >- return "<svg xmlns='http://www.w3.org/2000/svg'></svg>"; >+ request.server.stash.take(request.GET[b"id"]) >+ request.server.stash.put(request.GET[b"id"], data) >+ return u"<svg xmlns='http://www.w3.org/2000/svg'></svg>" > > def generate_payload_embedded(request, server_data): >- return subresource.get_template("svg.embedded.template") % { >- "id": request.GET["id"], >- "property": request.GET["property"]}; >+ return subresource.get_template(u"svg.embedded.template") % { >+ u"id": isomorphic_decode(request.GET[b"id"]), >+ u"property": isomorphic_decode(request.GET[b"property"])} > > def generate_report_headers_payload(request, server_data): >- stashed_data = request.server.stash.take(request.GET["id"]) >+ stashed_data = request.server.stash.take(request.GET[b"id"]) > return stashed_data > > def main(request, response): > handler = lambda data: generate_payload(request, data) >- content_type = 'image/svg+xml' >+ content_type = b'image/svg+xml' > >- if "embedded-svg" in request.GET: >+ if b"embedded-svg" in request.GET: > handler = lambda data: generate_payload_embedded(request, data) > >- if "report-headers" in request.GET: >+ if b"report-headers" in request.GET: > handler = lambda data: generate_report_headers_payload(request, data) >- content_type = 'application/json' >+ content_type = b'application/json' > > subresource.respond(request, > response, >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/video.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/video.py >index c8d8548ac3eaef9122347de6ef05cd7a230c6f96..7cfbbfa68c8dc6ebba18308188e14000d28ab379 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/video.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/video.py >@@ -1,9 +1,10 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(request, server_data): >- file = os.path.join(request.doc_root, "media", "movie_5.ogv") >+ file = os.path.join(request.doc_root, u"media", u"movie_5.ogv") > return open(file, "rb").read() > > >@@ -12,6 +13,5 @@ def main(request, response): > subresource.respond(request, > response, > payload_generator = handler, >- access_control_allow_origin = "*", >- content_type = "video/ogg") >- >+ access_control_allow_origin = b"*", >+ content_type = b"video/ogg") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/worker.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/worker.py >index 85c1f67a9675a992e9d00ed70feafea0e8b0eb30..f655633b5db68ec66be298b73e97ab0084cc095e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/worker.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/worker.py >@@ -1,12 +1,13 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(server_data): >- return subresource.get_template("worker.js.template") % server_data >+ return subresource.get_template(u"worker.js.template") % server_data > > def main(request, response): > subresource.respond(request, > response, > payload_generator = generate_payload, >- content_type = "application/javascript") >+ content_type = b"application/javascript") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/xhr.py b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/xhr.py >index 82a4cb0b657956cb20efcfb0142ad4040875eabe..75921e9156921bda8af0d1231997dfc5a61e726f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/xhr.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/subresource/xhr.py >@@ -1,15 +1,16 @@ > import os, sys >-sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) >-import subresource >+from wptserve.utils import isomorphic_decode >+import importlib >+subresource = importlib.import_module("common.security-features.subresource.subresource") > > def generate_payload(server_data): >- data = ('{"headers": %(headers)s}') % server_data >+ data = (u'{"headers": %(headers)s}') % server_data > return data > > def main(request, response): > subresource.respond(request, > response, > payload_generator = generate_payload, >- access_control_allow_origin = "*", >- content_type = "application/json") >- >+ access_control_allow_origin = b"*", >+ content_type = b"application/json", >+ cache_control = b"no-store") >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/w3c-import.log >index 413e8e8b76afc739975601bff2ee76123ac398fa..1edd8b1e1999650a1c55c5aab1177dc52082b9c7 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/security-features/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/security-features/w3c-import.log >@@ -15,4 +15,5 @@ None > ------------------------------------------------------------------------ > List of files: > /LayoutTests/imported/w3c/web-platform-tests/common/security-features/README.md >+/LayoutTests/imported/w3c/web-platform-tests/common/security-features/__init__.py > /LayoutTests/imported/w3c/web-platform-tests/common/security-features/types.md >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/slow.py b/LayoutTests/imported/w3c/web-platform-tests/common/slow.py >index f3b1c7e2ea61b571bd56cc1c70c5f89bb8e7e4dc..5329a04ed2d7b8a8de09673d9d8a5d3768f3cb5a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/slow.py >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/slow.py >@@ -2,4 +2,4 @@ > > def main(request, response): > time.sleep(2) >- return 200, [], '' >+ return 200, [], b'' >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/square.png b/LayoutTests/imported/w3c/web-platform-tests/common/square.png >new file mode 100644 >index 0000000000000000000000000000000000000000..01c9666a8de9d5535615aff830810e5df4b2156f >GIT binary patch >literal 18299 >zcmeI3cT`hZx4<vL0D=??q9RTxDk7<*kQhP<RhmE$u&3OF2qb|-DUJ-N2$oMoRGKhY >z>8PM6f{KXPL2#^~i~=G$;2XffQGxG<?p3qqy*KZz_1;R>N^<wvXYYN_Z=bX8Ie*+8 >z%iJ9`)aIxG0HERQWakC_bEIEYW$0J*@&E(+n=Eqj7XyI$bm><CNINtO0MtDAbo#Po >z0YZsT93T`SoauCgC{)Ph2Y~<({xrjz$MEi$Y1#L@*VZLIdcTX%OGg#qWxFeSM&bff >zgUQ-U;|&f!(eb=8)!tr7??zU<;+{RxyLCLxrtDOEtkP<5WY5;4@jGvQda>zf;KPc( >zS9b@_KBBc3^kkIOsZ^>?Ip}2WNr;}3Yddf1Z(FZd*Su&&S;wduivVra5{`km-$()Y >z5JjafHmp>+1So{xS62lp-O?*DbK?fJ-q@zDQi$HBP$@~Ya8Zq(0a!=wu{{A;J19hF >zq%80TvXp>zx7n-~U>OovxA5mz_krk)52>3JfR+0VbQH1@0mO7L-VO*@0u<CO-)Rr{ >zVSpK2mufQb7ztpUeYsA+sdGSOt+skGpgIM>c*e&r0+coZ>uwksg#+7Cff)|nzSKV! >z7iqVfLZniQsb$7w`<Rug$Pg7@U(`I4T4&wGGl<Md%rt9MRYdA+Tnt|8x1Kuykd>$d >zjkc#hyjHWQwwAc3RC6uz&1L05Ll&!Lpsg-nWDNi>BvJJPX6TYR(My!0g9nbx?@|g_ >zqn@>)Zx^>%%la&k)$!D~M<iuqe|T@%lP7Jht&f*h+pc8Z^4&bZt6E#>+aL5-6!ml8 >z``<3TG>*Zoj&W4_@LScLUf1Ju>-J6F#%g+%;Q0BR`rv2%`-audtTI2-87-dELiX6D >z?e4)HH{4;nZ_%~+4TGGQ&1RnzY0U)S)Owo2rbJ}UYPRB^E(^8&B$Y4w0HC{Ec;#0U >zRmJFltuN}r2H#orJ7&!XqPfodLI7ZmoiU1WtHkQMDgfAJ#h9M5(d)f3%dAp)?v)>! >zuBd-rN8Dy>TwP_WZL7wKo*TMuQNb2llkIm;>6@-Y|7xv|uk;Mqo+Q#lRr#FPv=nK5 >zWU6LfF{y}|tYmXTbvo1FX}kh!r=QUtRo&Fs4+dA9l&0-6M%;{_;c4iSNN~b>?PMT) >zob<abLno2rRykZqTyg`zZTY;t!V$Yarr6W+*C}V|WjUld+Z>Ll-{VNIX$dp4((i?y >znPa(|c)0yuet_1~1RDK1rt<YH74zyK465d;?P&|M$w}<nrwt3H<k!qOwY)&Fe8+os >z-RUr;X)*SdlZi@Uwg~1t8z(<kKljH@If%K&_^D4PlO`)}^Q>BEn3UskX2FH2e^t+7 >z;jnRjPG&|ArzK2BYj29DSCfpV?V#fpmhGM7eEJxpVOoPjgTTwE!z?!)?=;6K>E=^T >zV6h5$zZqijjo8+V)~l`Nt$M8n-7D2HSk@uOK6t-0@w&Bs>FhS`Hhh~hn1ZwMIhyA6 >zEaxy|Dj{KoZQ<ckuall}In(hQ(#UtW&UAJ;UU=ld{W$@;0e$?FuO%0zK07eaJ^7w* >z!|e{o*U7IHd&8z^Y}eU(J)UPWJAIbQEZ*#}StnCmPt3l*YxZ>phJ<~a(w?f7D)jL) >zEj9f~C-Iirfu#o)9MCgGGjj7z<UP+*_v!Ju%}B^y<Gs1a!N=UYC3o_#2lIXMGM2sd >z*7N4&F3E|@<K+k$R>z|J`*$e&Uv<6eK|ki1b$V?}MGZooJ-Z~_%pg!BfBS|QLiK{v >zcc1*U(X>3JU%z~pWnS)KGTnTsxo?SA&wj3zN=r(}heHzg$?YcD$vsg!pU-%==;b24 >z6L{A$EVwE#?_lylzkH{B&wR(X7l}ok*%>D;+L!x(iqW*WzI5TLg^s+0+8;97y`OkL >z%T~*t>1IiJUxdmFJg#@R+%D|0AiFCi^U|8=Ojlv{^N5S>ALnjH_cQu~KW4vooZ_ck >zGR0WAaZ2qh>NP@$kgAWq-uQ<nef3pq`f=s~X7Y<|iDmWFqYoVZ<)F2jU$d&kxFxtI >zxaQ~r<pl-{T-@Hcb)|W^m7Q30Vu|Y#*Xwuh+&yylVJacr68i|(p5C7RD82dIx)tFo >z%t~`g&x6jztt(FWca>HMVpov;kNf$oSY6^!m{B<YVR>PB_SEb$_ayiH%!j<Ir~W9t >zS(<xp_NlhV%8f;(!KIs-JeDr++_j>sT}c;{HecBMuYOAvjkqV8`T8sLqr_)IXHb?? >zo~P9w>ayB=t@mIDn&(%iUH90$rF8o3Mb-Qa@AUhQJY8OycxzAmt{pC0ZljWEsC2!W >zXE!dkE|t6wS^Xli;eAGWNqSXhPUFcgVi&(FuIZOM_+J)f`kRaIUA;m7&9klEO8u7u >zn84<OC=a?v4DW2a5t@xo^eudJ>fG_LygueTUD}_t&|g|;EmYET+;ji6cSx1zZk)UA >zaaEYPHny4mv(X@DFmkXS$c~<`z*F22V-vG-(x(rRKN(!!V?}8M|15seX|p@4%tps1 >zVN2nbwkw4O0XKf%TWHYNo>H4w%h!xu7WMk!Jr(9F=B}$zQx?X?#rkfy+9Qhhn^TWX >zCWO^D(Z$VnAMFm>Jx}LhJ;*1KO9`g5Jk)yXQ_=<e1*;kq*Z<A~zYIU;AeXshlxY!B >z5Ok^eb7xQ7%Z!)mEt_;x&^K0#A`aJ9^~Pq;%tcKzqa3t$jd!=${~tEmra3cr&+ncd >zHh+&=M3sIO&k$WttdD<8Uu8Paz1zvuEpp%Qi4}wh<7?)}&DzSgEzI3p;i}>KES-`$ >zGi@Ux7-vbjh~2s`ac_uio`G9ZDen#M6?fz90x-6C;F@69IrO{(DmMd5_7?o$k5ntQ >zJ@J~c!sL;uN-+=g<zBwK;}-c~e&*u4op(xZHSQ%HdiTp<=d`M6FZPul-|pgz)c1RJ >zv0y#9m>Lq%sMezM!{Y7Bl?$lncb1w4Kk&%!^i3{`y0{?HEih)ym0Me`oK*;XtL~%L >z7Q6Xv)1%JS9)4*5=CjO?+cWfNIy-h2&1lq3*7^CdNmF>6UYzjO<<zGAXL9qa%Q$u1 >z25!fz=g7>Jng{ceUnOe_G@d*?qtU$lOy~PQ?Hkd_cTF10x0ce&j$WpouK=@e*4|xW >z#W=?3Wqf21yBeOIWj^{KsPEF-RPiVN_XmwDEBg9rH!n5%DEPQN;64C9Ie#kYvntw= >z*YV-tr{L9v?!h6Q*A*KS`&EoIOCOc}`ar+IlHrx`aPeD5&Fep28pwDThSVTx`26co >z%}XPZT|{d~-{j`Lc^Z_b8+UIic%gFt$Bp_tee`<UwC*&AbnmoJD_JWqc-*1YKYa5% >z^0Q;(k6MTDRR4&jJ&c?DryX1FC-J)Lc4r*O*c^rWt7%>1k<v}=?Aqq_TEcf1v?VVZ >z><4$XFR55kyQ=%Vq`SDWZMyGy-?WpIwZU&BZ>R%F_dTwcA1Y5PDq9s;))jg2>?Uqs >zhh8SB_F3=6h(BfyK75c#wtRN6CsNpVt?zyF%x6)d3;Sztmp=(x*i~5JQL(nyy3^(f >z{aM@ttCa&ykKZ-@yuLCltEaxnu}?X6Yu!NN`vfie4+*IWx3_C-f17DRBa>fRh4y!R >z&ZgIK>K0_`4jdV{U8Fk`9rfYC+efwaDfNewyOWbH2mf@u|4rrF*(V!os%qw4x*2Yc >zUDLb#Q|FbirZD|?N1L@gT7N?PY%&<|*Xj4(_p(1F%}z=hR8mao`OG#)HUhwscYKDQ >z#Lvx@!WIUjm>eMsM1=>7pp7U1P_4p6Om-kBL9jp`UtnqYuKcngg3qxu^d-1q+(dLR >zfbSF;3VKJnGuV-VY%<5til#;lr$7#ZK?xHP9vmbPQ^G9`hx}5YYiTpu5HZw65@=~? >zBMpe~b6bX>3qwH!0YyNvF*q!OL`Go=1QH2nhQML4cr*r!#+oCsWC|Wn!C(+0A48fN >zbVUv2a4BAP4kO_p$<i=DA`wy0=&-ObRG2wR7|KIq$z(DbgG1wRNT>%=93hY}!;u29 >z(Xf+IKX#y)9m*F;_(B0f>X*q9Zje|S8cG9=eMZI=EE)?W5Rb5fD5AreA~Y6-L4V7L >z!ydB{Z3qn-x-||P4F-Y1pg<yq?6BXo6OC^E$IQP7Ii~(@U??YUZr?T@z2D&AZ-y32 >z>^DLPMv#6HcGObLh!BBjFHkJp5XuJaH$p=(`qt<reC~L1zVIZ~eD~hLaQ=79q?%!~ >zp{X#OAu2Rh3Oy8LN`#>dp)iOxJj=$<Ptfs6I;#*SZcH{`AU#wqqN3qO;~5|K2ih?u >zAWdqE#Nd%QG6RdFU<ni~5s4u|^Kycd;hr!bZbA;98!^EL35mlquy_iNOd${^`k2rY >z?gLsu9HxZ%x4ca3JHZc!P2mbdgP9T<KbXk_(INqliXLyA&~t2FQRu=TVJLK4AkCbL >z{#Nrht)P?Yvf+a&P3+}pi*UB56R~6>5s5=#C%T!?Z-SqpIZJUCh$Tz`8+5j#K@BKA >zpF?5e@LY~LfsDjsIRqr0z+xepTpWmGVL28=7K=+Hu?a)TaC4hz{*`MxA$x;#-9fI0 >zOB6@QhTM-24<wQ?EORmoNx)-BNGz5_LNZBETnh^#iNM5TK^&Pi8fb#EuL605@}UaK >z44TkKIu;HTjAMZZnK&#Ci8Z(2An_dOSlAX=Bp1UbVmLT+q6Hfq4e<>(Uxjkwi=lZR >zF=0JGt751|dV?WfwvH--_(Qc$#0(XK(v@s!IJ%U_isM-AliCbb1PYTat&%jhbfJM9 >zD*B7o@!J}+95Lg6ozB09VA%fz^Y6z93jhVOmg%sop<ds2A{KHbVa!m_h6l}%Z`F`5 >z%Ez$FFKytysc7jVC5Zn&kOeVw<9{y)Y%+mMU=p!N3o^z6i6^oxkYqfIhy+<=9F}a( >z#o<Wo(H#G0b1+=y%qe&hg@79^bN@^ZzOLhcClTY5m>s|r@IVd?Jvz40hW}H!`&;F3 >z7|eeycd$p)|BKuWuf{Kn;%K4$x`<MxI}{33fT3c*94dU!1MI7|@mVw6-%nadgEkEH >zC*d&A2aT2fj+jnV!%h8Vn@&{2O~);L1bhh%HxdojJi$u3jT(N!dqX>ZkOmD6-URQx >zj2{jL`PuQI$ER5O7=VT~Vg%QG)6)ODmJ>81mcxmfurnX3pTn)tz8^YrpvTS}UzOIe >z$Im}`F+QY!(kslDJO~VkY*CI&HXoQ)jtd4vwkXFXn-5GY#{~l-Ta@FH%?GBH<AMQ^ >zEy{7p<^$8palwGd7Uj5P^MPsQxL`nJi*j7D`M|VtTreQAML90nd|+BRE*KEmq8yiO >zJ}|8u7YvAOQI1PCADC8-3kF2CD90t64@@h^1p^{ml;e`k2d0(df&q~&%5ll&1JlZJ >z!GOpX<+x<?fobKqU_fMxa$K_cz_fB)Fd(u;IWF0JU|KmY7!cW_9G7f9Fs&RH42Wz| >zj!QNlm{yJp21K?f$0eH&Oe@C)10q|L<C4t>rj_G@0g)}r#HBX=7B47(Ufm6Y-qBq> >zeM1BEelLRU<mCnck@Eo{dMg0@H3<E80Kf(e0K8cT0F)E}&=u}md(8pro9}FA!w7%+ >zd%c1NfKgRC&0Fz@P$9_d*uobpI$V3*>Lwv3O|r9&R#nwjP%!*oy|z{wiCgx35&#Si >bDgs((CoOJ&@$4~l+kmsZyIqm(x-I_(KvUo& > >literal 0 >HcmV?d00001 > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/stringifiers.js b/LayoutTests/imported/w3c/web-platform-tests/common/stringifiers.js >index 4ef7a1bfedaba1835bb44cca9207e0748ba83522..18de6c8c5b32c5e14fb8c0fc24d3b8564a451acf 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/stringifiers.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/stringifiers.js >@@ -2,7 +2,7 @@ > * Runs tests for <http://heycam.github.io/webidl/#es-stringifier>. > * @param {Object} aObject - object to test > * @param {string} aAttribute - IDL attribute name that is annotated with `stringifier` >- * @param {boolean} aIsUnforgeable - whether the IDL attribute is `[Unforgeable]` >+ * @param {boolean} aIsUnforgeable - whether the IDL attribute is `[LegacyUnforgeable]` > */ > function test_stringifier_attribute(aObject, aAttribute, aIsUnforgeable) { > // Step 1. >diff --git a/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log >index 3070152c8a4b854fecd081cd74999d8180f760f8..4b2732e2501e37bb07f3167a2d7ca38400f8fe51 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log >@@ -20,6 +20,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/common/PrefixedPostMessage.js > /LayoutTests/imported/w3c/web-platform-tests/common/PrefixedPostMessage.js.headers > /LayoutTests/imported/w3c/web-platform-tests/common/README.md >+/LayoutTests/imported/w3c/web-platform-tests/common/__init__.py > /LayoutTests/imported/w3c/web-platform-tests/common/arrays.js > /LayoutTests/imported/w3c/web-platform-tests/common/blank.html > /LayoutTests/imported/w3c/web-platform-tests/common/domain-setter.sub.html >@@ -41,6 +42,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/common/rendering-utils.js > /LayoutTests/imported/w3c/web-platform-tests/common/sab.js > /LayoutTests/imported/w3c/web-platform-tests/common/slow.py >+/LayoutTests/imported/w3c/web-platform-tests/common/square.png > /LayoutTests/imported/w3c/web-platform-tests/common/stringifiers.js > /LayoutTests/imported/w3c/web-platform-tests/common/stringifiers.js.headers > /LayoutTests/imported/w3c/web-platform-tests/common/subset-tests-by-key.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/META.yml b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/META.yml >new file mode 100644 >index 0000000000000000000000000000000000000000..cf5525ae1157f7e5d3fe57b3856735b15c91c5d1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/META.yml >@@ -0,0 +1 @@ >+spec: https://webassembly.github.io/spec/js-api/ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt >index e0b9a35edca073aeedbeda2a6891b64d5bfc0f8a..50647c253df959253b2dec39bedca39d6fe7cb03 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt >@@ -13,6 +13,16 @@ FAIL getter order for imports object: BufferSource argument assert_array_equals: > FAIL getter order for imports object: Module argument assert_array_equals: expected property 1 to be "global1 getter" but got "memory getter" (expected array ["module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "memory getter", "module getter", "global2 getter"] got ["module getter", "memory getter", "module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "global2 getter"]) > PASS imports: BufferSource argument > PASS imports: Module argument >+PASS imports with empty module names: BufferSource argument >+PASS imports with empty module names: Module argument >+PASS imports with empty names: BufferSource argument >+PASS imports with empty names: Module argument >+PASS exports with empty name: function: BufferSource argument >+PASS exports with empty name: function: Module argument >+PASS exports with empty name: table: BufferSource argument >+PASS exports with empty name: table: Module argument >+PASS exports with empty name: global: BufferSource argument >+PASS exports with empty name: global: Module argument > PASS No imports: BufferSource argument > PASS No imports: Module argument > PASS exports and imports: BufferSource argument >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt >index e0b9a35edca073aeedbeda2a6891b64d5bfc0f8a..50647c253df959253b2dec39bedca39d6fe7cb03 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt >@@ -13,6 +13,16 @@ FAIL getter order for imports object: BufferSource argument assert_array_equals: > FAIL getter order for imports object: Module argument assert_array_equals: expected property 1 to be "global1 getter" but got "memory getter" (expected array ["module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "memory getter", "module getter", "global2 getter"] got ["module getter", "memory getter", "module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "global2 getter"]) > PASS imports: BufferSource argument > PASS imports: Module argument >+PASS imports with empty module names: BufferSource argument >+PASS imports with empty module names: Module argument >+PASS imports with empty names: BufferSource argument >+PASS imports with empty names: Module argument >+PASS exports with empty name: function: BufferSource argument >+PASS exports with empty name: function: Module argument >+PASS exports with empty name: table: BufferSource argument >+PASS exports with empty name: table: Module argument >+PASS exports with empty name: global: BufferSource argument >+PASS exports with empty name: global: Module argument > PASS No imports: BufferSource argument > PASS No imports: Module argument > PASS exports and imports: BufferSource argument >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ccf6f559384dd1dfd25f8a00c225cf6dacd98751 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt >@@ -0,0 +1,15 @@ >+ >+FAIL i32, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL i32, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL i64, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL i64, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f32, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f32, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f64, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f64, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL anyref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL anyref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL funcref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL funcref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL key ordering undefined is not an object (evaluating 'Object.getOwnPropertyNames(myglobal.type)') >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.js >new file mode 100644 >index 0000000000000000000000000000000000000000..318b1ac578cac6051ea23ecfbb6525fffb325501 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.js >@@ -0,0 +1,64 @@ >+// META: global=window,dedicatedworker,jsshell >+// META: script=/wasm/jsapi/assertions.js >+ >+function assert_type(argument) { >+ const myglobal = new WebAssembly.Global(argument); >+ >+ assert_equals(myglobal.type.value, argument.value); >+ assert_equals(myglobal.type.mutable, argument.mutable); >+} >+ >+test(() => { >+ assert_type({ "value": "i32", "mutable": true}); >+}, "i32, mutable"); >+ >+test(() => { >+ assert_type({ "value": "i32", "mutable": false}); >+}, "i32, immutable"); >+ >+test(() => { >+ assert_type({ "value": "i64", "mutable": true}); >+}, "i64, mutable"); >+ >+test(() => { >+ assert_type({ "value": "i64", "mutable": false}); >+}, "i64, immutable"); >+ >+test(() => { >+ assert_type({ "value": "f32", "mutable": true}); >+}, "f32, mutable"); >+ >+test(() => { >+ assert_type({ "value": "f32", "mutable": false}); >+}, "f32, immutable"); >+ >+test(() => { >+ assert_type({ "value": "f64", "mutable": true}); >+}, "f64, mutable"); >+ >+test(() => { >+ assert_type({ "value": "f64", "mutable": false}); >+}, "f64, immutable"); >+ >+test(() => { >+ assert_type({"value": "externref", "mutable": true}) >+}, "anyref, mutable") >+ >+test(() => { >+ assert_type({"value": "externref", "mutable": false}) >+}, "anyref, immutable") >+ >+test(() => { >+ assert_type({"value": "funcref", "mutable": true}) >+}, "funcref, mutable") >+ >+test(() => { >+ assert_type({"value": "funcref", "mutable": false}) >+}, "funcref, immutable") >+ >+test(() => { >+ const myglobal = new WebAssembly.Global({"value": "i32", "mutable": true}); >+ const propertyNames = Object.getOwnPropertyNames(myglobal.type); >+ assert_equals(propertyNames[0], "mutable"); >+ assert_equals(propertyNames[1], "value"); >+}, "key ordering"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ccf6f559384dd1dfd25f8a00c225cf6dacd98751 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt >@@ -0,0 +1,15 @@ >+ >+FAIL i32, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL i32, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL i64, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL i64, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f32, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f32, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f64, mutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL f64, immutable undefined is not an object (evaluating 'myglobal.type.value') >+FAIL anyref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL anyref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL funcref, mutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL funcref, immutable WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', or 'f64' >+FAIL key ordering undefined is not an object (evaluating 'Object.getOwnPropertyNames(myglobal.type)') >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.worker.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/w3c-import.log >index 418ebdda72a16972d6bd43a204a2f6832d9fdc3a..e527eb5f6ea41014f8c4cd78aca39540e18b37ce 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/w3c-import.log >@@ -16,5 +16,6 @@ None > List of files: > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/constructor.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/toString.any.js >+/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/type.tentative.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/value-get-set.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/global/valueOf.any.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt >index ba38859fc37a08541593197b54957039bab308bc..5738d74822ea1999ce0252923c86231f7c929488 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt >@@ -9,6 +9,11 @@ PASS Empty module with undefined imports argument > PASS Empty module with empty imports argument > FAIL getter order for imports object assert_array_equals: expected property 1 to be "global1 getter" but got "memory getter" (expected array ["module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "memory getter", "module getter", "global2 getter"] got ["module getter", "memory getter", "module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "global2 getter"]) > PASS imports >+PASS imports with empty module names >+PASS imports with empty names >+PASS exports with empty name: function >+PASS exports with empty name: table >+PASS exports with empty name: global > PASS No imports > PASS exports and imports > PASS i64 exports and imports >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt >index ba38859fc37a08541593197b54957039bab308bc..5738d74822ea1999ce0252923c86231f7c929488 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt >@@ -9,6 +9,11 @@ PASS Empty module with undefined imports argument > PASS Empty module with empty imports argument > FAIL getter order for imports object assert_array_equals: expected property 1 to be "global1 getter" but got "memory getter" (expected array ["module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "memory getter", "module getter", "global2 getter"] got ["module getter", "memory getter", "module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "global2 getter"]) > PASS imports >+PASS imports with empty module names >+PASS imports with empty names >+PASS exports with empty name: function >+PASS exports with empty name: table >+PASS exports with empty name: global > PASS No imports > PASS exports and imports > PASS i64 exports and imports >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instanceTestFactory.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instanceTestFactory.js >index 86f593f46f8c6c159ce2f5a6bc39b0aa5b6eb189..ac468947ec22e29310d0714cb7dfa0972893477d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instanceTestFactory.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/instanceTestFactory.js >@@ -126,6 +126,134 @@ get global3() { > } > ], > >+ [ >+ "imports with empty module names", >+ function() { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addImport("", "fn", kSig_v_v); >+ builder.addImportedGlobal("", "global", kWasmI32); >+ builder.addImportedMemory("", "memory", 0, 128); >+ builder.addImportedTable("", "table", 0, 128); >+ >+ const buffer = builder.toBuffer(); >+ const imports = { >+ "": { >+ "fn": function() {}, >+ "global": 0, >+ "memory": new WebAssembly.Memory({ "initial": 64, maximum: 128 }), >+ "table": new WebAssembly.Table({ "element": "anyfunc", "initial": 64, maximum: 128 }), >+ }, >+ }; >+ >+ return { >+ buffer, >+ args: [imports], >+ exports: {}, >+ verify: () => {}, >+ }; >+ } >+ ], >+ >+ [ >+ "imports with empty names", >+ function() { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addImport("a", "", kSig_v_v); >+ builder.addImportedGlobal("b", "", kWasmI32); >+ builder.addImportedMemory("c", "", 0, 128); >+ builder.addImportedTable("d", "", 0, 128); >+ >+ const buffer = builder.toBuffer(); >+ const imports = { >+ "a": { "": function() {} }, >+ "b": { "": 0 }, >+ "c": { "": new WebAssembly.Memory({ "initial": 64, maximum: 128 }) }, >+ "d": { "": new WebAssembly.Table({ "element": "anyfunc", "initial": 64, maximum: 128 }) }, >+ }; >+ >+ return { >+ buffer, >+ args: [imports], >+ exports: {}, >+ verify: () => {}, >+ }; >+ } >+ ], >+ >+ [ >+ "exports with empty name: function", >+ function() { >+ const builder = new WasmModuleBuilder(); >+ >+ builder >+ .addFunction("", kSig_v_d) >+ .addBody([]) >+ .exportFunc(); >+ >+ const buffer = builder.toBuffer(); >+ >+ const exports = { >+ "": { "kind": "function", "name": "0", "length": 1 }, >+ }; >+ >+ return { >+ buffer, >+ args: [], >+ exports, >+ verify: () => {}, >+ }; >+ } >+ ], >+ >+ [ >+ "exports with empty name: table", >+ function() { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.setTableBounds(1); >+ builder.addExportOfKind("", kExternalTable, 0); >+ >+ const buffer = builder.toBuffer(); >+ >+ const exports = { >+ "": { "kind": "table", "length": 1 }, >+ }; >+ >+ return { >+ buffer, >+ args: [], >+ exports, >+ verify: () => {}, >+ }; >+ } >+ ], >+ >+ [ >+ "exports with empty name: global", >+ function() { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addGlobal(kWasmI32, true) >+ .exportAs("") >+ .init = 7; >+ >+ const buffer = builder.toBuffer(); >+ >+ const exports = { >+ "": { "kind": "global", "value": 7 }, >+ }; >+ >+ return { >+ buffer, >+ args: [], >+ exports, >+ verify: () => {}, >+ }; >+ } >+ ], >+ > [ > "No imports", > function() { >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..492fd364dc009c62a03596b1657010da9a2621f5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt >@@ -0,0 +1,8 @@ >+ >+FAIL Zero initial, no maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL Non-zero initial, no maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL Zero maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL None-zero maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL non-shared memory undefined is not an object (evaluating 'memory.type.minimum') >+FAIL shared memory undefined is not an object (evaluating 'memory.type.minimum') >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.js >new file mode 100644 >index 0000000000000000000000000000000000000000..efe9e2a37deb7bb6ef841e9809eee781c9effb9f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.js >@@ -0,0 +1,36 @@ >+// META: global=window,dedicatedworker,jsshell >+// META: script=/wasm/jsapi/assertions.js >+ >+function assert_type(argument) { >+ const memory = new WebAssembly.Memory(argument); >+ >+ assert_equals(memory.type.minimum, argument.minimum); >+ assert_equals(memory.type.maximum, argument.maximum); >+ if (argument.shared !== undefined) { >+ assert_equals(memory.type.shared, argument.shared); >+ } >+} >+ >+test(() => { >+ assert_type({ "minimum": 0 }); >+}, "Zero initial, no maximum"); >+ >+test(() => { >+ assert_type({ "minimum": 5 }); >+}, "Non-zero initial, no maximum"); >+ >+test(() => { >+ assert_type({ "minimum": 0, "maximum": 0 }); >+}, "Zero maximum"); >+ >+test(() => { >+ assert_type({ "minimum": 0, "maximum": 5 }); >+}, "None-zero maximum"); >+ >+test(() => { >+ assert_type({ "minimum": 0, "maximum": 10, "shared": false}); >+}, "non-shared memory"); >+ >+test(() => { >+ assert_type({ "minimum": 0, "maximum": 10, "shared": true}); >+}, "shared memory"); >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..492fd364dc009c62a03596b1657010da9a2621f5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt >@@ -0,0 +1,8 @@ >+ >+FAIL Zero initial, no maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL Non-zero initial, no maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL Zero maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL None-zero maximum undefined is not an object (evaluating 'memory.type.minimum') >+FAIL non-shared memory undefined is not an object (evaluating 'memory.type.minimum') >+FAIL shared memory undefined is not an object (evaluating 'memory.type.minimum') >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/w3c-import.log >index 913d4566571143464a02ade7b96e8d828a79cda1..4827c26e78c70661960feb62524cc1bf9013cebe 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/w3c-import.log >@@ -21,3 +21,4 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/toString.any.js >+/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/type.tentative.any.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any-expected.txt >index 3a857cd815756d4bf682c3c1573c540cc1567d08..09c22096854b09db08f38e1c2bfcce62cc386711 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any-expected.txt >@@ -2,8 +2,12 @@ > PASS Missing arguments > PASS Non-Module arguments > PASS Branding >+PASS Return type > PASS Empty module > PASS Empty module: array caching > PASS exports >+PASS exports with empty name: function >+PASS exports with empty name: table >+PASS exports with empty name: global > PASS Stray argument > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.js >index 60b2c04f436968ac11557860275d75bc89e49e3d..40a3935a4a23ba9028a4eccd44ad3baf07c5b1da 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.js >@@ -75,6 +75,12 @@ function assert_exports(exports, expected) { > } > }, "Branding"); > >+test(() => { >+ const module = new WebAssembly.Module(emptyModuleBinary); >+ const exports = WebAssembly.Module.exports(module); >+ assert_true(Array.isArray(exports)); >+}, "Return type"); >+ > test(() => { > const module = new WebAssembly.Module(emptyModuleBinary); > const exports = WebAssembly.Module.exports(module); >@@ -124,6 +130,54 @@ function assert_exports(exports, expected) { > assert_exports(exports, expected); > }, "exports"); > >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ >+ builder >+ .addFunction("", kSig_v_v) >+ .addBody([]) >+ .exportFunc(); >+ >+ const buffer = builder.toBuffer() >+ const module = new WebAssembly.Module(buffer); >+ const exports = WebAssembly.Module.exports(module); >+ const expected = [ >+ { "kind": "function", "name": "" }, >+ ]; >+ assert_exports(exports, expected); >+}, "exports with empty name: function"); >+ >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.setTableBounds(1); >+ builder.addExportOfKind("", kExternalTable, 0); >+ >+ const buffer = builder.toBuffer() >+ const module = new WebAssembly.Module(buffer); >+ const exports = WebAssembly.Module.exports(module); >+ const expected = [ >+ { "kind": "table", "name": "" }, >+ ]; >+ assert_exports(exports, expected); >+}, "exports with empty name: table"); >+ >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addGlobal(kWasmI32, true) >+ .exportAs("") >+ .init = 7; >+ >+ const buffer = builder.toBuffer() >+ const module = new WebAssembly.Module(buffer); >+ const exports = WebAssembly.Module.exports(module); >+ const expected = [ >+ { "kind": "global", "name": "" }, >+ ]; >+ assert_exports(exports, expected); >+}, "exports with empty name: global"); >+ > test(() => { > const module = new WebAssembly.Module(emptyModuleBinary); > const exports = WebAssembly.Module.exports(module, {}); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt >index 3a857cd815756d4bf682c3c1573c540cc1567d08..09c22096854b09db08f38e1c2bfcce62cc386711 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt >@@ -2,8 +2,12 @@ > PASS Missing arguments > PASS Non-Module arguments > PASS Branding >+PASS Return type > PASS Empty module > PASS Empty module: array caching > PASS exports >+PASS exports with empty name: function >+PASS exports with empty name: table >+PASS exports with empty name: global > PASS Stray argument > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any-expected.txt >index 5493510f1fd5d56885e22361de97f6bb1ba33037..05833be39e56d834785d34f4316e2002d60cfc4f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any-expected.txt >@@ -6,5 +6,8 @@ PASS Return type > PASS Empty module > PASS Empty module: array caching > PASS imports >+PASS imports with empty module name >+PASS imports with empty names >+PASS imports with empty module names and names > PASS Stray argument > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.js >index d6754c9efbdc44cd963708f5b751f1546ddfcd18..ec550ce6c41af1dd958d2a981768da215368f27e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.js >@@ -118,6 +118,66 @@ function assert_imports(imports, expected) { > assert_imports(imports, expected); > }, "imports"); > >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addImport("", "fn", kSig_v_v); >+ builder.addImportedGlobal("", "global", kWasmI32); >+ builder.addImportedMemory("", "memory", 0, 128); >+ builder.addImportedTable("", "table", 0, 128); >+ >+ const buffer = builder.toBuffer() >+ const module = new WebAssembly.Module(buffer); >+ const imports = WebAssembly.Module.imports(module); >+ const expected = [ >+ { "module": "", "kind": "function", "name": "fn" }, >+ { "module": "", "kind": "global", "name": "global" }, >+ { "module": "", "kind": "memory", "name": "memory" }, >+ { "module": "", "kind": "table", "name": "table" }, >+ ]; >+ assert_imports(imports, expected); >+}, "imports with empty module name"); >+ >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addImport("a", "", kSig_v_v); >+ builder.addImportedGlobal("b", "", kWasmI32); >+ builder.addImportedMemory("c", "", 0, 128); >+ builder.addImportedTable("d", "", 0, 128); >+ >+ const buffer = builder.toBuffer() >+ const module = new WebAssembly.Module(buffer); >+ const imports = WebAssembly.Module.imports(module); >+ const expected = [ >+ { "module": "a", "kind": "function", "name": "" }, >+ { "module": "b", "kind": "global", "name": "" }, >+ { "module": "c", "kind": "memory", "name": "" }, >+ { "module": "d", "kind": "table", "name": "" }, >+ ]; >+ assert_imports(imports, expected); >+}, "imports with empty names"); >+ >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ >+ builder.addImport("", "", kSig_v_v); >+ builder.addImportedGlobal("", "", kWasmI32); >+ builder.addImportedMemory("", "", 0, 128); >+ builder.addImportedTable("", "", 0, 128); >+ >+ const buffer = builder.toBuffer() >+ const module = new WebAssembly.Module(buffer); >+ const imports = WebAssembly.Module.imports(module); >+ const expected = [ >+ { "module": "", "kind": "function", "name": "" }, >+ { "module": "", "kind": "global", "name": "" }, >+ { "module": "", "kind": "memory", "name": "" }, >+ { "module": "", "kind": "table", "name": "" }, >+ ]; >+ assert_imports(imports, expected); >+}, "imports with empty module names and names"); >+ > test(() => { > const module = new WebAssembly.Module(emptyModuleBinary); > const imports = WebAssembly.Module.imports(module, {}); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt >index 5493510f1fd5d56885e22361de97f6bb1ba33037..05833be39e56d834785d34f4316e2002d60cfc4f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt >@@ -6,5 +6,8 @@ PASS Return type > PASS Empty module > PASS Empty module: array caching > PASS imports >+PASS imports with empty module name >+PASS imports with empty names >+PASS imports with empty module names and names > PASS Stray argument > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f0fc905693c249c7566d5a67bf500f1c727af9ed >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any-expected.txt >@@ -0,0 +1,8 @@ >+ >+FAIL initialize externref table with default value assert_equals: expected object "[object Object]" but got null >+PASS initialize table with a wrong element value >+FAIL initialize anyfunc table with default value assert_equals: expected (function) function "function 0() { >+ [native code] >+}" but got (object) null >+FAIL initialize anyfunc table with a bad default value assert_throws_js: function "() => new WebAssembly.Table(argument, {})" did not throw >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js >new file mode 100644 >index 0000000000000000000000000000000000000000..35db2c73599b945b6b8843f3747f2d4212ced0f0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js >@@ -0,0 +1,49 @@ >+// META: global=window,dedicatedworker,jsshell >+// META: script=assertions.js >+// META: script=/wasm/jsapi/wasm-constants.js >+// META: script=/wasm/jsapi/wasm-module-builder.js >+ >+// Test cases for changes to the WebAssembly.Table constructor API that >+// come in with the reftypes proposal: the API takes a default argument, which >+// is used as an initializing value for the WebAssembly.Table. >+// >+// See: >+// https://webassembly.github.io/reference-types/js-api/index.html#tables >+ >+test(() => { >+ const testObject = {}; >+ const argument = { "element": "externref", "initial": 3 }; >+ const table = new WebAssembly.Table(argument, testObject); >+ assert_equals(table.length, 3); >+ assert_equals(table.get(0), testObject); >+ assert_equals(table.get(1), testObject); >+ assert_equals(table.get(2), testObject); >+}, "initialize externref table with default value"); >+ >+test(() => { >+ const argument = { "element": "i32", "initial": 3 }; >+ assert_throws_js(TypeError, () => new WebAssembly.Table(argument)); >+}, "initialize table with a wrong element value"); >+ >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ builder >+ .addFunction("fn", kSig_v_v) >+ .addBody([]) >+ .exportFunc(); >+ const bin = builder.toBuffer(); >+ const fn = new WebAssembly.Instance(new WebAssembly.Module(bin)).exports.fn; >+ const argument = { "element": "anyfunc", "initial": 3 }; >+ const table = new WebAssembly.Table(argument, fn); >+ assert_equals(table.length, 3); >+ assert_equals(table.get(0), fn); >+ assert_equals(table.get(1), fn); >+ assert_equals(table.get(2), fn); >+}, "initialize anyfunc table with default value"); >+ >+test(() => { >+ const argument = { "element": "anyfunc", "initial": 3 }; >+ assert_throws_js(TypeError, () => new WebAssembly.Table(argument, {})); >+ assert_throws_js(TypeError, () => new WebAssembly.Table(argument, "cannot be used as a wasm function")); >+ assert_throws_js(TypeError, () => new WebAssembly.Table(argument, 37)); >+}, "initialize anyfunc table with a bad default value"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..8666cea2ee8d7150bf53c1b680df3a375b5a0a50 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt >@@ -0,0 +1,5 @@ >+CONSOLE MESSAGE: NetworkError: Response is not 2xx >+ >+Harness Error (FAIL), message = NetworkError: Response is not 2xx >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..2c7f36670aa94be9b24f3e7916c8cda318a448ce >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any-expected.txt >@@ -0,0 +1,6 @@ >+ >+FAIL Arguments for anyfunc table set assert_equals: expected (function) function "function 0() { >+ [native code] >+}" but got (object) null >+FAIL Arguments for externref table set assert_equals: expected object "[object Object]" but got null >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js >new file mode 100644 >index 0000000000000000000000000000000000000000..83b36a32415cf0981514617f1e67acee625c6c4b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js >@@ -0,0 +1,50 @@ >+// META: global=window,dedicatedworker,jsshell >+// META: script=assertions.js >+// META: script=/wasm/jsapi/wasm-constants.js >+// META: script=/wasm/jsapi/wasm-module-builder.js >+ >+// Test cases for changes to the WebAssembly.Table.prototype.set() API that >+// come in with the reftypes proposal: the API makes the second argument optional and >+// if it is missing we should use DefaultValue of the table's element type. >+// >+// See: >+// https://webassembly.github.io/reference-types/js-api/index.html#tables >+ >+test(() => { >+ const builder = new WasmModuleBuilder(); >+ builder >+ .addFunction("fn", kSig_v_v) >+ .addBody([]) >+ .exportFunc(); >+ const bin = builder.toBuffer(); >+ const fn = new WebAssembly.Instance(new WebAssembly.Module(bin)).exports.fn; >+ >+ const argument = { "element": "anyfunc", "initial": 1 }; >+ const table = new WebAssembly.Table(argument, fn); >+ >+ assert_equals(table.get(0), fn); >+ table.set(0); >+ assert_equals(table.get(0), null); >+ >+ table.set(0, fn); >+ assert_equals(table.get(0), fn); >+ >+ assert_throws_js(TypeError, () => table.set(0, {})); >+ assert_throws_js(TypeError, () => table.set(0, 37)); >+}, "Arguments for anyfunc table set"); >+ >+test(() => { >+ const testObject = {}; >+ const argument = { "element": "externref", "initial": 1 }; >+ const table = new WebAssembly.Table(argument, testObject); >+ >+ assert_equals(table.get(0), testObject); >+ table.set(0); >+ assert_equals(table.get(0), undefined); >+ >+ table.set(0, testObject); >+ assert_equals(table.get(0), testObject); >+ >+ table.set(0, 37); >+ assert_equals(table.get(0), 37); >+}, "Arguments for externref table set"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..8666cea2ee8d7150bf53c1b680df3a375b5a0a50 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt >@@ -0,0 +1,5 @@ >+CONSOLE MESSAGE: NetworkError: Response is not 2xx >+ >+Harness Error (FAIL), message = NetworkError: Response is not 2xx >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/w3c-import.log >index 046473e2384d3914876048f1411ae23b833a384c..3f4fa37eaba2c38e3f32467ef2f521fd59120497 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/w3c-import.log >@@ -15,10 +15,12 @@ None > ------------------------------------------------------------------------ > List of files: > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/assertions.js >+/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor-types.tentative.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/get-set.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/grow-reftypes.tentative.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/grow.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/length.any.js >+/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/toString.any.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/w3c-import.log >index acc10284ad430d0b7a172ff5fa17f3ef9587c0d4..7ec312bba7852dbb646264120bf12acb4fa637d7 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/w3c-import.log >@@ -14,6 +14,7 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/META.yml > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/assertions.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/bad-imports.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/error-interfaces-no-symbol-tostringtag.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/META.yml b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/META.yml >new file mode 100644 >index 0000000000000000000000000000000000000000..69715cd7c8dcf53d95af41fdd5396e4ea34dc2ce >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/META.yml >@@ -0,0 +1 @@ >+spec: https://webassembly.github.io/spec/web-api/ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt >index c537bf104f048a0b46e453d3a510571298d9f0aa..77b90e5f8f1fe8eb9ec26870b15f48bf6050b198 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt >@@ -4,6 +4,11 @@ FAIL Empty module with undefined imports argument promise_test: Unhandled reject > FAIL Empty module with empty imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL getter order for imports object promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL imports with empty module names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL imports with empty names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL exports with empty name: function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL exports with empty name: table promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL exports with empty name: global promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL No imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL i64 exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt >index c537bf104f048a0b46e453d3a510571298d9f0aa..77b90e5f8f1fe8eb9ec26870b15f48bf6050b198 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt >@@ -4,6 +4,11 @@ FAIL Empty module with undefined imports argument promise_test: Unhandled reject > FAIL Empty module with empty imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL getter order for imports object promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL imports with empty module names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL imports with empty names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL exports with empty name: function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL exports with empty name: table promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >+FAIL exports with empty name: global promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL No imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" > FAIL i64 exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)" >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any-expected.txt >index 13eccb2ad18a676f8cf5511fee69d3cb37d109c6..00402bf6c25f6822797bdc8428d9e63772354d53 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any-expected.txt >@@ -1,4 +1,6 @@ > >-FAIL Invalid code: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >-FAIL Invalid code: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0x0000): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0xCAFE): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0x0000): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0xCAFE): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.js >index 752519392a953fdc314d6421f2bcb91856434534..37373d49971a3d89b04720cc10669f4929fc9142 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.js >@@ -7,9 +7,15 @@ > }); > > for (const method of ["compileStreaming", "instantiateStreaming"]) { >+ promise_test(t => { >+ const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0, 0])); >+ const response = new Response(buffer, { headers: { "Content-Type": "application/wasm" } }); >+ return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly[method](response)); >+ }, `Invalid code (0x0000): ${method}`); >+ > promise_test(t => { > const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0xCA, 0xFE])); > const response = new Response(buffer, { headers: { "Content-Type": "application/wasm" } }); > return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly[method](response)); >- }, `Invalid code: ${method}`); >+ }, `Invalid code (0xCAFE): ${method}`); > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt >index 13eccb2ad18a676f8cf5511fee69d3cb37d109c6..00402bf6c25f6822797bdc8428d9e63772354d53 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt >@@ -1,4 +1,6 @@ > >-FAIL Invalid code: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >-FAIL Invalid code: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0x0000): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0xCAFE): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0x0000): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) >+FAIL Invalid code (0xCAFE): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined) > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..011c4d73dc797f1fd4532f70802709fe0a6805c4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt >@@ -0,0 +1,6 @@ >+ >+FAIL compileStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+FAIL compileStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+FAIL instantiateStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+FAIL instantiateStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.js b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.js >new file mode 100644 >index 0000000000000000000000000000000000000000..354930517c73ea54162a655c2c12e93b40cc1a73 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.js >@@ -0,0 +1,24 @@ >+// META: global=window,worker >+// META: script=/wasm/jsapi/wasm-module-builder.js >+ >+["compileStreaming", "instantiateStreaming"].forEach(method => { >+ promise_test(async t => { >+ const buffer = new WasmModuleBuilder().toBuffer(); >+ const argument = new Response(buffer, { headers: { "Content-Type": "test/test" } }); >+ argument.headers.set("Content-Type", "application/wasm"); >+ // This should resolve successfully >+ await WebAssembly[method](argument); >+ // Ensure body can only be read once >+ return promise_rejects_js(t, TypeError, argument.blob()); >+ }, `${method} with Content-Type set late`); >+ >+ promise_test(async t => { >+ const buffer = new WasmModuleBuilder().toBuffer(); >+ const argument = new Response(buffer, { headers: { "Content-Type": "application/wasm" } }); >+ argument.headers.delete("Content-Type"); >+ // Ensure Wasm cannot be created >+ await promise_rejects_js(t, TypeError, WebAssembly[method](argument)); >+ // This should resolve successfully >+ await argument.arrayBuffer(); >+ }, `${method} with Content-Type removed late`); >+}); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..011c4d73dc797f1fd4532f70802709fe0a6805c4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt >@@ -0,0 +1,6 @@ >+ >+FAIL compileStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+FAIL compileStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+FAIL instantiateStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+FAIL instantiateStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)" >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker.html b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/w3c-import.log >index eaa8c7be725dae22786b73c0364c9ef26f6d5851..6b4e315614b6b1ede82c42533e72400077503c63 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/w3c-import.log >@@ -14,6 +14,7 @@ Property values requiring vendor prefixes: > None > ------------------------------------------------------------------------ > List of files: >+/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/META.yml > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/abort.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/body.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/contenttype.any.js >@@ -24,6 +25,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-args.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.js >+/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/origin.sub.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/rejected-arg.any.js > /LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/status.any.js
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mark.lam
:
review+
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 220364
: 418204 |
418208