mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
enhance: Add support for unsafe-eval
and wasm-unsafe-eval
(#32893)
Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
This commit is contained in:
parent
2cf207ddc8
commit
92866ab911
51 changed files with 755 additions and 73 deletions
5
tests/wpt/include.ini
vendored
5
tests/wpt/include.ini
vendored
|
@ -9,6 +9,11 @@ skip: true
|
|||
skip: false
|
||||
[samesite]
|
||||
skip: true
|
||||
[content-security-policy]
|
||||
[unsafe-eval]
|
||||
skip: false
|
||||
[wasm-unsafe-eval]
|
||||
skip: false
|
||||
[cors]
|
||||
skip: false
|
||||
[css]
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[eval-blocked-in-about-blank-iframe.html]
|
||||
expected: ERROR
|
||||
[eval-blocked-in-about-blank-iframe]
|
||||
expected: TIMEOUT
|
12
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.js.ini
vendored
Normal file
12
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.js.ini
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
[default-src-blocks-wasm.any.worker.html]
|
||||
[default-src-blocks-wasm]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[default-src-blocks-wasm.any.html]
|
||||
|
||||
[default-src-blocks-wasm.any.serviceworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[default-src-blocks-wasm.any.sharedworker.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,9 @@
|
|||
[default-src-unsafe-eval-allows-wasm.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[default-src-unsafe-eval-allows-wasm.any.worker.html]
|
||||
|
||||
[default-src-unsafe-eval-allows-wasm.any.html]
|
||||
|
||||
[default-src-unsafe-eval-allows-wasm.any.serviceworker.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,9 @@
|
|||
[default-src-wasm-unsafe-eval-allows-wasm.any.worker.html]
|
||||
|
||||
[default-src-wasm-unsafe-eval-allows-wasm.any.html]
|
||||
|
||||
[default-src-wasm-unsafe-eval-allows-wasm.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[default-src-wasm-unsafe-eval-allows-wasm.any.serviceworker.html]
|
||||
expected: ERROR
|
4
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/postMessage-wasm-module.html.ini
vendored
Normal file
4
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/postMessage-wasm-module.html.ini
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
[postMessage-wasm-module.html]
|
||||
expected: ERROR
|
||||
[Got the expected securitypolicyviolation in the iframe]
|
||||
expected: TIMEOUT
|
12
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.js.ini
vendored
Normal file
12
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.js.ini
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
[script-src-blocks-wasm.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[script-src-blocks-wasm.any.worker.html]
|
||||
[script-src-blocks-wasm]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[script-src-blocks-wasm.any.html]
|
||||
|
||||
[script-src-blocks-wasm.any.serviceworker.html]
|
||||
expected: ERROR
|
16
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.js.ini
vendored
Normal file
16
tests/wpt/meta/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.js.ini
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
[script-src-spv-asynch.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[script-src-spv-asynch.any.html]
|
||||
[Securitypolicyviolation event looks like it should]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[script-src-spv-asynch.any.worker.html]
|
||||
expected: TIMEOUT
|
||||
[Securitypolicyviolation event looks like it should]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
||||
[script-src-spv-asynch.any.serviceworker.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,9 @@
|
|||
[script-src-unsafe-eval-allows-wasm.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[script-src-unsafe-eval-allows-wasm.any.html]
|
||||
|
||||
[script-src-unsafe-eval-allows-wasm.any.worker.html]
|
||||
|
||||
[script-src-unsafe-eval-allows-wasm.any.serviceworker.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,9 @@
|
|||
[script-src-wasm-unsafe-eval-allows-wasm.any.serviceworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[script-src-wasm-unsafe-eval-allows-wasm.any.html]
|
||||
|
||||
[script-src-wasm-unsafe-eval-allows-wasm.any.worker.html]
|
||||
|
||||
[script-src-wasm-unsafe-eval-allows-wasm.any.sharedworker.html]
|
||||
expected: ERROR
|
|
@ -2002,9 +2002,6 @@
|
|||
[Document interface: new Document() must inherit property "onwebkitanimationstart" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: calling queryCommandIndeterm(DOMString) on documentWithHandlers with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2017,9 +2014,6 @@
|
|||
[Window interface: window must inherit property "onwebkitanimationiteration" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: attribute onsecuritypolicyviolation]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: window must inherit property "applicationCache" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2059,9 +2053,6 @@
|
|||
[Document interface: documentWithHandlers must inherit property "execCommand(DOMString, optional boolean, optional DOMString)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: window must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: operation print()]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2074,9 +2065,6 @@
|
|||
[Document interface: attribute all]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: documentWithHandlers must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: operation focus()]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2215,9 +2203,6 @@
|
|||
[Document interface: operation execCommand(DOMString, optional boolean, optional DOMString)]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: attribute onsecuritypolicyviolation]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: attribute menubar]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2314,9 +2299,6 @@
|
|||
[Window interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via Object.setPrototypeOf should throw a TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: iframe.contentDocument must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must inherit property "queryCommandValue(DOMString)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2892,9 +2874,6 @@
|
|||
[HTMLElement interface: document.createElement("noscript") must inherit property "autocapitalize" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLElement interface: attribute onsecuritypolicyviolation]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableColElement interface: document.createElement("col") must inherit property "align" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4155,9 +4134,6 @@
|
|||
[HTMLObjectElement interface: document.createElement("object") must inherit property "data" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLElement interface: document.createElement("noscript") must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLFrameElement interface: attribute contentDocument]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[http-equiv-enumerated-ascii-case-insensitive.html]
|
||||
[keyword content-security-policy]
|
||||
expected: FAIL
|
|
@ -0,0 +1,10 @@
|
|||
[code-cache-nonce.html]
|
||||
expected: ERROR
|
||||
[First dynamic import should use nonce=abc]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Second dynamic import should use nonce=def]
|
||||
expected: NOTRUN
|
||||
|
||||
[Third dynamic import should use nonce=ghi]
|
||||
expected: NOTRUN
|
|
@ -1,4 +1,5 @@
|
|||
[basic.any.html]
|
||||
expected: TIMEOUT
|
||||
|
||||
[basic.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[propagate-nonce-external-classic.html]
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,2 @@
|
|||
[propagate-nonce-external-module.html]
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,2 @@
|
|||
[propagate-nonce-inline-classic.html]
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,2 @@
|
|||
[propagate-nonce-inline-module.html]
|
||||
expected: TIMEOUT
|
|
@ -1,4 +1,5 @@
|
|||
[string-compilation-nonce-classic.html]
|
||||
expected: TIMEOUT
|
||||
[reflected inline event handlers must not inherit the nonce from the triggering script, thus fail]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[string-compilation-nonce-module.html]
|
||||
expected: TIMEOUT
|
||||
[reflected inline event handlers must not inherit the nonce from the triggering script, thus fail]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
[v8-code-cache.html]
|
||||
expected: ERROR
|
||||
[text/javascript: Run #1]
|
||||
expected: TIMEOUT
|
||||
|
||||
[text/javascript: Run #2]
|
||||
expected: NOTRUN
|
||||
|
||||
[text/javascript: Run #3]
|
||||
expected: NOTRUN
|
||||
|
||||
[text/javascript: Run #4]
|
||||
expected: NOTRUN
|
||||
|
||||
[text/javascript: Run #5]
|
||||
expected: NOTRUN
|
||||
|
||||
[module: Run #1]
|
||||
expected: NOTRUN
|
||||
|
||||
[module: Run #2]
|
||||
expected: NOTRUN
|
||||
|
||||
[module: Run #3]
|
||||
expected: NOTRUN
|
||||
|
||||
[module: Run #4]
|
||||
expected: NOTRUN
|
||||
|
||||
[module: Run #5]
|
||||
expected: NOTRUN
|
|
@ -314,9 +314,6 @@
|
|||
[onsecuritypolicyviolation: the default value must be null]
|
||||
expected: FAIL
|
||||
|
||||
[onsecuritypolicyviolation: the content attribute must be compiled into a function as the corresponding property]
|
||||
expected: FAIL
|
||||
|
||||
[onseeked: must be on the appropriate locations for GlobalEventHandlers]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
[not shadowed contextrestored (document.body)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed securitypolicyviolation (document.body)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed slotchange (document.body)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -44,9 +41,6 @@
|
|||
[not shadowed contextrestored (document.createElement("body"))]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed securitypolicyviolation (document.createElement("body"))]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed slotchange (document.createElement("body"))]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -80,9 +74,6 @@
|
|||
[not shadowed contextrestored (window)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed securitypolicyviolation (window)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed slotchange (window)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
[not shadowed contextrestored (document.body)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed securitypolicyviolation (document.body)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed slotchange (document.body)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -44,9 +41,6 @@
|
|||
[not shadowed contextrestored (document.createElement("frameset"))]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed securitypolicyviolation (document.createElement("frameset"))]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed slotchange (document.createElement("frameset"))]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -80,9 +74,6 @@
|
|||
[not shadowed contextrestored (window)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed securitypolicyviolation (window)]
|
||||
expected: FAIL
|
||||
|
||||
[not shadowed slotchange (window)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
[contextrestored is unaffected on a windowless body]
|
||||
expected: FAIL
|
||||
|
||||
[securitypolicyviolation is unaffected on a windowless body]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange is unaffected on a windowless body]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -35,9 +32,6 @@
|
|||
[contextrestored is unaffected on a windowless frameset]
|
||||
expected: FAIL
|
||||
|
||||
[securitypolicyviolation is unaffected on a windowless frameset]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange is unaffected on a windowless frameset]
|
||||
expected: FAIL
|
||||
|
||||
|
|
4
tests/wpt/mozilla/meta/MANIFEST.json
vendored
4
tests/wpt/mozilla/meta/MANIFEST.json
vendored
|
@ -13434,14 +13434,14 @@
|
|||
]
|
||||
],
|
||||
"interfaces.html": [
|
||||
"d4daa95cfe84f1ffd77d0b631e67deb778db5fc3",
|
||||
"2ab9214e53c431e4a599254d4cb498fd75eef4ed",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"interfaces.worker.js": [
|
||||
"b1c7b7e9c5c2f21eafdcd27eafe589e654260628",
|
||||
"2782a452ac10b97c4cd4418fb7ba516325a76fab",
|
||||
[
|
||||
"mozilla/interfaces.worker.html",
|
||||
{}
|
||||
|
|
|
@ -223,6 +223,7 @@ test_interfaces([
|
|||
"Request",
|
||||
"Response",
|
||||
"Screen",
|
||||
"SecurityPolicyViolationEvent",
|
||||
"Selection",
|
||||
"ShadowRoot",
|
||||
"StaticRange",
|
||||
|
|
|
@ -55,6 +55,7 @@ test_interfaces([
|
|||
"ReadableStream",
|
||||
"Request",
|
||||
"Response",
|
||||
"SecurityPolicyViolationEvent",
|
||||
"TextDecoder",
|
||||
"TextEncoder",
|
||||
"URL",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue