diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element')
746 files changed, 0 insertions, 16262 deletions
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_001.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_001.htm deleted file mode 100644 index 370152683b9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_001.htm +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Async property on a dynamically-created script is true by default</title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test checks the Async property on a dynamically-created script element. By default it should be true." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-async"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - test(function() {assert_true(document.createElement("script").async)}, "Async property on a dynamically-created script is true by default"); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_002.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_002.htm deleted file mode 100644 index e1850ff6e16..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_002.htm +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Changes to the 'async' attribute are reflected in the async property</title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures changes to the 'async' attribute are reflected in the async property." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-async"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - test(function() { - var s = document.createElement("script"); - s.async = false; - s.setAttribute('async', ''); /*Should change s.async to true*/ - assert_true(s.async) - }, "Test 'async' attribute are reflected in the async property with setAttribute"); - - test(function() { - var s = document.createElement("script"); - s.async = false; - s.setAttribute('async', ''); /*Should change s.async to true*/ - s.removeAttribute('async'); /*Should change s.async to false*/ - assert_false(s.async) - }, "Test 'async' attribute are reflected in the async property with removeAttribute"); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_003.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_003.htm deleted file mode 100644 index c6d84f9a875..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_003.htm +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>An async script does not block the parser while downloading</title> - <meta name="timeout" content="long"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures an async script does not block the parser while downloading." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-script-async"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - var t = async_test("An async script does not block the parser while downloading"); - - function timeout() - { - t.step(function(){ assert_equals(document.getElementById("testresult").innerHTML, "21")}); - t.done(); - } - - var timer = setTimeout(timeout, 4000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - - <span id="testresult"></span> - - <script src="log.py?sec=3&id=1" async></script> - <script> - log('2'); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_004.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_004.htm deleted file mode 100644 index 5d9df099b75..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_004.htm +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>An async script executes as soon as possible after a download is complete</title> - <meta name="timeout" content="long"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures an async script executes as soon as possible after a download is complete." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-script-async"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - var t = async_test("async script executes as soon as possible after a download is complete"); - - function timeout() - { - t.step(function(){ assert_equals(document.getElementById("testresult").innerHTML, "21")}); - t.done(); - } - - var timer = setTimeout(timeout, 4000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - - <span id="testresult"></span> - - <script src="log.py?sec=3&id=1" async></script> - <script src="log.py?sec=1&id=2" async></script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_005.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_005.htm deleted file mode 100644 index 03f9adeb67e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_005.htm +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>A script element with both async and defer set should execute asynchronously</title> - <meta name="timeout" content="long"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures a script element with both async and defer set should execute asynchronously." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-script-async"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - var t = async_test("A script element with both async and defer set should execute asynchronously"); - - function timeout() - { - t.step(function(){ - var actual = document.getElementById("testresult").innerHTML; - assert_in_array(actual, ["2134", "2341"]); - }); - t.done(); - } - - var timer = setTimeout(timeout, 5000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - - <span id="testresult"></span> - - <script type="text/javascript" src="log.py?sec=1&id=1" defer async></script> - <script type="text/javascript">log('2');</script> - <script type="text/javascript" src="log.py?sec=3&id=3"></script> - <script type="text/javascript">log('4');</script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_006.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_006.htm deleted file mode 100644 index ed3d8b22c69..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_006.htm +++ /dev/null @@ -1,46 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>A dynamically created external script executes asynchronously</title> - <meta name="timeout" content="long"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures a dynamically created external script executes asynchronously." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#force-async"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - var t = async_test("dynamically created external script executes asynchronously"); - - function timeout() - { - t.step(function(){ assert_equals(document.getElementById("testresult").innerHTML, "321")}); - t.done(); - } - - var timer = setTimeout(timeout, 4000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - - <span id="testresult"></span> - <script type="text/javascript"> - var one = document.createElement("script"); - one.src="log.py?sec=3&id=1"; - document.head.appendChild(one); - - var two = document.createElement("script"); - two.src="log.py?sec=1&id=2"; - document.head.appendChild(two); - - log('3'); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_007.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_007.htm deleted file mode 100644 index 6c4ae29e065..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_007.htm +++ /dev/null @@ -1,49 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Ordered async script execution when script.async == false</title> - <meta name="timeout" content="long"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures Ordered async script execution when script.async == false" /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#script-processing-src-sync"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - var t = async_test("Ordered async script execution when script.async == false"); - - function timeout() - { - t.step(function(){ assert_equals(document.getElementById("testresult").innerHTML, "312")}); - t.done(); - } - - var timer = setTimeout(timeout, 8000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - - <span id="testresult"></span> - <script type="text/javascript"> - var one = document.createElement("script"); - one.src="log.py?sec=3&id=1"; - one.async = false; - document.head.appendChild(one); - - var two = document.createElement("script"); - two.src="log.py?sec=1&id=2"; - two.async = false; - document.head.appendChild(two); - </script> - <script type="text/javascript"> - log('3'); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_008.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_008.htm deleted file mode 100644 index 73529cc3182..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_008.htm +++ /dev/null @@ -1,47 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Async script element execution delays the window's load event</title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures an async script element's execution delays the window's load event." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#delay-the-load-event"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script type="text/javascript"> - var t = async_test("Async script element execution delays the window's load event"); - - function timeout() - { - t.step(function(){ assert_equals(document.getElementById("testresult").innerHTML, "213")}); - t.done(); - } - - var timer = setTimeout(timeout, 8000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - - <span id="testresult"></span> - <script type="text/javascript"> - window.addEventListener("load", function() { - log("3"); - timeout(); - }, false); - - var s1 = document.createElement("script"); - s1.src = "log.py?sec=2&id=1"; - document.head.appendChild(s1); - </script> - <script type="text/javascript"> - log('2'); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_009.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_009.htm deleted file mode 100644 index 307aa464128..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_009.htm +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Document.write() silently fails from an Async script</title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures Document.write() silently fails from an Async script." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script type="text/javascript"> - var t = async_test("Document.write() silently fails from an Async script"); - - var log = t.step_func(function() { - document.write("<span id='writtenText'></span>"); - assert_equals(null, document.getElementById('writtenText')); - t.done(); - }); - </script> - </head> - <body> - <div id=log></div> - <script type="text/javascript" src="log.py?sec=1&id=1" async></script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_010.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_010.htm deleted file mode 100644 index c54defc00df..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_010.htm +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Removing an async script before execution</title> - <meta name="timeout" content="long"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="This test ensures that an async script still executes if it is removed from a markup before the download is complete. The other two scripts that come after it in insertion order should execute as well." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script type="text/javascript"> - var t = async_test("Removing an async script before execution"); - - function timeout() - { - t.step(function(){ assert_equals(document.getElementById("testresult").innerHTML, "4123")}); - t.done(); - } - - var timer = setTimeout(timeout, 8000); - - function log(text) - { - var textNode = document.createTextNode(text); - document.getElementById("testresult").appendChild(textNode); - } - </script> - </head> - <body> - <div id=log></div> - <span id="testresult"></span> - <script type="text/javascript"> - var s1 = document.createElement("script"); - s1.src="log.py?sec=2&id=1"; - s1.async = false; - document.body.appendChild(s1); - - var s2 = document.createElement("script"); - s2.src="log.py?sec=1&id=2"; - s2.async = false; - document.body.appendChild(s2); - - var s3 = document.createElement("script"); - s3.id = "s3"; - s3.src="log.py?sec=0&id=3"; - s3.async = false; - document.body.appendChild(s3); - - //Remove s1 (Should still execute) - document.body.removeChild(s1); - </script> - <script type="text/javascript">log('4');</script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_011.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_011.htm deleted file mode 100644 index d80e463cee5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/async_011.htm +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>An empty parser-inserted script element should return async=true</title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta description="An empty parser-inserted script element should return async=true." /> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"/> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <div id=log></div> - <script></script> - <script type="text/javascript"> - test(function() { assert_true(document.getElementsByTagName("script")[2].async)}, "An empty parser-inserted script element should return async=true"); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py deleted file mode 100644 index b315afed563..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py +++ /dev/null @@ -1,4 +0,0 @@ -def main(request, response): - headers = [(b"Content-Type", b"text/javascript"), (b"Cache-control", b"public, max-age=100")] - body = u"throw('fox');" - return 200, headers, body diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-2.html deleted file mode 100644 index 535099b24a6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-2.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset="windows-1250"> -<title>CSS modules: UTF-8 decoding</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script type="module"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/utf-8.css" assert { type: "css"}; - test(() => { - assert_equals(styleSheet.rules[0].style.content, "\"�湿�\""); - }, "CSS module should be loaded as utf-8 even though document's encoding is windows-1250"); -</script> -<script type="module"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/windows-1250.css&ct=text/css%3Bcharset=windows-1250" assert { type: "css"}; - test(() => { - assert_not_equals(styleSheet.rules[0].style.content, "\"�湿�\"", - 'Should be decoded as UTF-8'); - }, "CSS module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header, and this document's encoding is windows-1250"); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-bom.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-bom.html deleted file mode 100644 index e26ee08d31d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-bom.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<title>CSS Module scripts should ignore BOMs and always use UTF-8</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module"> - import utf8BOMSheet from './resources/bom-utf-8.css' assert { type: 'css' }; - test(function() { - assert_equals(utf8BOMSheet.rules[0].selectorText, 'div', 'No UTF-8 BOM expected in selector'); - }, 'UTF-8 BOM should be stripped when decoding JSON module script'); - - import utf16BEBOMSheet from './resources/bom-utf-16be.css' assert { type: 'css' }; - test(function() { - assert_equals(utf16BEBOMSheet.rules[0].selectorText, '\ufffd\ufffd\ufffdd\ufffdi\ufffdv\ufffd \ufffd', 'Expected UTF-8 decoded selectorText with 0xfffd replacement characters'); - }, 'UTF-16BE BOM should be ignored, so CSS module should be UTF-8 decoded'); - - import utf16LEBOMSheet from './resources/bom-utf-16le.css' assert { type: 'css' }; - test(function() { - assert_equals(utf16LEBOMSheet.rules[0].selectorText, '\ufffd\ufffdd\ufffdi\ufffdv\ufffd \ufffd', 'Expected UTF-8 decoded selectorText with 0xfffd replacement characters'); - }, 'UTF-16LE BOM should be ignored, so CSS module should be UTF-8 decoded'); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset.html deleted file mode 100644 index 8b72481814b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>CSS modules: UTF-8 decoding</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script type="module" onerror="unreachable()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=utf-8" assert { type: "css"}; - test(() => { - assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); - }, "CSS module should be loaded as utf-8 when charset=utf8 is specified"); -</script> -<script type="module" onerror="unreachable()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=shift-jis" assert { type: "css"}; - test(() => { - assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); - }, "CSS module should be loaded as utf-8 when charset=shift-jis is specified"); -</script> -<script type="module" onerror="unreachable()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=windows-1252" assert { type: "css"}; - test(() => { - assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); - }, "CSS module should be loaded as utf-8 when charset=windows-1252 is specified"); -</script> -<script type="module" onerror="unreachable()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/utf-8.css&ct=text/css%3Bcharset=utf-7" assert { type: "css"};; - test(() => { - assert_equals(styleSheet.rules[0].style.content, "\"śćążź\""); - }, "CSS module should be loaded as utf-8 when charset=utf-7 is specified"); -</script> -<script type="module" onerror="unreachable()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/windows-1250.css&ct=text/css%3Bcharset=windows-1250" assert { type: "css"}; - test(() => { - assert_not_equals(styleSheet.rules[0].style.content, "\"śćążź\"", - 'Should be decoded as UTF-8'); - }, "CSS module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header"); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/content-type-checking.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/content-type-checking.html deleted file mode 100644 index 105c53c40d9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/content-type-checking.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>CSS modules: Content-Type</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script> -function check(t, styleSheet) { - t.step(() => { - assert_equals(styleSheet.rules[0].cssText, "#test { background-color: rgb(255, 0, 0); }"); - t.done(); - }); -} -const t1 = async_test("text/css"); -const t2 = async_test("application/css"); -const t3 = async_test("text/html+css"); -const t4 = async_test("text/css;boundary=something"); -const t5 = async_test("text/css;foo=bar"); -</script> -<script type="module" onerror="t1.unreached_func()()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/basic.css&ct=text/css" assert { type: "css"}; - check(t1, styleSheet); -</script> -<script type="module" onerror="t2.step_func_done()()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/basic.css&ct=application/css" assert { type: "css"}; - t2.unreached_func("Should not have loaded with MIME type application/css")(); -</script> -<script type="module" onerror="t3.step_func_done()()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/basic.css&ct=text/html+css" assert { type: "css"}; - t3.unreached_func("Should not have loaded with MIME type text/html+css")(); -</script> -<script type="module" onerror="t4.unreached_func()()"> - import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/basic.css&ct=text/css;boundary=something" assert { type: "css"}; - check(t4, styleSheet); -</script> -<script type="module" onerror="t5.unreached_func()()"> -import styleSheet from "../serve-with-content-type.py?fn=css-module/resources/basic.css&ct=text/css;foo=bar" assert { type: "css"}; -check(t5, styleSheet); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/cors-crossorigin-requests.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/cors-crossorigin-requests.html deleted file mode 100644 index e699ef927ec..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/cors-crossorigin-requests.html +++ /dev/null @@ -1,33 +0,0 @@ -<!doctype html> -<html> -<head> - <title>css-module-crossorigin</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <h1>css-module-crossorigin</h1> - <iframe id="import-WithCORS" src="resources/crossorigin-import-with-cors.sub.html"></iframe> - <iframe id="import-NoCORS" src="resources/crossorigin-import-without-cors.sub.html"></iframe> - <iframe id="import-parseerror-WithCors" src="resources/crossorigin-import-parse-error-with-cors.sub.html"></iframe> - <script> - - var tests = [ - { "obj": async_test("Imported CSS module, cross-origin with CORS"), "id": "import-WithCORS", "expected": "imported CSS: #test { background-color: rgb(255, 0, 0); }" }, - { "obj": async_test("Imported CSS module, cross-origin, missing CORS ACAO header"), "id": "import-NoCORS", "expected": "error" }, - { "obj": async_test("Imported CSS module with parse error, cross-origin, with CORS"), "id": "import-parseerror-WithCors", "expected": "imported CSS rules count: 0" }, - ]; - - window.addEventListener("load", function () { - tests.forEach(function (test) { - var target = document.getElementById(test.id); - test.obj.step(function () { - assert_equals(target.contentDocument._log, test.expected, "Unexpected _log value"); - }); - test.obj.done(); - }); - }); - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub.html deleted file mode 100644 index 0da573dad2b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub.html +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -document.cookie = 'milk=1'; - -const setCookiePromise = fetch( - 'http://{{domains[www2]}}:{{ports[http][0]}}/cookies/resources/set-cookie.py?name=milk&path=/html/semantics/scripting-1/the-script-element/css-module/', - { - mode: 'no-cors', - credentials: 'include', - }); - -const windowLoadPromise = new Promise(resolve => { - window.addEventListener('load', () => { - resolve(); - }); -}); - -promise_test(t => { - const iframe = document.createElement('iframe'); - - return Promise.all([setCookiePromise, windowLoadPromise]).then(() => { - const messagePromise = new Promise(resolve => { - window.addEventListener('message', event => { - resolve(); - }); - }); - - iframe.src = 'resources/credentials-iframe.sub.html'; - document.body.appendChild(iframe); - - return messagePromise; - }).then(() => { - const w = iframe.contentWindow; - - assert_equals(w.sameOriginNoneDescendant, true, - 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin'); - assert_equals(w.sameOriginAnonymousDescendant, true, - 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin'); - assert_equals(w.sameOriginUseCredentialsDescendant, true, - 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin'); - assert_equals(w.crossOriginNoneDescendant, false, - 'Descendant CSS modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin'); - assert_equals(w.crossOriginAnonymousDescendant, false, - 'Descendant CSS modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin'); - assert_equals(w.crossOriginUseCredentialsDescendant, true, - 'Descendant CSS modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin'); -}); -}, 'CSS Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute'); -</script> -<body> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html deleted file mode 100644 index 7ff672da6a9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html +++ /dev/null @@ -1,54 +0,0 @@ -<!doctype html> - -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/common/utils.js"></script> -</head> - -<body> - <script> - setup({allow_uncaught_exception: true}); - promise_test(function (test) { - const uuid = token(); - const worker = new Worker(`./resources/worker.sub.js?key=${uuid}`, { - type: "module" - }); - return new Promise((resolve, reject) => { - worker.addEventListener("error", resolve); - worker.addEventListener("message", reject); - }).then(async () => { - const fetchResponse = await fetch(`./resources/record-fetch.py?key=${uuid}&action=getCount`); - const fetchData = await fetchResponse.json(); - assert_equals(fetchData.count, 0, "Shouldn't have tried fetching CSS module in worker"); - }); - }, "A static import CSS Module within a web worker should not load and should not attempt to fetch the module."); - - promise_test(function (test) { - const uuid = token(); - const worker = new Worker(`./resources/worker-dynamic-import.sub.js?key=${uuid}`, { - type: "module" - }); - - return new Promise(resolve => { - worker.addEventListener("message", resolve); - }).then(async (event) => { - assert_equals(event.data, "NOT LOADED"); - const fetchResponse = await fetch(`./resources/record-fetch.py?key=${uuid}&action=getCount`); - const fetchData = await fetchResponse.json(); - assert_equals(fetchData.count, 0, "Shouldn't have tried fetching CSS module in worker"); - }); - }, "A dynamic import CSS Module within a web worker should not load and should not attempt to fetch the module."); - - promise_test(function (test) { - const worker = new Worker("./resources/basic.css", { - type: "module" - }); - return new Promise(resolve => { - worker.onerror = resolve; - }); - }, "An attempt to load a CSS module as a worker should fail."); - - </script> - -</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html deleted file mode 100644 index 4ea1790aabd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html +++ /dev/null @@ -1,83 +0,0 @@ -<!doctype html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <div id="test">I am a test div.</div> - <div id="test2">I am a test div.</div> - <div id="test3">I am a test div.</div> - <div id="test3b">I am a test div.</div> - <div id="test4">I am a test div.</div> - <div id="test4b">I am a test div.</div> - <script> - window.errorCount = 0; - window.onerror = (errorMsg, url, lineNumber, column, errorObj) => { - window.errorCount++; - }; - </script> - <script type="module" onerror="unreachable()"> - import sheet from "./resources/basic.css" assert { type: "css" }; - test(() => { - document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; - assert_equals(getComputedStyle(document.querySelector('#test')) - .backgroundColor, "rgb(255, 0, 0)", "CSS module import should succeed"); - }, "A CSS Module should load"); - </script> - <script type="module" onerror="unreachable()"> - import sheet from "./resources/basic-large.css" assert { type: "css" }; - test(() => { - // This tests potential streaming compilation of modules in - // Chromium that is triggered only for large (32>KiB) files in older - // versions. - document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; - assert_equals(getComputedStyle(document.querySelector('#test2')) - .backgroundColor, "rgb(255, 0, 0)", - "CSS module import should succeed"); - }, "A large CSS Module should load"); - </script> - <script type="module" onerror="unreachable()"> - import sheet from "./resources/bad-import.css" assert { type: "css" }; - test(() => { - document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; - assert_equals(window.errorCount, 0); - assert_equals(sheet.cssRules.length, 1, "Parser should skip @import rule"); - assert_equals(getComputedStyle(document.querySelector('#test3b')) - .backgroundColor, "rgba(0, 0, 0, 0)", - "CSS module @import should not succeed"); - assert_equals(getComputedStyle(document.querySelector('#test3')) - .backgroundColor, "rgb(0, 255, 0)", - "Rule after @import should still be applied"); - }, "An @import CSS Module should not load, but should not throw an exception"); - </script> - <script type="module" onerror="unreachable()"> - import sheet from "./resources/malformed.css" assert { type: "css" }; - test(() => { - document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]; - assert_equals(window.errorCount, 0); - assert_equals(sheet.cssRules.length, 1, "Import of malformed CSS should succeed and rules after the parse error should still be parsed"); - assert_equals(getComputedStyle(document.querySelector('#test4')) - .backgroundColor, "rgba(0, 0, 0, 0)", - "Malformed CSS rule should not be applied"); - assert_equals(getComputedStyle(document.querySelector('#test4b')) - .backgroundColor, "rgb(0, 255, 0)", - "Parsing should recover and rules after malformed rules should be applied"); - }, "A parse error should not prevent subsequent rules from being included in a CSS module"); - </script> - <script type="module"> - promise_test(function (test) { - const iframe = document.createElement("iframe"); - iframe.src = "resources/css-module-without-assertion-iframe.html"; - return new Promise(resolve => { - iframe.onload = resolve; - document.body.appendChild(iframe); - }).then(event => { - assert_equals(iframe.contentDocument.window_onerror, undefined); - assert_equals(iframe.contentDocument.script_onerror.type, "error"); - assert_equals(getComputedStyle(iframe.contentDocument.querySelector('#test')) - .backgroundColor, "rgba(0, 0, 0, 0)", - "CSS module without type assertion should result in a fetch error"); - }); - }, "CSS module without type assertion should result in a fetch error"); - </script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-dynamic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-dynamic.html deleted file mode 100644 index 13967858cb3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-dynamic.html +++ /dev/null @@ -1,23 +0,0 @@ -<!doctype html> - -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> - -<body> - <script> - promise_test(async function (test) { - const css_module = await import("./resources/basic.css", { assert: { type: "css" }}); - assert_true(css_module.default instanceof CSSStyleSheet); - assert_equals(css_module.default.cssRules[0].cssText, - "#test { background-color: rgb(255, 0, 0); }"); - }, "Load a CSS module with dynamic import()"); - - promise_test(function (test) { - return promise_rejects_js(test, TypeError, - import("./resources/basic.css"), - "Attempting to import() a CSS module without a type assertion should fail"); - }, "Ensure that loading a CSS module with dymnamic import() fails without a type assertion"); - </script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity.html deleted file mode 100644 index 1dd0dad470a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title><script> integrity="" with CSS modules</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -window.matchesLog = []; -window.matchesEvents = []; - -window.mismatchesLog = []; -window.mismatchesEvents = []; -</script> -<script type="module" src="resources/integrity-matches.js" integrity="sha384-xvbfmg9iJFHqmCoOS4VNMCwnFPPxEoIlW1Ojzl+fgEd+Wf8Pyez+SMWue+KNovjA" onload="window.matchesEvents.push('load');" onerror="window.matchesEvents.push('error')"></script> -<script type="module" src="resources/integrity-mismatches.js" integrity="sha384-doesnotmatch" onload="window.mismatchesEvents.push('load');" onerror="window.mismatchesEvents.push('error')"></script> - -<script type="module"> -test(() => { - assert_array_equals(window.matchesLog, ["integrity-matches,css:#test { background-color: rgb(255, 0, 0); }"], "The module and its dependency must have executed"); - assert_array_equals(window.matchesEvents, ["load"], "The load event must have fired"); -}, "The integrity attribute must be verified on the top-level of a module loading a CSS module and allow it to execute when it matches"); - -test(() => { - assert_array_equals(window.mismatchesLog, [], "The module and its dependency must not have executed"); - assert_array_equals(window.mismatchesEvents, ["error"], "The error event must have fired"); -}, "The integrity attribute must be verified on the top-level of a module loading a CSS module and not allow it to execute when there's a mismatch"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/load-error-events.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/load-error-events.html deleted file mode 100644 index 3457452c936..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/load-error-events.html +++ /dev/null @@ -1,67 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for CSS modules</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -</head> -<script> - "use strict"; - - var test1_load = event_test('inline, 200, parser-inserted', false, false); - var test1_error = event_test('inline, 404, parser-inserted', false, true); - - var test2_load = event_test('src, 200, parser-inserted', true, false); - var test2_error = event_test('src, 404, parser-inserted', false, true); - - var test3_dynamic_load = event_test('src, 200, not parser-inserted', true, false); - var test3_dynamic_error = event_test('src, 404, not parser-inserted', false, true); - - var test4_dynamic_load = event_test('inline, 200, not parser-inserted', false, false); - var test4_dynamic_error = event_test('inline, 404, not parser-inserted', false, true); - - var script3_dynamic_load = document.createElement('script'); - script3_dynamic_load.setAttribute('type', 'module'); - script3_dynamic_load.onload = () => onLoad(test3_dynamic_load); - script3_dynamic_load.onerror = () => onError(test3_dynamic_load); - script3_dynamic_load.src = "./resources/load-error-events.py?test=test3_dynamic_load"; - document.head.appendChild(script3_dynamic_load); - - var script3_dynamic_error = document.createElement('script'); - script3_dynamic_error.setAttribute('type', 'module'); - script3_dynamic_error.onload = () => onLoad(test3_dynamic_error); - script3_dynamic_error.onerror = () => onError(test3_dynamic_error); - script3_dynamic_error.src = "./resources/load-error-events.py?test=test3_dynamic_error"; - document.head.appendChild(script3_dynamic_error); - - var script4_dynamic_load = document.createElement('script'); - script4_dynamic_load.setAttribute('type', 'module'); - script4_dynamic_load.onload = () => onLoad(test4_dynamic_load); - script4_dynamic_load.onerror = () => onError(test4_dynamic_load); - script4_dynamic_load.async = true; - script4_dynamic_load.appendChild(document.createTextNode(` - import "./resources/basic.css" assert { type: "css" }; - onExecute(test4_dynamic_load);` - )); - document.head.appendChild(script4_dynamic_load); - - var script4_dynamic_error = document.createElement('script'); - script4_dynamic_error.setAttribute('type', 'module'); - script4_dynamic_error.onload = () => onLoad(test4_dynamic_error); - script4_dynamic_error.onerror = () => onError(test4_dynamic_error); - script4_dynamic_error.async = true; - script4_dynamic_error.appendChild(document.createTextNode(`import "./not_found.css" assert { type: "css" };`)); - document.head.appendChild(script4_dynamic_error); -</script> -<script onload="onLoad(test1_load);" onerror="onError(test1_load);" type="module"> - import "./resources/basic.css" assert { type: "css"}; - onExecute(test1_load); -</script> -<script onload="onLoad(test1_error);" onerror="onError(test1_error);" type="module"> - import "./not_found.css" assert { type: "css"}; - onExecute(test1_error); -</script> -<script src="./resources/load-error-events.py?test=test2_load" onload="onLoad(test2_load);" onerror="onError(test2_load);" type="module"></script> -<script src="./resources/load-error-events.py?test=test2_error" onload="onLoad(test2_error);" onerror="onError(test2_error);" type="module"></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/referrer-policies.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/referrer-policies.sub.html deleted file mode 100644 index efa5340715f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/referrer-policies.sub.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrers with CSS module requests</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - // "name" parameter is necessary for bypassing the module map. - import referrerSame from "./resources/referrer-checker.py?name=sameNoReferrerPolicy" assert { type: "css"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py?name=remoteNoReferrerPolicy" assert { type: "css"}; - - const origin = (new URL(location.href)).origin + "/"; - const originUrl = location.href; - - test(t => { - assert_equals( - referrerSame.rules[0].style.content, '"' + originUrl + '"', - "Referrer URL should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the default referrer policy."); - - test(t => { - assert_equals( - referrerRemote.rules[0].style.content, '"' + origin + '"', - "Referrer origin should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the default referrer policy."); -</script> -<script type="module" referrerpolicy="origin"> - import referrerSame from "./resources/referrer-checker.py?name=sameReferrerPolicyOrigin" assert { type: "css"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py?name=remoteReferrerPolicyOrigin" assert { type: "css"}; - - const origin = (new URL(location.href)).origin + "/"; - - test(t => { - assert_equals( - referrerSame.rules[0].style.content, '"' + origin + '"', - "Referrer origin should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the origin policy."); - - test(t => { - assert_equals( - referrerRemote.rules[0].style.content, '"' + origin + '"', - "Referrer origin should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the origin policy."); - -</script> -<script type="module" referrerpolicy="no-referrer"> - import referrerSame from "./resources/referrer-checker.py?name=sameReferrerPolicyNoReferrer" assert { type: "css"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py?name=remoteReferrerPolicyNoReferrer" assert { type: "css"}; - - test(t => { - assert_equals( - referrerSame.rules[0].style.content, '""', - "No referrer should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the no-referrer policy."); - - test(t => { - assert_equals( - referrerRemote.rules[0].style.content, '""', - "No referrer should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the no-referrer policy."); - -</script> -<script type="module" referrerpolicy="unsafe-url"> - import referrerSame from "./resources/referrer-checker.py?name=sameNoReferrerPolicyUnsafeUrl" assert { type: "css"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py?name=remoteNoReferrerPolicyUnsafeUrl" assert { type: "css"}; - - const originUrl = location.href; - - test(t => { - assert_equals( - referrerSame.rules[0].style.content, '"' + originUrl + '"', - "Referrer URL should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the unsafe-url referrer policy."); - - test(t => { - assert_equals( - referrerRemote.rules[0].style.content, '"' + originUrl + '"', - "Referrer URL should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the unsafe-url referrer policy."); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/relative-urls.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/relative-urls.html deleted file mode 100644 index e8476716964..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/relative-urls.html +++ /dev/null @@ -1,18 +0,0 @@ -<!doctype html> -<head> - <title>Test resolution of relative URL in CSS module</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <div id="target"></div> - <script type="module"> - import styleSheet from "./resources/load-relative-url.css" assert { type: "css"}; - test(() => { - const target = document.querySelector("#target"); - document.adoptedStyleSheets = [ styleSheet ]; - let backgroundStyle = window.getComputedStyle(target).background; - assert_not_equals(backgroundStyle.indexOf("css-module/resources/image.png"), -1); - }, "A relative URL in a CSS module should be resolved relative to the CSS file's URL, not the importing document's URL"); - </script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css deleted file mode 100644 index 8629a846d14..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css +++ /dev/null @@ -1,3 +0,0 @@ -#test3b { - background-color: #FF0000; -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css deleted file mode 100644 index a6e1a0f395d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css +++ /dev/null @@ -1,4 +0,0 @@ -@import "atImported.css"; -#test3 { - background-color:#00FF00; -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css deleted file mode 100644 index 555ab70d2ed..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css +++ /dev/null @@ -1,7 +0,0 @@ -#test2 { - background-color:red; -} - -#test:before { - content: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/basic.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/basic.css deleted file mode 100644 index e034ed9ac7c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/basic.css +++ /dev/null @@ -1,3 +0,0 @@ -#test { - background-color: #FF0000; -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-16be.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-16be.css Binary files differdeleted file mode 100644 index 9e17902a1d3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-16be.css +++ /dev/null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-16le.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-16le.css Binary files differdeleted file mode 100644 index ef90843d8ed..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-16le.css +++ /dev/null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-8.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-8.css deleted file mode 100644 index 5cf81232b7a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/bom-utf-8.css +++ /dev/null @@ -1 +0,0 @@ -div { background-color: blue; }
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/credentials-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/credentials-iframe.sub.html deleted file mode 100644 index 38868dc95d0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/credentials-iframe.sub.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> - -<script type="module"> - import styleSheet from "./cross-origin.py?id=sameOriginNoneDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; - window.sameOriginNoneDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); -</script> -<script type="module" crossOrigin="anonymous"> - import styleSheet from "./cross-origin.py?id=sameOriginAnonymousDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; - window.sameOriginAnonymousDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); -</script> -<script type="module" crossOrigin="use-credentials"> - import styleSheet from "./cross-origin.py?id=sameOriginUseCredentialsDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; - window.sameOriginUseCredentialsDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); -</script> -<script type="module"> - import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/cross-origin.py?id=crossOriginNoneDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; - window.crossOriginNoneDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); -</script> -<script type="module" crossOrigin="anonymous"> - import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/cross-origin.py?id=crossOriginAnonymousDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; - window.crossOriginAnonymousDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); -</script> -<script type="module" crossOrigin="use-credentials"> - import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/cross-origin.py?id=crossOriginUseCredentialsDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "css" }; - window.crossOriginUseCredentialsDescendant = (styleSheet.cssRules[0].cssText.indexOf(".requestHadCookies") !== -1); -</script> - -<script type="text/javascript"> -window.addEventListener('load', event => { - window.parent.postMessage({}, '*'); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/cross-origin.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/cross-origin.py deleted file mode 100644 index d744fc9514d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/cross-origin.py +++ /dev/null @@ -1,17 +0,0 @@ -def main(request, response): - - headers = [ - (b"Content-Type", b"text/css"), - (b"Access-Control-Allow-Origin", request.GET.first(b"origin")), - (b"Access-Control-Allow-Credentials", b"true") - ] - - milk = request.cookies.first(b"milk", None) - - # Send back - if milk is None: - return headers, u'.requestDidNotHaveCookies { }' - elif milk.value == b"1": - return headers, u'.requestHadCookies { }' - - return headers, u'.requestDidNotHaveCookies { }' diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-parse-error-with-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-parse-error-with-cors.sub.html deleted file mode 100644 index 1774ef36756..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-parse-error-with-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>css-module-import-cross-domain-parse-error-WithCORS</title> - <script src="../../module/crossorigin-common.js"></script> -</head> -<body> - <h1>css-module-import-cross-domain-parse-error-WithCORS</h1> - <script type="module" crossorigin> - import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/parse-error.css?pipe=header(Access-Control-Allow-Origin,*)" assert { type: "css" }; - // Push an event to the log indicating that the script was executed. - document._log.push(`imported CSS rules count: ${styleSheet.rules.length}`); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-with-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-with-cors.sub.html deleted file mode 100644 index f02a51d5569..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-with-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>css-module-import-cross-domain-WithCORS</title> - <script src="../../module/crossorigin-common.js"></script> -</head> -<body> - <h1>css-module-import-cross-domain-WithCORS</h1> - <script type="module" crossorigin> - import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/basic.css?pipe=header(Access-Control-Allow-Origin,*)" assert { type: "css" }; - // Push an event to the log indicating that the script was executed. - document._log.push(`imported CSS: ${styleSheet.rules[0].cssText}`); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-without-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-without-cors.sub.html deleted file mode 100644 index 6236f79bc8f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/crossorigin-import-without-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>css-module-import-cross-domain-NoCORS</title> - <script src="../../module/crossorigin-common.js"></script> -</head> -<body> - <h1>css-module-import-cross-domain-NoCORS</h1> - <script type="module" onerror="document._log.push('error');"> - import styleSheet from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/css-module/resources/basic.css" assert { type: "css" }; - // Push an event to the log indicating that the script was executed. - document._log.push(`imported CSS: ${styleSheet.rules[0].cssText}`); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-without-assertion-iframe.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-without-assertion-iframe.html deleted file mode 100644 index 3d1be841cee..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-without-assertion-iframe.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<body> - <script> - window.onerror = function (errorMsg, url, lineNumber, column, errorObj) - { - document.window_onerror = errorObj.name; - return true; - }; - - function scriptErrorHandler(e) { - document.script_onerror = e; - } - </script> - <script type="module" onerror="scriptErrorHandler(event)"> - import v from "./basic.css"; - document.adoptedStyleSheets = [v]; - </script> - - <div id="test"> - I am a test div. - </div> -</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/integrity-matches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/integrity-matches.js deleted file mode 100644 index 95be445311b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/integrity-matches.js +++ /dev/null @@ -1,2 +0,0 @@ -import styleSheet from "./basic.css" assert { type: "css" }; -window.matchesLog.push(`integrity-matches,css:${styleSheet.cssRules[0].cssText}`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/integrity-mismatches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/integrity-mismatches.js deleted file mode 100644 index af6fc24de49..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/integrity-mismatches.js +++ /dev/null @@ -1,2 +0,0 @@ -import styleSheet from "./basic.css" assert { type: "css" }; -window.matchesLog.push(`integrity-mismatches,css:${styleSheet.cssRules[0].cssText}`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/load-error-events.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/load-error-events.py deleted file mode 100644 index b61b1ca834e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/load-error-events.py +++ /dev/null @@ -1,14 +0,0 @@ -import re - -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - test = request.GET.first(b'test') - assert(re.match(b'^[a-zA-Z0-9_]+$', test)) - - status = 200 - if test.find(b'_load') >= 0: - content = b'import "./basic.css" assert { type: "css"}; %s.executed = true;' % test - else: - content = b'import "./not_found.css" assert { type: "css"}; %s.test.step(function() { assert_unreached("404 script should not be executed"); });' % test - - return status, headers, content diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/load-relative-url.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/load-relative-url.css deleted file mode 100644 index 27f29876104..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/load-relative-url.css +++ /dev/null @@ -1,5 +0,0 @@ - -#target { - /* image.png doesn't exist, but that's irrelevant to the test. */ - background: url('./image.png'); -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css deleted file mode 100644 index 28819bfdf55..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css +++ /dev/null @@ -1,7 +0,0 @@ -#test4 } { - background-color: #FF0000; -} - -#test4b { - background-color: #00FF00; -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/parse-error.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/parse-error.css deleted file mode 100644 index 2bee3ff9966..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/parse-error.css +++ /dev/null @@ -1,2 +0,0 @@ -div /* Opening bracket skipped intentionally. */ } - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/record-fetch.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/record-fetch.py deleted file mode 100644 index 4928cb4acb9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/record-fetch.py +++ /dev/null @@ -1,20 +0,0 @@ -def main(request, response): - try: - stash_key = request.GET.first(b"key") - action = request.GET.first(b"action") - - run_count = request.server.stash.take(stash_key) - if not run_count: - run_count = 0 - - if action == b"incCount": - request.server.stash.put(stash_key, run_count + 1) - response.headers.set(b"Content-Type", b"text/css") - response.content = b'#test { background-color: #FF0000; }' - elif action == b"getCount": - response.headers.set(b"Content-Type", b"text/json") - response.content = b'{"count": %d }' % run_count - else: - response.set_error(400, u"Invalid action") - except: - response.set_error(400, u"Not enough parameters") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py deleted file mode 100644 index c1eaed8e468..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/referrer-checker.py +++ /dev/null @@ -1,7 +0,0 @@ -def main(request, response): - referrer = request.headers.get(b"referer", b"") - response_headers = [(b"Content-Type", b"text/css"), - (b"Access-Control-Allow-Origin", b"*")] - # Put the referrer in a CSS rule that can be read by the importer through CSSOM - return (200, response_headers, - b'.referrer { content: "' + referrer + b'" }') diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/utf-8.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/utf-8.css deleted file mode 100644 index 0a8b46656f1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/utf-8.css +++ /dev/null @@ -1,3 +0,0 @@ -#test { - content: "śćążź"; -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/windows-1250.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/windows-1250.css deleted file mode 100644 index 9beac4d6180..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/windows-1250.css +++ /dev/null @@ -1,3 +0,0 @@ -#test { - content: "�湿�"; -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker-dynamic-import.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker-dynamic-import.sub.js deleted file mode 100644 index 791bd7d3f94..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker-dynamic-import.sub.js +++ /dev/null @@ -1,3 +0,0 @@ -import("./record-fetch.py?key={{GET[key]}}&action=incCount", { assert: { type: "css" } }) - .then(() => postMessage("LOADED")) - .catch(e => postMessage("NOT LOADED"));
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker.sub.js deleted file mode 100644 index ffee312d21e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/resources/worker.sub.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./record-fetch.py?key={{GET[key]}}&action=incCount" assert { type: "css" }; -postMessage("Unexpectedly loaded");
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/script-element-css-src.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/script-element-css-src.html deleted file mode 100644 index 231d02db477..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/script-element-css-src.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<title><script> with CSS src</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that <script> doesn't load when the src is CSS."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, ["error"]); - })); -</script> -<script type="module" src="./resources/basic.css" onload="t.unreached_func('CSS src should fail to load')" onerror="log.push('error')"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/data-url.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/data-url.html deleted file mode 100644 index 6fad5052717..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/data-url.html +++ /dev/null @@ -1,32 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>Test data URL and scripts errors</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script> - setup({allow_uncaught_exception:true}); - async_test(function(t) { - var counter = 1 - window.onerror = t.step_func((message, url, lineno, colno, e) => { - // Test that error is not muted as data URLs have a response type of "default" - // and errors should only be muted if the response type is "opaque" or "opaqueredirect" - assert_not_equals(message, "Script error.") - assert_not_equals(url, null); - assert_not_equals(url, ""); - assert_equals(typeof lineno, "number"); - assert_not_equals(lineno, 0); - assert_equals(typeof colno, "number"); - assert_not_equals(colno, 0); - assert_equals(typeof e, "number") - assert_equals(e, counter) - if (counter == 3) { - t.done() - } - counter++ - }); - }); -</script> -<script src="data:,throw 1"></script> -<script src="data:,throw 2" crossorigin></script> -<script src="data:,throw 3" crossorigin=use-credentials></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/README.md b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/README.md deleted file mode 100644 index ac5c91c9a2e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/README.md +++ /dev/null @@ -1,7 +0,0 @@ -The tests in this directory is intended for Chromium's DeferAllScript -experiment https://crbug.com/1339112, containing scenarios that would be -affected by DeferAllScript, to monitor the behavior on Chromium and other -browsers. - -The same set of expectations (when async/defer scripts are evaluated) should -already be covered somewhere in WPT. diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/async-script-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/async-script-2.html deleted file mode 100644 index f7377d847ad..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/async-script-2.html +++ /dev/null @@ -1,40 +0,0 @@ -<!doctype html> -<title>Async Script Execution Order</title> -<html> -<head> - <meta charset="utf-8"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/helper.js"></script> -</head> -<body> - <script> - setup({single_test: true}); - function finish() { - assert_array_equals( - window.result, - ["Inline1", "Sync1", "Async1", "Sync2", "EndOfBody", - "DOMContentLoaded"], - "Execution order"); - // Chromium's force-defer order would be: - // ["EndOfBody", "Inline1", "Sync1", "Sync2", - // "DOMContentLoaded", "Async1"] - // - // If we delay async script e.g. after DOMContentLoaded, - // the order would be: - // ["Inline1", "Sync1", "Sync2", "EndOfBody", - // "DOMContentLoaded", "Async1"] - done(); - } - logScript("Inline1"); - window.addEventListener("load", finish); - </script> - <script src="resources/sync-script-1.js"></script> - <!-- To test the async script loaded before force-deferred scripts - should be evaluated after the force-deferred scripts - in Chromium's force-defer order. --> - <script src="resources/async-script-1.js?pipe=trickle(d1)" async></script> - <script src="resources/sync-script-2.js?pipe=trickle(d2)"></script> - <pre id="bodyend">End</pre> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/async-script.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/async-script.html deleted file mode 100644 index dea7f987bfa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/async-script.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<title>Async Script Execution Order</title> -<html> -<head> - <meta charset="utf-8"> - <meta name=variant content=""> - <meta name=variant content="?reload"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/helper.js"></script> -</head> -<body> - <script> - let child_path = 'support/async-script.html'; - if (location.search == '?reload') { - child_path += '?reload'; - } - const child_window = window.open(child_path); - fetch_tests_from_window(child_window); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/defer-script-xml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/defer-script-xml.xhtml deleted file mode 100644 index 9d02ff39f51..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/defer-script-xml.xhtml +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Defer Script Execution Order</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/helper.js"></script> -</head> -<body> - <div id="scriptlog"/> - <input id="testElement"/> - <script> - setup({single_test: true}); - function finish() { - assert_array_equals( - window.result, - ["Inline1", "Sync1", "Inline2", "Sync2", "EndOfBody", - "Defer1", "Defer2", "DOMContentLoaded"], - "Execution order"); - // Chromium order is (due to https://crbug.com/874749): - // ["Inline1", "Sync1", "Defer1", "Inline2", "Defer2", "Sync2", - // "EndOfBody", "DOMContentLoaded"] - done(); - } - logScript("Inline1"); - window.addEventListener("load", finish); - </script> - - <script src="resources/sync-script-1.js"></script> - <script src="resources/defer-script-1.js" defer="defer"></script> - <script> - logScript("Inline2"); - </script> - <script src="resources/defer-script-2.js" defer="defer"></script> - <script src="resources/sync-script-2.js"></script> - <pre id="bodyend">End</pre> -</body> -</html> - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/defer-script.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/defer-script.html deleted file mode 100644 index 62c3a74014f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/defer-script.html +++ /dev/null @@ -1,37 +0,0 @@ -<!doctype html> -<title>Defer Script Execution Order</title> -<html> -<head> - <meta charset="utf-8"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/helper.js"></script> -</head> -<body> - <script> - setup({single_test: true}); - function finish() { - assert_array_equals( - window.result, - ["Inline1", "Sync1", "Inline2", "Sync2", "EndOfBody", - "Defer1", "Defer2", "DOMContentLoaded"], - "Execution order"); - // Chromium's force defer order would be: - // ["EndOfBody", "Inline1", "Sync1", "Inline2", "Sync2", - // "Defer1", "Defer2", "DOMContentLoaded"] - done(); - } - logScript("Inline1"); - window.addEventListener("load", finish); - </script> - - <script src="resources/sync-script-1.js"></script> - <script src="resources/defer-script-1.js" defer></script> - <script> - logScript("Inline2"); - </script> - <script src="resources/defer-script-2.js" defer></script> - <script src="resources/sync-script-2.js"></script> - <pre id="bodyend">End</pre> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/document-write.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/document-write.html deleted file mode 100644 index 63e251bae5c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/document-write.html +++ /dev/null @@ -1,67 +0,0 @@ -<!doctype html> -<title>DeferAllScript: document.write()</title> -<html> -<head> - <meta charset="utf-8"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script> - const t1 = async_test("document.write()"); - const t2 = async_test("document.write(),close()"); - const t3 = async_test("document.open(),write()"); - const t4 = async_test("document.open(),write(),close()"); - function finish() { - const expected = ["Inline1", "Sync2", "Async1", "Sync1", - "EndOfBody", "DOMContentLoaded", "WindowLoad"]; - t1.step_func_done(() => { - assert_array_equals( - document.getElementById("document-write").contentWindow.result, - expected, - "Execution order"); - })(); - - t2.step_func_done(() => { - assert_array_equals( - document.getElementById("document-write-close").contentWindow.result, - expected, - "Execution order"); - })(); - - t3.step_func_done(() => { - assert_array_equals( - document.getElementById("document-open-write").contentWindow.result, - expected, - "Execution order"); - })(); - - t4.step_func_done(() => { - assert_array_equals( - document.getElementById( - "document-open-write-close").contentWindow.result, - expected, - "Execution order"); - })(); - // For cases where documents are kept open, call `document.close()` here - // to finish the test harness. - for (const iframe of document.querySelectorAll("iframe")) { - iframe.contentDocument.close(); - } - } - - // For cases where documents are kept open (that should never occur in - // non-intervention cases), schedule `finish()` because Window load events - // might be not fired. - setTimeout(finish, 5000); - </script> -</head> -<body onload="finish()"> -<iframe id="document-write" - src="resources/document-write-iframe.sub.html?script=document-write.js"></iframe> -<iframe id="document-write-close" - src="resources/document-write-iframe.sub.html?script=document-write-close.js"></iframe> -<iframe id="document-open-write" - src="resources/document-write-iframe.sub.html?script=document-open-write.js"></iframe> -<iframe id="document-open-write-close" - src="resources/document-write-iframe.sub.html?script=document-open-write-close.js"></iframe> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/async-script-1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/async-script-1.js deleted file mode 100644 index 267f324aa65..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/async-script-1.js +++ /dev/null @@ -1 +0,0 @@ -logScript("Async1"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/defer-script-1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/defer-script-1.js deleted file mode 100644 index 1a0524f4fbd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/defer-script-1.js +++ /dev/null @@ -1 +0,0 @@ -logScript("Defer1"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/defer-script-2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/defer-script-2.js deleted file mode 100644 index d644e37f182..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/defer-script-2.js +++ /dev/null @@ -1 +0,0 @@ -logScript("Defer2"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-open-write-close.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-open-write-close.js deleted file mode 100644 index 80703d5c0ef..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-open-write-close.js +++ /dev/null @@ -1,3 +0,0 @@ -document.open(); -document.write(`<script src="sync-script-2.js"></script>`); -document.close(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-open-write.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-open-write.js deleted file mode 100644 index 178c374df69..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-open-write.js +++ /dev/null @@ -1,2 +0,0 @@ -document.open(); -document.write(`<script src="sync-script-2.js"></script>`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write-close.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write-close.js deleted file mode 100644 index 7cdde0d78ff..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write-close.js +++ /dev/null @@ -1,2 +0,0 @@ -document.write(`<script src="sync-script-2.js"></script>`); -document.close(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write-iframe.sub.html deleted file mode 100644 index e3022e3bf1f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write-iframe.sub.html +++ /dev/null @@ -1,14 +0,0 @@ -<!doctype html> -<html> -<body> -<script src="helper.js"></script> -<script> -logScript("Inline1"); -window.addEventListener("load", () => logScript("WindowLoad")); -</script> -<script src="{{GET[script]}}?pipe=trickle(d1)"></script> -<script src="async-script-1.js" async></script> -<script src="sync-script-1.js?pipe=trickle(d2)"></script> -<pre id="bodyend">End</pre> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write.js deleted file mode 100644 index 413a9bc6210..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/document-write.js +++ /dev/null @@ -1 +0,0 @@ -document.write(`<script src="sync-script-2.js"></script>`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/helper.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/helper.js deleted file mode 100644 index 89c6d1e8282..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/helper.js +++ /dev/null @@ -1,17 +0,0 @@ -window.result = []; -function log(msg) { - window.result.push(msg); -} -function checkIfReachedBodyEnd() { - const endelement = document.getElementById("bodyend"); - // `<pre id="bodyend">End</pre>` is needed at the end of HTML. - if (endelement && endelement.textContent === "End") { - log("EndOfBody"); - endelement.textContent = "Detected"; - } -} -function logScript(msg) { - checkIfReachedBodyEnd(); - log(msg); -} -document.addEventListener("DOMContentLoaded", function() { logScript("DOMContentLoaded"); }); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/sync-script-1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/sync-script-1.js deleted file mode 100644 index 726b56346e8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/sync-script-1.js +++ /dev/null @@ -1 +0,0 @@ -logScript("Sync1"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/sync-script-2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/sync-script-2.js deleted file mode 100644 index ba2edfbf270..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/resources/sync-script-2.js +++ /dev/null @@ -1 +0,0 @@ -logScript("Sync2"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/support/async-script.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/support/async-script.html deleted file mode 100644 index d513bafe4f6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer-script/support/async-script.html +++ /dev/null @@ -1,44 +0,0 @@ -<!doctype html> -<title>Child Async Script Execution Order</title> -<html> - -<head> - <meta charset="utf-8"> - <script src="/resources/testharness.js"></script> - <script src="../resources/helper.js"></script> -</head> - -<body> - <script> - const reload_key = 'run-after-reload'; - if (location.search == '?reload' && !window.localStorage.getItem(reload_key)) { - window.localStorage.setItem(reload_key, true); - location.reload(); - } else { - window.localStorage.clear(); - test(); - } - - function test() { - setup({ single_test: true }); - function finish() { - assert_array_equals( - window.result, - ["Inline1", "Sync1", "EndOfBody", "DOMContentLoaded", "Async1"], - "Execution order"); - // Chromium's force-defer order would be: - // ["EndOfBody", "Inline1", "Sync1", "DOMContentLoaded", "Async1"] - done(); - } - logScript("Inline1"); - window.addEventListener("load", finish); - } - </script> - <script src="../resources/sync-script-1.js"></script> - <!-- Delays are added to make DOMContentLoaded be fired before - async script load completion --> - <script src="../resources/async-script-1.js?pipe=trickle(d1)" async></script> - <pre id="bodyend">End</pre> -</body> - -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer.js deleted file mode 100644 index c4449ca7c8a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/defer.js +++ /dev/null @@ -1,4 +0,0 @@ -t.step(() => { - assert_equals(script_run_status, "deferred", "the script run status"); -}); -t.done(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/emptyish-script-elements.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/emptyish-script-elements.html deleted file mode 100644 index 37f4a87c95e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/emptyish-script-elements.html +++ /dev/null @@ -1,75 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Treatment of various empty-ish script elements</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#already-started"> -<link rel="help" href="https://github.com/whatwg/html/issues/3419"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script id="no-children"></script> -<script id="whitespace-child"> </script> - -<script id="gets-a-no-text-child"></script> -<script id="gets-an-empty-text-child"></script> -<script id="gets-a-text-child"></script> -<script id="gets-a-comment-child"></script> -<script id="gets-a-text-descendant"></script> - -<script> -"use strict"; - -test(() => { - const el = document.querySelector("#no-children"); - el.appendChild(document.createTextNode("window.noChildrenExecuted = true;")); - assert_true(window.noChildrenExecuted); -}, "A script with no children bails early, before setting already-started, so can be executed when adding text"); - -test(() => { - const el = document.querySelector("#whitespace-child"); - el.appendChild(document.createTextNode("window.whitespaceChildExecuted = true;")); - assert_equals(window.whitespaceChildExecuted, undefined); -}, "A script with a whitespace child executes, setting already-started, so adding text is a no-op"); - -test(() => { - const el = document.querySelector("#gets-a-no-text-child"); - el.appendChild(document.createElement("span")); - el.appendChild(document.createTextNode("window.getsANoTextChildExecuted = true;")); - assert_true(window.getsANoTextChildExecuted); -}, "A script with an empty element inserted bails early, before setting already-started, so can be executed when adding text"); - -test(() => { - const el = document.querySelector("#gets-an-empty-text-child"); - el.appendChild(document.createTextNode("")); - el.appendChild(document.createTextNode("window.getsAnEmptyTextChildExecuted = true;")); - assert_true(window.getsAnEmptyTextChildExecuted); -}, "A script with an empty text node inserted bails early, before setting already-started, so can be executed when adding text"); - -test(() => { - const el = document.querySelector("#gets-a-text-child"); - el.appendChild(document.createTextNode("window.getsATextChildExecuted1 = true;")); - el.appendChild(document.createTextNode("window.getsATextChildExecuted2 = true;")); - assert_true(window.getsATextChildExecuted1); - assert_equals(window.getsATextChildExecuted2, undefined); -}, "A script with a text child inserted executes, setting already-started, so adding text is a no-op"); - -test(() => { - const el = document.querySelector("#gets-a-comment-child"); - el.appendChild(document.createComment("window.getsACommentChild1 = true;")); - el.appendChild(document.createTextNode("window.getsACommentChild2 = true;")); - assert_equals(window.getsACommentChild1, undefined); - assert_true(window.getsACommentChild2); -}, "A script with a comment child inserted bails early, before setting already-started, so can be executed when adding text"); - -test(() => { - const el = document.querySelector("#gets-a-text-descendant"); - const child = document.createElement("span"); - child.appendChild(document.createTextNode("window.getsATextDescendantExecuted1 = true;")); - el.appendChild(child); - el.appendChild(document.createTextNode("window.getsATextDescendantExecuted2 = true;")); - assert_equals(window.getsATextDescendantExecuted1, undefined); - assert_true(window.getsATextDescendantExecuted2); -}, "A script with an element containing text inserted bails early, before setting already-started, so can be executed when adding text"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/001.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/001.html deleted file mode 100644 index 3f54f764f98..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/001.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: inline in markup </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1');</script> - <script>log('inline script #2');</script> - - <script type="text/javascript"> - - var t = async_test() - - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'inline script #2' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/002.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/002.html deleted file mode 100644 index df7ca957993..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/002.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: external in markup </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/include-1.js"></script> - <script src="scripts/include-2.js"></script> - - <script type="text/javascript"> - - var t = async_test() - - - function test() { - assert_array_equals(eventOrder, ['external script #1', 'external script #2' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/003.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/003.html deleted file mode 100644 index 9c23b7e715e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/003.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: inline+external in markup </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1')</script> - <script src="scripts/include-2.js"></script> - - <script type="text/javascript"> - - var t = async_test() - - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'external script #2' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/004.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/004.html deleted file mode 100644 index a21dd388ebc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/004.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: external+inline in markup </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/include-1.js"></script> - <script>log('inline script #2')</script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['external script #1', 'inline script #2' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/005.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/005.html deleted file mode 100644 index ff4a66d25e7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/005.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write inline in markup </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script>log(\'doc write script\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'doc write script', 'end script #1' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/006.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/006.html deleted file mode 100644 index b8785a60c6d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/006.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write inline - multiple</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script>log(\'doc write script 1\')<\/script>' ); - document.write( '<script>log(\'doc write script 2\')<\/script>' ); - eval('log(\'eval 1\')'); - document.write( '<script>log(\'doc write script 3\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'doc write script 1','doc write script 2', 'eval 1','doc write script 3', 'end script #1' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/007.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/007.html deleted file mode 100644 index edd99207575..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/007.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write external</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script src="scripts/include-1.js">log(\'ignore this\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/008.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/008.html deleted file mode 100644 index dce763987f0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/008.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write external - multiple</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script src="scripts/include-1.js">log(\'ignore this\')<\/script>' ); - document.write( '<script src="scripts/include-2.js">log(\'ignore this\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1', 'external script #2' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/009.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/009.html deleted file mode 100644 index 9d5b2de081a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/009.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write external - multiple with doc.write</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script src="scripts/include-1.js">log(\'ignore this\')<\/script>' ); - document.write( '<script src="scripts/include-3.js">log(\'ignore this\')<\/script>' ); - document.write( '<script src="scripts/include-2.js">log(\'ignore this\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1', 'external script before doc write', 'document.write external script', 'external script after doc write', 'external script #2' ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/010.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/010.html deleted file mode 100644 index 69a462c301f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/010.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write external + inline - multiple with doc.write</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script src="scripts/include-1.js">log(\'ignore this\')<\/script>' ); - document.write( '<script>log(\'inline with doc.write #1\')<\/script>' ); - document.write( '<script src="scripts/include-2.js">log(\'ignore this\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1', 'inline with doc.write #1', 'external script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/011.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/011.html deleted file mode 100644 index 33024ba59e5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/011.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write external + inline - multiple with doc.write + subsequent markup</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script src="scripts/include-1.js">log(\'ignore this\')<\/script>' ); - document.write( '<script>log(\'inline with doc.write #1\')<\/script>' ); - document.write( '<script src="scripts/include-2.js">log(\'ignore this\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1', 'inline with doc.write #1', 'external script #2', 'inline script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/012.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/012.html deleted file mode 100644 index 01c9293b203..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/012.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write external and onload events </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script src="scripts/include-1.js" onload = "log(\'include-1 load\')">log(\'ignore this\')<\/script>' ) - document.write( '<script src="scripts/include-3.js" onload = "log(\'include-3 load\')"><\/script>' ) - document.write( '<script src="scripts/include-2.js" onload = "log(\'include-2 load\')">log(\'ignore this\')<\/script>' ) - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1', 'include-1 load', 'external script before doc write', 'document.write external script', 'external script after doc write', 'include-3 load', 'external script #2', 'include-2 load', 'inline script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/013.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/013.html deleted file mode 100644 index 09616a67d4c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/013.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added inline script earlier in document</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'head script #1','end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 100); }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/014.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/014.html deleted file mode 100644 index 41c90a34216..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/014.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: SCRIPT elements that move themselves in DOM </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.getElementsByTagName('head')[0].appendChild(document.getElementsByTagName('script')[2]); - log('end script #1'); - </script> - - <script type="text/javascript"> - log('script #2'); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/015.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/015.html deleted file mode 100644 index 1fa67e22ed0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/015.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added inline+external+inline script earlier in document</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], false); - var s = testlib.addScript('', { 'src':'scripts/include-1.js' }, document.getElementsByTagName('head')[0], false); - testlib.addScript('log(\'head script #2\')', {}, document.getElementsByTagName('head')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - ///XXX I think the spec allows this case to race - onload = function(){ - setTimeout(t.step_func( - function() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'head script #1', 'head script #2', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'head script #1', 'head script #2', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - }), - 100);} - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/015a.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/015a.html deleted file mode 100644 index 94763c3542e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/015a.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added inline+external+inline script earlier in document</title> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], false); - var s = testlib.addScript('', { 'src':'scripts/include-1.js?pipe=trickle(d1)' }, document.getElementsByTagName('head')[0], false); - testlib.addScript('log(\'head script #2\')', {}, document.getElementsByTagName('head')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'head script #1', 'head script #2', 'end script #1', 'inline script #2', 'external script #1']); - t.done(); - } - onload = function(){setTimeout(t.step_func(function() {test.apply(t)}), 2000); } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/016.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/016.html deleted file mode 100644 index 1149dcc752f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/016.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added inline script later in document</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('log(\'body script #1\')', {}, document.body, false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'body script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 100); }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/017.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/017.html deleted file mode 100644 index 66675bcf114..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/017.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: multiple DOM added scripts later in document</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('log(\'body script #1\')', {}, document.getElementsByTagName('body')[0], false); - testlib.addScript('', { 'src':'scripts/include-1.js' }, document.getElementsByTagName('body')[0], false); - testlib.addScript('log(\'body script #2\')', {}, document.getElementsByTagName('body')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - //The order of the external script vs the second inline script is undefined because the added script is async by default - //But we expect most UAs to have the second order - onload = function() {setTimeout(t.step_func(function() { - assert_any(assert_array_equals, eventOrder, [ - ['inline script #1', 'body script #1', 'body script #2', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'body script #1', 'body script #2', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - }), 100);} - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/018.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/018.html deleted file mode 100644 index 5a349bf556f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/018.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added scripts and doc.write</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('', { 'src':'scripts/include-3.js' }, document.getElementsByTagName('head')[0], false); - testlib.addScript('log(\'body script #2\')', {}, document.getElementsByTagName('body')[0], true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - //XXX Need to test this delaying the document after we insert the external script and delaying the external script itself; afaict the spec allows us to race here on whether the document.write - //ever actually happens or not according to whether the insertion point is defined at the point at which the script is executed. - function test() { - assert_any(assert_array_equals, eventOrder, [ - ['inline script #1', 'body script #2', 'end script #1', 'external script before doc write', 'document.write external script', 'external script after doc write', 'inline script #2'], - ['inline script #1', 'body script #2', 'end script #1', 'inline script #2', 'external script before doc write', 'document.write external script', 'external script after doc write'], - ['inline script #1', 'body script #2', 'end script #1', 'inline script #2', 'external script before doc write', 'external script after doc write'] - ]); - t.done(); -} - onload = t.step_func(function(){setTimeout(test.apply(t), 100); }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/019.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/019.html deleted file mode 100644 index 64ee4f1c521..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/019.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added scripts and event handling </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script onload="log('inline #1 load')"> - log('inline script #1'); - testlib.addScript('', {'src':'scripts/include-1.js', 'onload':function(){log("external #1 load")}}, document.getElementsByTagName('head')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'external #1 load', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'external script #1', 'external #1 load'] - ]); - t.done(); - } - onload = function(){setTimeout(t.step_func(test), 100); } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/020.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/020.html deleted file mode 100644 index 7d8f953e407..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/020.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added script with data: URL </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - testlib.addScript('', { 'src':'data:text/javascript,log("data URL script")' }, document.getElementsByTagName('body')[0], true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'data URL script', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'data URL script']]); - t.done(); - } - onload = function() {setTimeout( t.step_func(test), 100); } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/021.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/021.html deleted file mode 100644 index 34fdc95cb1a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/021.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added script with javascript: URL </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - testlib.addScript('', { 'src':'javascript:log("JS URL script")' }, document.getElementsByTagName('body')[0], true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', /*'JS URL script',*/ 'inline script #2']); - t.done(); - /* pass condition changed 2010-12-01 due to CT-198 */ - } - onload = t.step_func(function(){setTimeout( test, 100); }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/022.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/022.html deleted file mode 100644 index ccbcb347dc5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/022.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added script, late .src </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - var script = testlib.addScript('', { }, document.getElementsByTagName('body')[0], false); - script.src='scripts/include-1.js'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - onload = function() {setTimeout(t.step_func( - function() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'external script #1']]); - t.done() - }), - 100)} - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/023.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/023.html deleted file mode 100644 index dc687ffe4d5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/023.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added script, even later .src </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - var script = testlib.addScript('', { }, document.getElementsByTagName('body')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2', 'external script #1']); - t.done(); -} - onload = t.step_func(function(){ - script.src='scripts/include-1.js'; - script.onload = t.step_func(test); - }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/024.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/024.html deleted file mode 100644 index ee807b56f98..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/024.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added script, .src set twice</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - var script = testlib.addScript('', { }, document.getElementsByTagName('body')[0], false); - script.src='scripts/include-1.js'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - } - onload = t.step_func(function(){ - script.src='scripts/include-2.js'; // needs to be ignored, script already "is executed" - setTimeout(t.step_func(test), 100); - }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/025.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/025.html deleted file mode 100644 index 05c6a972843..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/025.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM added script, .src set on script with content</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - var script = testlib.addScript('log("inline DOM script #1")', { }, document.getElementsByTagName('body')[0], false); - script.src='scripts/include-1.js'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'inline DOM script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){ - setTimeout(t.step_func(test), 100); - }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/026.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/026.html deleted file mode 100644 index 34110ff5baf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/026.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: doc write added script, .src set later</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - var t = async_test(); - document.write('<script><\/script>'); - var scripts = document.getElementsByTagName('script'); - scripts[scripts.length - 1].src = 'scripts/include-1.js'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - - onload = function() { - setTimeout( - t.step_func(function() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - }), - 100); - } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/027.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/027.html deleted file mode 100644 index e9fbe7f15c0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/027.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: doc write added script with content, .src set later</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - document.write('<script>log(\'doc.write script\')<\/script>'); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - document.getElementsByTagName('script')[4].src='scripts/include-1.js'; - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'doc.write script', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){ - setTimeout(t.step_func(test), 100); - }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/028.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/028.html deleted file mode 100644 index e383d4f1a64..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/028.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: javascript: URL</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <script>log('inline script #1'); - window.location.replace('javascript:log(\'JS URL\')'); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [ - ['inline script #1', 'end script #1', 'JS URL', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'JS URL']]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/030.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/030.html deleted file mode 100644 index f01c257e0d1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/030.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: javascript: URL in HREF, onclick handler</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <p><a href="javascript:log('JS URL')" onclick="log('click event');return true;"></a></p> - <script>log('inline script #1'); - if(document.links[0].click){ - document.links[0].click(); - }else{ - var evt = document.createEvent("MouseEvents"); - evt.initMouseEvent("click", true, true, window, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - document.links[0].dispatchEvent(evt); - } - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - var w = window; - onload = function() {setTimeout( - t.step_func(function() { - w.assert_any(w.assert_array_equals, w.eventOrder, - [['inline script #1', 'click event', 'end script #1', 'JS URL', 'inline script #2'], - ['inline script #1', 'click event', 'end script #1', 'inline script #2', 'JS URL']]); - t.done(); - }), 200); - } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/031.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/031.html deleted file mode 100644 index 3ddb36ab8de..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/031.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: focus and blur events</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <form><input type="button" onclick="log('click event')" onfocus="log('focus event')" onblur="log('blur event')"><input type="button" onfocus="log('focus el 2 event')" onblur="log('blur event')"></form> - <script>log('inline script #1'); - document.forms[0][0].focus(); - document.forms[0][1].click(); - document.forms[0][1].focus(); - log('end script #1'); - </script> - - <script type="text/javascript"> - log('inline script #2'); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'focus event', 'blur event', 'focus el 2 event', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 200);}) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/032.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/032.html deleted file mode 100644 index da3969740c7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/032.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: innerHTML and scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - // script added with innerHTML should not run.. - document.getElementsByTagName('div')[1].innerHTML = '<script>log("innerHTML script runs")<\/script><script src="scripts/include-1.js"><\/script>'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 200);}) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/033.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/033.html deleted file mode 100644 index 5c41effcde6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/033.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: innerHTML and scripts moved in DOM</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - // script added with innerHTML should not run.. - document.getElementsByTagName('div')[0].innerHTML = '<script>log("innerHTML script runs")<\/script><script src="scripts/include-1.js"><\/script>'; - try{ - document.body.appendChild( document.getElementsByTagName('div')[0].firstChild ); - document.body.appendChild( document.getElementsByTagName('div')[0].firstChild ); - }catch(e){ - log('ERROR while testing'); - } - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 200);}) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/034.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/034.html deleted file mode 100644 index 13664253a24..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/034.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: innerHTML adding frames with JS in</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - document.getElementsByTagName('div')[1].innerHTML = '<iframe src="pages/helloworld.html"></iframe>'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2', 'frame/popup script']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 200);}) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/035.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/035.html deleted file mode 100644 index 406c3c548f4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/035.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: innerHTML adding frames with JS in and moving scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - document.getElementsByTagName('div')[1].innerHTML = '<iframe src="pages/helloworld.html"></iframe>'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2', 'frame/popup script']); - t.done(); - /*, ['inline script #1', 'end script #1', 'frame/popup script', 'inline script #2'] */ - } - onload = t.step_func(function(){ - try{ - document.body.appendChild(document.importNode( top.frames[0].document.getElementsByTagName('script')[0], true )); - }catch(e){ log('ERROR - tested functionality not supported'); } - setTimeout(t.step_func(test), 200); - }); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/036.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/036.html deleted file mode 100644 index 113541dab9d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/036.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM cloning</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - try{ - var script = document.getElementsByTagName('script')[0].cloneNode(true); - document.body.appendChild(script); - }catch(e){ log('ERROR - tested functionality not supported'); } - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'head script #1', 'end script #1', 'inline script #2' ]); - t.done(); - } - onload = t.step_func(function(){ - setTimeout(t.step_func(test), 200); - }); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/037.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/037.html deleted file mode 100644 index 15bd8a96e0b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/037.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM movement with appendChild, inline</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - var script = testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - try{ - document.body.appendChild(script); - }catch(e){ log('ERROR - tested functionality not supported'); } - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'head script #1', 'end script #1', 'inline script #2' ]); - t.done(); - } - onload = t.step_func(function(){ - setTimeout(t.step_func(test), 200); - }); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/038.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/038.html deleted file mode 100644 index db6cec35207..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/038.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM movement with appendChild, external</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - var script = testlib.addScript('', { 'src':'scripts/include-1.js' }, document.getElementsByTagName('head')[0], true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - try{ - document.body.appendChild(script); - }catch(e){ log('ERROR - tested functionality not supported'); } - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - } - onload = function() { - setTimeout(t.step_func(test), 200); - }; - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/039.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/039.html deleted file mode 100644 index 3720e248660..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/039.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: IFRAMEs added with DOM</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - for( var i=0; i<2; i++ ){ - var iframe=document.createElement('iframe'); - document.getElementsByTagName('div')[1].appendChild(iframe); - iframe.src='pages/helloworld.html?'+i+'&'+Math.random(); - } - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - promise_test(() => { - const frames = document.querySelectorAll("iframe"); - return Promise.all([ - new Promise(resolve => window.addEventListener('load', resolve)), - new Promise(resolve => frames[0].addEventListener('load', resolve)), - new Promise(resolve => frames[1].addEventListener('load', resolve)), - ]).then(() => { - assert_equals(eventOrder.length, 5); - assert_array_equals( - eventOrder.slice(0, 3), - ['inline script #1', 'end script #1', 'inline script #2'], - "inline scripts should run first"); - assert_in_array('frame/popup script 0', eventOrder.slice(3, 5), 'iframe should have loaded'); - assert_in_array('frame/popup script 1', eventOrder.slice(3, 5), 'iframe should have loaded'); - }); - }, 'iframes should load asynchronously after inline script run'); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/040.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/040.html deleted file mode 100644 index 3cdf87f07bb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/040.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: IFRAMEs added with DOM (innerHTML), javascript: URL</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - document.getElementsByTagName('div')[1].innerHTML = '<iframe src="javascript:parent.log(\'JS URL\');\'<html><script>parent.log(\\\'frame script\\\')<\/script></html>\'"></iframe>'; - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [ - ['inline script #1', 'end script #1', 'JS URL', 'inline script #2', 'frame script'], - /* the following combination seems quite unlikely? */ - ['inline script #1', 'end script #1', 'JS URL', 'frame script', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'JS URL', 'frame script']]); - t.done(); - } - onload = t.step_func(function(){ - setTimeout(t.step_func(test), 200); - }); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/041.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/041.html deleted file mode 100644 index bce70411857..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/041.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write scripts that write scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.write( '<script>log(\'inline with doc.write #1\'); document.write(\'<script src="scripts/include-4.js"><\\\/script>\');log(\'end inline with doc.write\');<\/script>' ); - document.write( '<script src="scripts/include-1.js">log(\'ignore this\')<\/script>' ); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'inline with doc.write #1', 'end inline with doc.write', 'end script #1', 'include-4 before doc write', 'include-4 after doc write', 'external script before doc write', 'document.write external script', 'external script after doc write', 'external script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/042.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/042.html deleted file mode 100644 index df3a2f88f29..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/042.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM mutation events when adding scripts: DOMNodeInserted </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.addEventListener( 'DOMNodeInserted', function(){ log('DOMNodeInserted'); }, false ); - testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'head script #1', 'DOMNodeInserted', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/043.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/043.html deleted file mode 100644 index bcfd90cba47..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/043.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM mutation events when adding external scripts: DOMNodeInserted </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.addEventListener( 'DOMNodeInserted', function(){ log('DOMNodeInserted'); }, false ); - testlib.addScript('', { src: 'scripts/include-1.js' }, document.getElementsByTagName('head')[0], false); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'DOMNodeInserted', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'DOMNodeInserted', 'end script #1', 'inline script #2', 'external script #1']] - ); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/044.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/044.html deleted file mode 100644 index 8d412079e45..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/044.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM mutation events when adding scripts: DOMNodeInsertedIntoDocument </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('log(\'head script #1\')', {}, document.getElementsByTagName('head')[0], false, function(s){s.addEventListener( 'DOMNodeInsertedIntoDocument', function(){ log('DOMNodeInsertedIntoDocument'); }, false ); } ); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'head script #1', 'DOMNodeInsertedIntoDocument', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/045.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/045.html deleted file mode 100644 index 254e0d13662..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/045.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: DOM mutation events when adding external scripts: DOMNodeInsertedIntoDocument </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('', {src:'scripts/include-1.js'}, document.getElementsByTagName('head')[0], false, function(s){s.addEventListener( 'DOMNodeInsertedIntoDocument', function(){ log('DOMNodeInsertedIntoDocument'); }, false);}); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - onload = t.step_func(function() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'DOMNodeInsertedIntoDocument', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'DOMNodeInsertedIntoDocument', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - }); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/046.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/046.html deleted file mode 100644 index 4f145d63e1d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/046.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: no readystatechange events when adding external scripts </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('', {src:'scripts/include-1.js', onreadystatechange:function() {log( 'readystatechange '+ this.readyState );}}, document.getElementsByTagName('head')[0], false ); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/047.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/047.html deleted file mode 100644 index 88509e9d435..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/047.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding and removing external script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=testlib.addScript('', {src:'scripts/include-1.js'}, document.getElementsByTagName('head')[0], false ); - script.parentNode.removeChild(script); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/048.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/048.html deleted file mode 100644 index 8879f035d37..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/048.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding inline script which sets its own .src </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=testlib.addScript('log(\'HEAD script start\');document.getElementsByTagName(\'script\')[0].src=\'scripts/include-1.js\';log(\'HEAD script end\')', {}, document.getElementsByTagName('head')[0], true ); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'HEAD script start', 'HEAD script end', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/049.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/049.html deleted file mode 100644 index 455a20c549c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/049.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding external script but removeAttribute( src ) before it runs</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=testlib.addScript('log(\'HEAD script\');', { src:'scripts/include-1.js' }, document.getElementsByTagName('head')[0], false ); - script.removeAttribute('src'); - log('end script #1'); - </script> - - <script type="text/javascript"> - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #1']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/050.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/050.html deleted file mode 100644 index a400749f18e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/050.html +++ /dev/null @@ -1,50 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding external script that removes all scripts from document</title> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=testlib.addScript('', { src:'scripts/include-5.js' }, document.getElementsByTagName('head')[0], false ); - // caching might affect whether the below script runs or not. Adding Math.random() makes the test a bit more predictable? :-p - var script=testlib.addScript('', { src:'scripts/include-1.js?pipe=trickle(d1)&'+Math.random() }, document.getElementsByTagName('head')[0], false ); - log('end script #1'); - </script> - <script src="scripts/include-2.js?pipe=trickle(d4)"></script> - <script type="text/javascript"> - var t = async_test() - - function test() { - // Per-spec, non-blocking/async scripts can execute at any time. - // Therefore, there are two possibilities for the script order here. - // 1. inline script first, followed by include-5 (async), then - // external script #1 (slow async) and finally external #2 - // (inline). - // 2. inline script, external '2, 'include 5', then include-1. - assert_array_equals(eventOrder.slice(0, 2), [ - 'inline script #1', 'end script #1' - ]); - if (eventOrder[2] == 'include-5 before removing scripts') { - assert_array_equals(eventOrder.slice(3), [ - 'include-5 after removing scripts', 'external script #1', - 'external script #2' - ]); - } else { - assert_array_equals(eventOrder.slice(2), ['external script #2', - 'include-5 before removing scripts', - 'include-5 after removing scripts', - 'external script #1' - ]); - } - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/051.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/051.html deleted file mode 100644 index a0b674304f2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/051.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: interaction of parsing and script execution - script added through DOM</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - testlib.addScript('', { src: 'scripts/count-script-tags.js' }, document.body, true); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'script tags in DOM: 5', 'inline script #2'], - ['inline script #1', 'end script #1', 'inline script #2', 'script tags in DOM: 6']]); - t.done(); - } - onload = function(){setTimeout(t.step_func(test), 100); } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/052.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/052.html deleted file mode 100644 index 21a151cb79c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/052.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: interaction of parsing and script execution - external script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/count-script-tags.js"></script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['script tags in DOM: 4', 'inline script #2']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 100); }) - </script> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/053.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/053.html deleted file mode 100644 index 810197437da..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/053.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding external script that removes itself from document when loading</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=testlib.addScript('', { src:'scripts/include-1.js', onload:function() {this.parentNode.removeChild(this);log('removed ' + this.localName);} }, document.getElementsByTagName('body')[0], true ); - log('end script #1'); - </script> - <script src="scripts/include-2.js"></script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'end script #1', 'external script #1', 'removed script', 'external script #2', 'inline script #2'], - ['inline script #1', 'end script #1', 'external script #2', 'external script #1', 'removed script', 'inline script #2'], - ['inline script #1', 'end script #1', 'external script #2', 'inline script #2', 'external script #1', 'removed script']] - ); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/054.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/054.html deleted file mode 100644 index 29ede23414e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/054.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: removing newly inserted script from DOMNodeInserted handler - external script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.addEventListener( 'DOMNodeInserted', function listener(e){ - log('DOMNodeInserted event'); - e.target.parentNode.removeChild(e.target); - document.removeEventListener('DOMNodeInserted', listener); - }, false ); - var script=testlib.addScript('', { src:'scripts/include-1.js?'+Math.random() }, document.getElementsByTagName('body')[0], true ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'DOMNodeInserted event', 'end script #1', 'inline script #2', 'external script #1'], - ['inline script #1', 'DOMNodeInserted event', 'end script #1', 'external script #1', 'inline script #2']]); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/055.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/055.html deleted file mode 100644 index c837d78174b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/055.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: removing newly inserted script from DOMNodeInserted handler - inline script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - document.addEventListener( 'DOMNodeInserted', function listener(e){ - log('DOMNodeInserted event'); - e.target.parentNode.removeChild(e.target); - document.removeEventListener('DOMNodeInserted', listener); - }, false ); - var script=testlib.addScript('log(\'added script\')', { }, document.getElementsByTagName('body')[0], true ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'added script', 'DOMNodeInserted event', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/056.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/056.html deleted file mode 100644 index e2d0868034e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/056.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: appending code to initially empty SCRIPT tag in DOM </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - script.appendChild( document.createTextNode('log("injected script code");') ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - // Test asserts the injected script should run - assert_array_equals(eventOrder, ['inline script #1', 'injected script code', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/057.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/057.html deleted file mode 100644 index 4dc8e1384e1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/057.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM (whitespace only) </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script> - </script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - script.appendChild( document.createTextNode('log("injected script code");') ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/058.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/058.html deleted file mode 100644 index 15deb785c2f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/058.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM (comment only) </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>/**/</script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - script.appendChild( document.createTextNode('log("injected script code");') ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/059.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/059.html deleted file mode 100644 index b3a34367b22..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/059.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM after removing its initial child </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>/**/</script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - script.removeChild(script.firstChild); - script.appendChild( document.createTextNode('log("injected script code");') ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/060.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/060.html deleted file mode 100644 index 905dfe233fa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/060.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM after setting textContent/innerHTML</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>log('HEAD script');</script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - script.innerHTML=''; - script.appendChild( document.createTextNode('log("injected script code 1");') ); - script.textContent=''; - script.appendChild( document.createTextNode('log("injected script code 2");') ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['HEAD script', 'inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/061.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/061.html deleted file mode 100644 index 9950b1c7ac7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/061.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: cloneNode and script execution</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>log('HEAD script');</script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - document.body.appendChild( script.cloneNode(true) ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['HEAD script', 'inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/062.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/062.html deleted file mode 100644 index c5e0ee2d466..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/062.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: cloneNode (shallow) and script execution</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>log('HEAD script');</script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - document.body.appendChild( script.cloneNode(false) ).appendChild(document.createTextNode('log("clone");')); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['HEAD script', 'inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/063.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/063.html deleted file mode 100644 index 6824074a8c1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/063.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: cloneNode (deep) of the currently executing script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>log('HEAD script'); - if( !window.already_cloned ){ - window.already_cloned=true; - var script=document.getElementsByTagName('script')[3]; - document.getElementsByTagName('head')[0].appendChild( script.cloneNode(true) ); - } - </script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['HEAD script', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/064.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/064.html deleted file mode 100644 index ceedc3da2d7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/064.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: cloneNode with external script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script src="scripts/include-1.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3]; - document.body.appendChild( script.cloneNode(true) ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['external script #1', 'inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/065.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/065.html deleted file mode 100644 index 5859dc9e0ba..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/065.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: cloneNode with external script, changed .src</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script src="scripts/include-1.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3].cloneNode(true); - script.src='scripts/include-2.js' - document.body.appendChild( script ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['external script #1', 'inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/066.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/066.html deleted file mode 100644 index a8e346dfd82..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/066.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: cloneNode with external script, removing .src and adding content</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script src="scripts/include-1.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=document.getElementsByTagName('script')[3].cloneNode(true); - script.removeAttribute('src'); - script.appendChild(document.createTextNode( 'log("cloned script");' )); - document.body.appendChild( script ); - log('end script #1'); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['external script #1', 'inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/067.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/067.html deleted file mode 100644 index 7be0fd0ab0d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/067.html +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: is a script with syntax error marked as "has run"? </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script>setup({allow_uncaught_exception:true}) - var t = async_test() - </script> - <script> - log(This script will never run.. - </script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>t.step(function() { - log('inline script #1'); - var script=document.getElementsByTagName('script')[3].cloneNode(true); - script.removeChild(script.firstChild); - script.appendChild(document.createTextNode( 'log("cloned script");' )); - document.body.appendChild( script ); - log('end script #1'); - }) - </script> - <script type="text/javascript"> - t.step(function() { - log( 'inline script #2' ); - }); - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']); - t.done(); - } - onload = t.step_func(test); -</script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/068.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/068.html deleted file mode 100644 index a58158b6c0a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/068.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: external script and parsing of markup added with document.write </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - log('inline script #1'); - document.write('<script src="scripts/find-foo.js">log(\'inline code in external script (not expected to run!!)\')<\/script>' + '<div id="foo"></div>'); - log('end script #1'); - - var t = async_test() - - - function test() { - if(!window.findFooLoaded) { - return setTimeout(t.step_func(test),200); - } - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'found #foo element: NO']); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/069.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/069.html deleted file mode 100644 index 4d4aed26587..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/069.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: external files added through DOM should not block further parsing while loading</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script> - testlib.addScript('',{src:'scripts/find-body.js?pipe=trickle(d1)'},document.getElementsByTagName('head')[0], true ); - </script> -</head> -<body> - <script> - testlib.addScript('', {src:'scripts/find-foo.js?pipe=trickle(d1)'}, document.getElementsByTagName('head')[0], true); - </script> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <p><span id="foo"></span></p> - - <script type="text/javascript"> - var t = async_test() - - function test() { - if(!(window.findFooLoaded && window.findBodyLoaded)) { - return setTimeout(t.step_func(test), 200); - } - assert_any(assert_array_equals, eventOrder, - [['document.body: <BODY>', 'found #foo element: YES'], - ['found #foo element: YES', 'document.body: <BODY>']]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/070.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/070.html deleted file mode 100644 index 4b82a9e83f9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/070.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write into IFRAME a script that adds a SCRIPT through DOM</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <iframe></iframe> - - <script type="text/javascript"> - var doc = document.getElementsByTagName('iframe')[0].contentDocument; - doc.open(); - - log("calling document.write"); - doc.write('<script>top.log("inline script #1");'+ - 'var s=document.createElement("script");'+ - 's.src="scripts/include-6.js?'+new Date().getTime()+'";'+ - 'document.getElementsByTagName("head")[0].appendChild(s);'+ - '<\/script>'+ - '<div id="foo"></div>'+ - '<script>top.log("inline script #2");<\/script>' - ); - - log("calling document.close"); - doc.close(); - - var t = async_test() - - - function test() { - if(!window.include6Loaded) { - return setTimeout(t.step_func(test),200); - } - assert_array_equals(eventOrder, ['calling document.write', 'inline script #1', 'inline script #2', 'calling document.close', 'external script (#foo found? YES)']); - t.done(); - } - - onload = t.step_func(test) - </script> -</head> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/071.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/071.html deleted file mode 100644 index 802c4a8ce36..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/071.html +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write several scripts into IFRAME </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <iframe style="width:1px;height:1px"></iframe> - - <script type="text/javascript"> - var doc = document.getElementsByTagName('iframe')[0].contentDocument; - doc.open(); - - var html = '<html><head><title>test</title></head>'+ - '<script>top.log("inline script #1");'+ - '<\/script>'+ - /* made url unique because Chrome will change - order depending on file cached status */ - '<script src="scripts/include-6.js?'+new Date().getTime()+'"><\/script>'+ - '</head>'+ - '<body>'+ - '<div id="foo"></div>'+ - '</body></html>'+ - '<script>top.log("inline script #2");<\/script>'; - log("calling document.write"); - doc.write(html); - - log("calling document.close"); - doc.close(); - - var t = async_test() - - - function test() { - if( !window.include6Loaded )return setTimeout(t.step_func(test),200); // try checking again if external script didn't run yet - assert_array_equals(eventOrder, ['calling document.write', - 'inline script #1', - 'calling document.close', - 'external script (#foo found? NO)', - 'inline script #2' - ]); - t.done(); - } - - onload = t.step_func(test) - </script> -</head> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/072.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/072.html deleted file mode 100644 index e502a357366..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/072.html +++ /dev/null @@ -1,50 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write into IFRAME a script that creates new inline script in parent </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <iframe style="width:1px;height:1px"></iframe> - - <script type="text/javascript"> - var doc = document.getElementsByTagName('iframe')[0].contentDocument; - doc.open(); - - var html = '<html><head><title>test</title></head>'+ - '<script>top.log("inline script #1");'+ - '<\/script>'+ - '</head>'+ - '<body>'+ - '<div id="foo"></div>'+ - '</body></html>'+ - '<script>top.testlib.addScript( \'log("inline script added to parent")\', null, top.document.body, true )<\/script>'; - log("calling document.write"); - doc.write(html); - - log("calling document.close"); - doc.close(); - - var t = async_test() - - - function test() { - assert_array_equals(eventOrder, ['calling document.write', - 'inline script #1', - 'inline script added to parent', - 'calling document.close', - ]); - t.done(); - } - - onload = t.step_func(test) - </script> -</head> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/073.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/073.html deleted file mode 100644 index 6f65c4ae195..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/073.html +++ /dev/null @@ -1,52 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write into IFRAME a script that creates new external script in parent </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <iframe style="width:1px;height:1px"></iframe> - - <script type="text/javascript"> - var doc = document.getElementsByTagName('iframe')[0].contentDocument; - doc.open(); - - var html = '<html><head><title>test</title></head>'+ - '<script>top.log("inline script #1");'+ - '<\/script>'+ - '</head>'+ - '<body>'+ - '<div id="foo"></div>'+ - '</body></html>'+ - '<script>top.testlib.addScript( \'\', { src:\'scripts/include-1.js\' }, top.document.body, true )<\/script>'; - log("calling document.write"); - doc.write(html); - - log("calling document.close"); - doc.close(); - - var t = async_test() - - - function test() { - - assert_array_equals(eventOrder, ['calling document.write', - 'inline script #1', - 'calling document.close', - 'external script #1' - ]); - - t.done(); - } - - onload = t.step_func(test) - </script> -</head> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/074.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/074.html deleted file mode 100644 index 70d7b88b748..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/074.html +++ /dev/null @@ -1,49 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: document.write into IFRAME a script that creates new inline script in parent that again adds script to IFRAME </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <iframe style="width:1px;height:1px"></iframe> - - <script type="text/javascript"> - var doc = document.getElementsByTagName('iframe')[0].contentDocument; - doc.open(); - var str1=''; - var html = '<html><head><title>test</title></head>'+ - '<script>top.log("inline script #1");'+ - '<\/script>'+ - '</head>'+ - '<body>'+ - '<script>top.testlib.addScript( \'top.log("inline script added to parent");top.doc.write( "<script>top.log(\\\\"inline script added to iframe\\\\")<\\\/script>");\', null, top.document.body, true ) <\/script>'+ - '</body></html>'; - log("calling document.write"); - doc.write(html); - - log("calling document.close"); - doc.close(); - - var t = async_test() - - - function test() { - assert_array_equals(eventOrder, ['calling document.write', - 'inline script #1', - 'inline script added to parent', - 'inline script added to iframe', - 'calling document.close', - ]); - t.done(); - } - - onload = t.step_func(test) - </script> -</head> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/075.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/075.html deleted file mode 100644 index 40ec9bbb6a5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/075.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>dispatchEvent from child frame during document.write :-o </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - </head> - <body onclick="log('click event')"> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <iframe></iframe> - <script> - var doc = document.getElementsByTagName("iframe")[0].contentDocument; - doc.open("text/html"); - doc.write('<html><head><title>event dispatcher</title></head><body>Before script<script>top.log("inline script before event");var ev = parent.document.createEvent("MouseEvents");ev.initMouseEvent("click", true, false, null, 0, 0, 0, 0, 0, false, false, false, false, 0, null);parent.document.body.dispatchEvent(ev);top.log("inline script after event");</sc'+'ript> After script</body>'); - log( 'end main script' ); - - - </script> - -<script> - var t = async_test() - - function test() { - if(test.ran)return; test.ran=true; - - assert_array_equals(eventOrder, ['inline script before event', - 'click event', - 'inline script after event', - 'end main script' - ]); - doc.close(); - t.done(); -} - - onload = t.step_func(test) - /* onload doesn't fire in this test, a fallback.. */ - setTimeout(t.step_func(test), 800 ); -</script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/076.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/076.html deleted file mode 100644 index 2b8b692d926..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/076.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding and removing external and inline scripts </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script>log('inline script #1'); - var script=testlib.addScript('', {src:'scripts/include-1.js', onload:function(e){ e.target.parentNode.removeChild(e.target); }}, document.getElementsByTagName('head')[0], false ); - var script=testlib.addScript( 'log( "dynamically added inline script" )', null, document.getElementsByTagName('head')[0], false ); - script.parentNode.removeChild(script); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - } - onload = t.step_func(function() { - assert_any(assert_array_equals, eventOrder, [['inline script #1', 'dynamically added inline script', 'end script #1', 'external script #1', 'inline script #2'], - ['inline script #1', 'dynamically added inline script', 'end script #1', 'inline script #2', 'external script #1']]); - t.done(); - }) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/077.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/077.html deleted file mode 100644 index dbcd16bea50..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/077.html +++ /dev/null @@ -1,41 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title> adding several types of scripts through the DOM and removing some of them confuses scheduler </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script type="text/javascript"> - var head = document.getElementsByTagName('head')[0]; - function createScript(url, contents) { - props = {}; - if (url) { - props.src = url; - } - return testlib.addScript(contents, props, head, false); - } - var t = async_test() - - function test() { - var script = createScript('data:text\/javascript,log("Script %231 ran")'); - var script2 = createScript('','log("Script #2 ran")'); - if(script2) { - head.removeChild(script2); - } - var script3 = createScript('data:text\/javascript, log("Script %233 ran"); createScript(\'\', \'log("Script %234 ran")\')'); - if(script3) { - head.removeChild(script3); - } - setTimeout(t.step_func(function(){ - assert_array_equals(eventOrder, ['Script #2 ran', 'Script #1 ran', 'Script #3 ran','Script #4 ran']); - t.done(); - }), 400); - - }; - onload = t.step_func(test) - </script> - </head> - <body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - </body> -</html*> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/078.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/078.html deleted file mode 100644 index da4db4a2e62..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/078.html +++ /dev/null @@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title> adding several types of scripts through the DOM and removing some of them confuses scheduler (slow-loading scripts) </title> -<meta name="timeout" content="long"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="testlib/testlib.js"></script> -<script type="text/javascript"> - setup({ explicit_done: true }); - var head = document.getElementsByTagName('head')[0]; - function createScript(url, contents) { - props = {}; - if (url) { - props.src = url; - } - return testlib.addScript(contents, props, head, false); - } - var t = async_test() - - function test() { - document.getElementById("log").textContent = "Please wait..." - var url = 'scripts/include-1.js?pipe=trickle(d1)'; - var script = createScript(url); - var script2 = createScript('', 'log("Script #2 ran")'); - head.removeChild(script2); - var url = 'scripts/include-2.js?pipe=trickle(d2)'; - var script3 = createScript(url); - head.removeChild(script3); - - setTimeout(t.step_func(function () { - done(); - assert_array_equals(eventOrder, ['Script #2 ran', 'external script #1', 'external script #2']); - t.done(); - }), 5500); - - }; - onload = t.step_func(test) -</script> -</head> -<body> -<div id="log">FAILED (This TC requires JavaScript enabled)</div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/079.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/079.html deleted file mode 100644 index 8d684cebf2b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/079.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title> setting location to javascript URL from event handler </title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="testlib/testlib.js"></script> -<script type="text/javascript"> -log('inline script #1'); -var t = async_test() - -onload = t.step_func(function() { - log('onload handler'); - document.getElementById("log").textContent = 'please wait...'; - window.location='javascript:log("javascript: URL")'; - setTimeout(t.step_func(function(){ - log('timeout'); - assert_array_equals(eventOrder, ['inline script #1', 'onload handler', 'onload ends', 'javascript: URL', 'timeout']); - t.done(); - }), 200); - log('onload ends'); -}); -</script> -</head> -<body> -<div id="log">FAILED (This TC requires JavaScript enabled)</div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/081.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/081.html deleted file mode 100644 index 1b9bc991c69..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/081.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: slow loading external script added with DOM (appendChild)</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script> - var t = async_test() - log('inline script #1'); - testlib.addScript('', { src:'scripts/include-1.js?pipe=trickle(d1)&'+Math.random() }, document.getElementsByTagName('head')[0], false ); - log('end script #1'); - </script> - <script src="scripts/include-2.js"></script> - <script> - log( 'inline script #2' ); - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'external script #2', 'inline script #2', 'external script #1']); - t.done(); - } - onload = t.step_func(function() { - setTimeout(t.step_func(test), 12); - }); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/082.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/082.html deleted file mode 100644 index 3e88fc73d40..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/082.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: multiple slow loading external scripts added with DOM (appendChild)</title> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script> - - log('inline script #1'); - function scriptLoadListener(){ - log( 'load on '+this.src.match( /include-\d\.js/ ) ); - } - var script=testlib.addScript('', { src:'scripts/include-1.js?pipe=trickle(d1)&' + Math.random(), onload:scriptLoadListener }, document.getElementsByTagName('head')[0], false ); - var script=testlib.addScript('', { src:'scripts/include-2.js?pipe=trickle(d3)&' + Math.random(), onload:scriptLoadListener }, document.getElementsByTagName('head')[0], false ); - var script=testlib.addScript('', { src:'scripts/include-7.js?pipe=trickle(d2)&' + Math.random() , onload:scriptLoadListener }, document.getElementsByTagName('head')[0], false ); - log('end script #1'); - </script> - <script type="text/javascript"> - log('inline script #2'); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2', 'external script #1', 'load on include-1.js', 'external script #7', 'load on include-7.js', 'external script #2', 'load on include-2.js']); - t.done(); - } - onload = function() {setTimeout(t.step_func(test), 12)}; - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/083.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/083.html deleted file mode 100644 index 2ac0015c8b7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/083.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: event listener defined by script in a document in history</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <iframe src="about:blank"></iframe> - <script> - log('inline script #1'); - function fireFooEvent(){ - var evt=document.createEvent('Event'); - evt.initEvent('foo', true, true); - document.dispatchEvent(evt); - } - var doc = frames[0].document; - doc.open('text/html'); - doc.write('<script>top.log("IFRAME script");top.document.addEventListener("foo", function(e){ top.log("event: "+e.type); }, false)<\/script>'); - log('end script #1'); - </script> - <script> - fireFooEvent(); - frames[0].location='about:blank'; // returning to about:blank should de-activate document that defined event listener..? - </script> - <script> - fireFooEvent(); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_equals(frames[0].location.toString(), "about:blank"); - assert_array_equals(eventOrder, ['inline script #1', - 'IFRAME script', - 'end script #1', - 'event: foo', - 'inline script #2' - ]); - t.done(); - } - onload = function() {setTimeout(t.step_func(function() {fireFooEvent(); test()}), 80)}; - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/084.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/084.html deleted file mode 100644 index 3027fa19944..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/084.html +++ /dev/null @@ -1,47 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: event listener defined by script in a removed IFRAME</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <iframe src="about:blank"></iframe> - <script> - log('inline script #1'); - function fireFooEvent(){ - var evt=document.createEvent('Event'); - evt.initEvent('foo', true, true); - document.dispatchEvent(evt); - } - var doc=frames[0].document; - doc.open( 'text/html' ); - doc.write( '<script>top.log("IFRAME script");top.document.addEventListener("foo", function(e){ top.log("event: "+e.type); }, false)<\/script>' ); - log('end script #1'); - </script> - <script> - fireFooEvent(); - frames[0].frameElement.parentNode.removeChild( frames[0].frameElement ); // removing the IFRAME should de-activate document that defined event listener..? - </script> - <script> - fireFooEvent(); - </script> - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', - 'IFRAME script', - 'end script #1', - 'event: foo', - 'inline script #2' - ]); - t.done(); - } - onload = t.step_func(test) - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/085.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/085.html deleted file mode 100644 index 6577527a8e5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/085.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: async script and slow-loading defer script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/include-1.js?pipe=trickle(d1)" defer></script> - <script src="scripts/include-2.js" async></script> - - <script type="text/javascript"> - var t = async_test(); - function test() { - assert_array_equals(eventOrder, ['external script #2', 'external script #1']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/086.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/086.html deleted file mode 100644 index 4ccd16de894..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/086.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: async script and slow-loading async script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/include-1.js?pipe=trickle(d2)" async></script> - <script src="scripts/include-2.js" async></script> - - <script type="text/javascript"> - var t = async_test(); - function test() { - assert_array_equals(eventOrder, ['external script #2', 'external script #1']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/087.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/087.html deleted file mode 100644 index 8e225f48ae1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/087.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: multiple defer scripts, one slow loading</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/include-1.js?pipe=trickle(d2)" defer></script> - <script src="scripts/include-2.js" defer></script> - - <script type="text/javascript"> - var t = async_test(); - function test() { - assert_array_equals(eventOrder, ['external script #1', 'external script #2']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/088.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/088.html deleted file mode 100644 index f41f3d5be2b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/088.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: multiple scripts with defer and async attributes</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script src="scripts/include-1.js?pipe=trickle(d2)" defer async></script> - <script src="scripts/include-2.js" defer async></script> - - <script type="text/javascript"> - var t = async_test(); - function test() { - assert_array_equals(eventOrder, ['external script #2', 'external script #1']); - t.done(); - } - onload = t.step_func(test); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/089.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/089.html deleted file mode 100644 index 9ed5e0e1da1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/089.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: async attribute on inline script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script async> - var t = async_test(); - log('inline script #1'); - t.step(function() { - assert_array_equals(eventOrder, ['inline script #1']); - }); - </script> - <script async> - log('inline script #2'); - t.step(function() { - assert_array_equals(eventOrder, ['inline script #1', 'inline script #2']); - }); - </script> - - <script> - log('inline script #3'); - t.step(function() { - assert_array_equals(eventOrder, ['inline script #1', 'inline script #2', 'inline script #3']); - }); - onload = function() {t.done()}; - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/090.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/090.html deleted file mode 100644 index 17d1d1effe3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/090.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: defer attribute on inline script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script defer> - var t = async_test(); - log('inline script #1'); - t.step(function() { - assert_array_equals(eventOrder, ['inline script #1']); - }); - </script> - <script defer> - log('inline script #2'); - t.step(function() { - assert_array_equals(eventOrder, ['inline script #1', 'inline script #2']); - }); - </script> - - <script> - log('inline script #3'); - t.step(function() { - assert_array_equals(eventOrder, ['inline script #1', 'inline script #2', 'inline script #3']); - }); - onload = function() {t.done()}; - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/091.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/091.html deleted file mode 100644 index f706cd31f52..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/091.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: force-async off on non-parser-inserted script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - var t = async_test(); - - sources = ["scripts/include-1.js?pipe=trickle(d2)", "scripts/include-2.js?pipe=trickle(d1)"]; - sources.forEach(function(x) { - var script = document.createElement("script"); - script.src = x; - t.step(function() {assert_equals(script.async, true, "async IDL attribute on script creation")}); - script.async = false; - t.step(function() {assert_equals(script.async, false, "async IDL attribute after setting")}); - t.step(function() {assert_equals(script.getAttribute("async"), null, "async content attribute after setting")}); - document.head.appendChild(script); - }); - - onload = t.step_func(function() { - assert_array_equals(eventOrder, ['external script #1', 'external script #2']); - t.done(); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/092.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/092.html deleted file mode 100644 index 40fda5a0c0d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/092.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: defer script and slow-loading non-async external script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - var t = async_test(); - - var script = document.createElement("script"); - script.src = "scripts/include-2.js?pipe=trickle(d2)"; - script.async = false; - document.head.appendChild(script); - - onload = t.step_func(function() { - assert_array_equals(eventOrder, ['external script #1', 'external script #2']); - t.done(); - }); - </script> - <script defer src="scripts/include-1.js"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/094.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/094.html deleted file mode 100644 index cc9d1bf0fbe..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/094.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: parser-created defer script after document load</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <iframe id="myFrame"></iframe> - - <script> - var t = async_test(); - onload = t.step_func(function() { - var doc = document.getElementById("myFrame").contentDocument; - var win = document.getElementById("myFrame").contentWindow; - doc.open(); - doc.write("<title> scheduler: parser-created defer script after document load</title><script src='/resources/testharness.js'><\/script><script src='/resources/testharnessreport.js'><\/script><script src='testlib/testlib.js'><\/script><script>var t=async_test()<\/script><div id=log></div><script defer src='data:text/javascript,parent.t.done();'><\/script>"); - doc.close(); - }) - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/095.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/095.html deleted file mode 100644 index 5e3b388cf1e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/095.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: slow-loading script added from defer blocking load event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - var t = async_test(); - function test() { - t.step(function() { - assert_array_equals(eventOrder, ['external script #8', 'external script #9']); - t.done(); - }); - } - //assert that the test is completed before onload fires - onload = t.step_func(function() {assert_unreached()}); - </script> - <script defer src="scripts/include-8.js"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/096.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/096.html deleted file mode 100644 index a2e15b782a5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/096.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: defer script added from document.write relative to DOMContentLoaded</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - log("inline script #1"); - document.write("<script defer src='scripts/include-1.js'><\/script>") - </script> - <script> - log("inline script #2"); - var t = async_test(); - - addEventListener("DOMContentLoaded", t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1"]); - log("inline script #3"); - }), false); - - onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1", "inline script #3"]); - t.done(); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/097.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/097.html deleted file mode 100644 index a31d49e5b09..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/097.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: slow-loading async script added from document.write</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - log("inline script #1"); - document.write("<script async src='scripts/include-1.js?pipe=trickle(d2)'><\/script>") - </script> - <script> - log("inline script #2"); - var t = async_test(); - - addEventListener("DOMContentLoaded", t.step_func(function() {assert_array_equals(eventOrder, ["inline script #1", "inline script #2"])}), false); - - onload = t.step_func( - function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "external script #1"]); - t.done(); - }); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/099.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/099.html deleted file mode 100644 index 987fcc7c711..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/099.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: defer adding iframe containing script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script defer src="scripts/include-11.js"></script> - <script> - var t = async_test(); - - onload = t.step_func(function() {assert_array_equals(eventOrder, ["external script before adding iframe", "script in iframe"]); t.done();}); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/101.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/101.html deleted file mode 100644 index b868f9a4470..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/101.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: defer script after initial onload event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <iframe id="myFrame"></iframe> - - <script> - var t = async_test(); - onload = t.step_func( - function() { - var doc = document.getElementById("myFrame").contentDocument; - var win = document.getElementById("myFrame").contentWindow; - doc.open(); - doc.write("<title> scheduler: defer script after initial onload event</title><script src='testlib/testlib.js'><\/script><div id='log'>document.written content</div><script>log('inline script #1');<\/script><script src='scripts/include-1.js'><\/script><script defer src='scripts/include-2.js'><\/script>"); - doc.close(); - //Note that the *window* object has changed but the *global scope* of the script has not. - var run_t = window.t.step_func(function() { - if (!win.eventOrder || win.eventOrder.length != 3) { - window.setTimeout(run_t, 100); - return; - } - window.assert_array_equals(win.eventOrder, ['inline script #1', 'external script #1', 'external script #2']); - window.t.done(); - }); - run_t(); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/102.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/102.html deleted file mode 100644 index 439023833f4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/102.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: defer script after initial onload event</title> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - onload = function() { - document.open(); - document.write("<title> scheduler: defer script after initial onload event</title><script src='/resources/testharness.js'><\/script><script src='/resources/testharnessreport.js'><\/script><script src='testlib/testlib.js'><\/script><div id='log'>document.written content</div><script>var t = async_test(); log('inline script #1')<\/script><script src='scripts/include-1.js'><\/script><script async src='scripts/include-2.js'><\/script>"); - document.close(); - window.setTimeout(function() { - window.t.step(function() { - window.assert_any(window.assert_array_equals, window.eventOrder, - [['inline script #1', 'external script #1', 'external script #2'], - ['inline script #1', 'external script #2', 'external script #1']]); - window.t.done(); - })}, - 1000); - }; - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/103.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/103.html deleted file mode 100644 index f619472a4f1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/103.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: removing defer attribute at runtime</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="defer-script" defer src="scripts/include-2.js"></script> - <script src="scripts/include-1.js"></script> - - <script> - var t = async_test(); - - t.step(function() { - document.getElementById("defer-script").removeAttribute("defer"); - }); - - var ran_defer_check = false; - - document.addEventListener("readystatechange", t.step_func(function () { - if (document.readyState == "interactive") { - ran_defer_check = true; - assert_array_equals(eventOrder, ["external script #1"]); - } - }), false); - - addEventListener("load", t.step_func(function () { - assert_true(ran_defer_check); - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); - }), false); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/104.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/104.html deleted file mode 100644 index 95a5a222378..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/104.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding defer attribute at runtime</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="defer-script" src="scripts/include-1.js"></script> - <script src="scripts/include-2.js"></script> - - <script> - var t = async_test(); - - t.step(function() { - document.getElementById("defer-script").setAttribute("defer", "defer"); - }); - - var ran_defer_check = false; - - document.addEventListener("readystatechange", t.step_func(function () { - if (document.readyState == "interactive") { - ran_defer_check = true; - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - } - }), false); - - addEventListener("load", t.step_func(function () { - assert_true(ran_defer_check); - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); - }), false); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/105.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/105.html deleted file mode 100644 index 19be9e1d03c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/105.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: adding async attribute at runtime</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - var t = async_test(); - - var sources = ["scripts/include-1.js?pipe=trickle(d2)", - "scripts/include-2.js"] - var scripts = sources.map(function(x) { - var script = document.createElement("script"); - script.src = x; - script.async = false; - document.body.appendChild(script); - return script; - }); - scripts[0].async = true; - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); - }), false); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-import.html deleted file mode 100644 index 451e218ef74..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-import.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking defer scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script defer src="scripts/check-style-sheet.js"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-noimport.html deleted file mode 100644 index 704b880bcfb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-noimport.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking defer scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script defer src="scripts/check-style-sheet.js"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-import.html deleted file mode 100644 index 4fe526a2744..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-import.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking external parser-blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script src="scripts/check-style-sheet.js"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-module-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-module-import.html deleted file mode 100644 index ea873746e0c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-module-import.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking external module scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script src="scripts/check-style-sheet.js" type="module"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-module-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-module-noimport.html deleted file mode 100644 index 71c59fb4d60..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-module-noimport.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking external module scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script src="scripts/check-style-sheet.js" type="module"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-noimport.html deleted file mode 100644 index 3694481b86a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-external-noimport.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking external parser-blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script src="scripts/check-style-sheet.js"></script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-import-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-import-xhtml.xhtml deleted file mode 100644 index 3b2e8b52967..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-import-xhtml.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Stylesheet in XHTML HEAD with @import blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)" /> -</head> -<body> - <div id="test">Test</div> - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-import.html deleted file mode 100644 index b8afeda1357..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-import.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-module-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-module-import.html deleted file mode 100644 index d3f02ffd19c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-module-import.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking module scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script type="module"> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-module-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-module-noimport.html deleted file mode 100644 index 83cd29f2674..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-module-noimport.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking module scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script type="module"> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-noimport-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-noimport-xhtml.xhtml deleted file mode 100644 index 1cae3c99653..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-noimport-xhtml.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Stylesheet in XHTML HEAD blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)" /> -</head> -<body> - <div id="test">Test</div> - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-noimport.html deleted file mode 100644 index bd8ec8633e4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-noimport.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/107-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/107-import.html deleted file mode 100644 index 0b572b07243..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/107-import.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking scripts document.write</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <!-- this stylesheet blocks scripts --> - <script> - test(function() { - document.write("<link rel='stylesheet' href='css/import.css?pipe=trickle(d2)'>"); - // note that the pass condition here is not per spec (but does match implementations) as of 2012-06-26 - assert_equals(getComputedStyle(document.getElementById("test")).position, - "static"); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/107-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/107-noimport.html deleted file mode 100644 index ce57d1f1c52..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/107-noimport.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: stylesheets blocking scripts document.write</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - - <!-- this stylesheet blocks scripts --> - <script> - test(function() { - document.write("<link rel='stylesheet' href='css/background.css?pipe=trickle(d2)'>"); - // note that the pass condition here is not per spec (but does match implementations) as of 2012-06-26 - assert_equals(getComputedStyle(document.getElementById("test")).position, - "static"); - }); - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/108.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/108.html deleted file mode 100644 index 79be9721d22..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/108.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: javascript URL in iframe</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">Not tested</div> - <script> - var t = async_test(); - var iframe_onload = false; - - t.step(function() { - log('inline script #1'); - document.write("<iframe src='javascript:void(top.log("iframe script #1"));'></iframe>"); - log('inline script #2') - }) - - onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "iframe script #1"]); - t.done(); - }); - </script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/109.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/109.html deleted file mode 100644 index d103ffcbd75..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/109.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: javascript URL in iframe, src set via DOM</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">Not tested</div> - <script> - var t = async_test(); - - t.step(function() { - var iframe_onload = false; - log("inline script #1"); - var iframe = document.createElement("iframe"); - iframe.src = "javascript:void(top.log('JS URL'));"; - log("inline script #2"); - iframe.onload = function () { log("iframe onload") }; - document.body.appendChild(iframe); - log("inline script #3"); - }) - - onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3", "JS URL", "iframe onload"]); - t.done(); - }); - </script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/110.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/110.html deleted file mode 100644 index 5affb9ed231..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/110.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: removing defer script at runtime</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="defer-script" defer src="scripts/include-2.js"></script> - <script src="scripts/include-1.js"></script> - - <script> - var t = async_test(); - - t.step(function() { - var s = document.getElementById("defer-script"); - s.parentNode.removeChild(s); - }); - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); - }), false); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/111.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/111.html deleted file mode 100644 index c932a7b95c2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/111.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: removing async attribute at runtime</title> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="async-script" async src="scripts/include-2.js?pipe=trickle(d3)"></script> - - <script> - var t = async_test(); - - t.step(function() { - document.getElementById("async-script").removeAttribute("async"); - var s = document.createElement("script"); - s.async = false; - s.src = "scripts/include-1.js"; - document.body.appendChild(s); - }); - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); - }), false); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/112.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/112.html deleted file mode 100644 index a0cc647e0d0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/112.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: removing async attribute at runtime, script also has defer attribute</title> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="async-script" async defer src="scripts/include-1.js?pipe=trickle(d3)"></script> - - <script> - var t = async_test(); - document.getElementById("async-script").removeAttribute("async"); - - addEventListener("DOMContentLoaded", t.step_func(function () { - assert_array_equals(eventOrder, []); - }), false); - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1"]); - t.done(); - }), false); - - </script> -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/113.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/113.html deleted file mode 100644 index 32740be37e1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/113.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: Altering DOM using innerHTML during parse </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script> - var t = async_test(); - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2"]); - t.done(); - }), false); - - </script> - <div id="container"> - <script>t.step(function() { - log("inline script #1"); - document.getElementById("container").innerHTML = ""; - }); - </script> - <script>t.step(function() {log("inline script #2")});</script> - </div> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/114.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/114.html deleted file mode 100644 index ce3733208b3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/114.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: Changing src of defer script before it runs </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="defer-script" defer src="scripts/include-1.js"></script> - - <script> - var t = async_test(); - - document.getElementById("defer-script").src = "scripts/include-2.js" - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1"]); - t.done(); - }), false); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/115.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/115.html deleted file mode 100644 index 6234e02020c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/115.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> scheduler: Removing src of defer script before it runs </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="test"></div> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - - <script id="defer-script" defer src="scripts/include-1.js">t.step(function() {assert_unreached()})</script> - - <script> - var t = async_test(); - - document.getElementById("defer-script").removeAttribute("src"); - - addEventListener("load", t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1"]); - t.done(); - }), false); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/116.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/116.html deleted file mode 100644 index 62da3988685..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/116.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: adding script to head of frameset document</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> - <script> - // add a script that looks for document.body as first child of HEAD - testlib.addScript('',{src:'scripts/find-body.js'},document.getElementsByTagName('head')[0], true ); - var div = document.createElement("div"); - div.id = "log"; - var t = async_test(); - function test() { - if(!(window.findBodyLoaded)) { - return setTimeout(t.step_func(test),200); - } - document.body.appendChild(div); - assert_array_equals(eventOrder, ['document.body: <FRAMESET>']); - t.done(); - } - onload = t.step_func(test) - </script> -</head> -<frameset> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/117.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/117.html deleted file mode 100644 index 46a9900c94d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/117.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: inline script created with createContextualFragment</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> - <div id="log"></div> - <script> - log('inline script #1'); - var t = async_test(); - - t.step(function() { - var range = document.createRange(); - var fragment = range.createContextualFragment("<script>log('fragment script #1')<\/script>"); - document.body.appendChild(fragment.firstChild); - }); - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'fragment script #1', 'end inline script #1']); - t.done(); - } - onload = t.step_func(test) - log('end inline script #1'); - </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/118.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/118.html deleted file mode 100644 index e002ea96011..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/118.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: external script created with createContextualFragment</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> - <div id="log"></div> - <script> - log('inline script #1'); - var t = async_test(); - - t.step(function() { - var range = document.createRange(); - var fragment = range.createContextualFragment("<script src='scripts/include-1.js'><\/script>"); - document.body.appendChild(fragment.firstChild); - }); - - addEventListener("load", t.step_func(function() { - assert_array_equals(eventOrder, ['inline script #1', 'end inline script #1', 'external script #1']); - t.done(); - }), false); - - log('end inline script #1'); - </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/119.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/119.html deleted file mode 100644 index d1ed8230934..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/119.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: external defer script created with createContextualFragment</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log"></div> - <script> - log('inline script #1'); - var t = async_test(); - - t.step(function () { - var range = document.createRange(); - var fragment = range.createContextualFragment("<script defer src='scripts/include-1.js?pipe=trickle(d1)'><\/script>"); - document.body.appendChild(fragment.firstChild); - }); - - addEventListener("DOMContentLoaded", t.step_func(function () { - assert_array_equals(eventOrder, ['inline script #1', 'end inline script #1']); - })); - - addEventListener("load", t.step_func_done(function () { - assert_array_equals(eventOrder, ['inline script #1', 'end inline script #1', 'external script #1']); - })); - - log('end inline script #1'); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/120.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/120.html deleted file mode 100644 index 2cfe5221ddb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/120.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: script created without a window </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); - - var doc = document.implementation.createHTMLDocument(""); - doc.write("<script>t.step(function() {assert_unreached()})<\/script>"); - - document.body.appendChild(doc.head.firstChild); - - onload = function() {t.done()} -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/121.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/121.html deleted file mode 100644 index d6de27025fc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/121.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: altering the type attribute </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test" type="text/plain">t.step(function() {assert_unreached()}</script> -<script> -t.step(function() { - document.getElementById("test").removeAttribute("type"); - setTimeout(t.step_func(function() {t.done()}), 100); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html deleted file mode 100644 index a8994c6aebb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/122.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: altering the type attribute and adding/removing external script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test" type="text/plain" src="scripts/include-1.js?pipe=trickle(d1)"></script> -<script> -t.step(function() { - var script = document.getElementById("test"); - script.removeAttribute("type"); - var marker = document.createElement("script"); - marker.src = "scripts/include-2.js?pipe=trickle(d2)"; - marker.async = false; - script.parentNode.appendChild(marker); - script.parentNode.appendChild(script); - test(function() {assert_true(script.async)}, "Reinserted script async IDL attribute"); -}); -onload = t.step_func(function () { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/123.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/123.html deleted file mode 100644 index dc145eb550b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/123.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: altering the type attribute and adding/removing external script with async=false </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test" type="text/plain" src="scripts/include-2.js?pipe=trickle(d1)"></script> -<script> -t.step(function() { - var script = document.getElementById("test"); - script.removeAttribute("type"); - script.async = false; - var marker = document.createElement("script"); - marker.src = "scripts/include-1.js?pipe=trickle(d2)"; - marker.async = false; - script.parentNode.appendChild(marker); - script.parentNode.appendChild(script); -}); -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/124.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/124.html deleted file mode 100644 index 5c7208dfde5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/124.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: altering the type attribute and changing script data inline script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test" type="text/plain">t.step(function() {log("inline script #1")});</script> -<script> -t.step(function() { - log("inline script #2"); - var script = document.getElementById("test"); - script.removeAttribute("type"); - script.appendChild(document.createTextNode("")); - log("end inline script #2"); -}); -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #2", "inline script #1", "end inline script #2"]); - t.done(); -}) -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/125.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/125.html deleted file mode 100644 index 5074f2a107b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/125.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: altering the type attribute and changing script data external script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test" type="text/plain" src="scripts/include-1.js?pipe=trickle(d1)"></script> -<script> -t.step(function() { - var script = document.getElementById("test"); - script.removeAttribute("type"); - var marker = document.createElement("script"); - marker.src = "scripts/include-2.js?pipe=trickle(d2)"; - marker.async = false; - script.parentNode.appendChild(marker); - script.appendChild(document.createTextNode("")); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/126.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/126.html deleted file mode 100644 index 1b2bb176348..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/126.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: altering the type attribute and changing script data external script async=false </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test" type="text/plain" src="scripts/include-2.js"></script> -<script> -t.step(function() { - var script = document.getElementById("test"); - script.removeAttribute("type"); - script.async = false; - var marker = document.createElement("script"); - marker.src = "scripts/include-1.js?pipe=trickle(d2)"; - marker.async = false; - script.parentNode.appendChild(marker); - script.appendChild(document.createTextNode("")); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/127.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/127.html deleted file mode 100644 index 149078a327e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/127.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: appending non-text children to script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test"></script> -<script> -t.step(function() { - log("inline script #1"); - var script = document.getElementById("test"); - - var frag = document.createDocumentFragment(); - var div = document.createElement("div"); - - div.textContent = "assert_unreached();" - frag.appendChild(document.createTextNode("t.step(function() {log('inline script #2');\n")); - frag.appendChild(div); - frag.appendChild(document.createTextNode("log('end inline script #2');})")); - - script.appendChild(frag); - log("end inline script #1"); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "end inline script #2", "end inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/128.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/128.html deleted file mode 100644 index 39ec24f6816..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/128.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: appending script element to script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test"></script> -<script> -t.step(function() { - log("inline script #1"); - var script = document.getElementById("test"); - - var frag = document.createDocumentFragment(); - var inner_script = document.createElement("script"); - - inner_script.textContent = "t.step(function() {log('inline script #3');});" - frag.appendChild(document.createTextNode("t.step(function() {log('inline script #2');\n")); - frag.appendChild(inner_script); - frag.appendChild(document.createTextNode("log('end inline script #2');})")); - - script.appendChild(frag); - log("end inline script #1"); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #3", "inline script #2", "end inline script #2", "end inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/129.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/129.html deleted file mode 100644 index 8c12735677b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/129.html +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: appending multiple script elements</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<div id="container"></div> -<script> -t.step(function() { - log("inline script #1"); - - var frag = document.createDocumentFragment(); - - scripts = ["2", "3", "4"].map(function(x) { - var s = document.createElement("script"); - s.textContent = "t.step(function() {log('inline script #" + x + "')});"; - return s - }); - - - frag.appendChild(scripts[0]); - var div = document.createElement(div); - div.appendChild(scripts[1]); - frag.appendChild(div); - frag.appendChild(scripts[2]); - - document.getElementById("container").appendChild(frag); - log("end inline script #1"); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3", "inline script #4", "end inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/130.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/130.html deleted file mode 100644 index c6643d9fdf0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/130.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: appending external script element to script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<script id="test"></script> -<script> -t.step(function() { - log("inline script #1"); - var script = document.getElementById("test"); - - var frag = document.createDocumentFragment(); - var inner_script = document.createElement("script"); - - inner_script.src = "scripts/include-1.js?pipe=trickle(d1)"; - frag.appendChild(document.createTextNode("t.step(function() {log('inline script #2');\n")); - frag.appendChild(inner_script); - frag.appendChild(document.createTextNode("log('end inline script #2');})")); - - script.appendChild(frag); - log("end inline script #1"); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "end inline script #2", "end inline script #1", "external script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/131.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/131.html deleted file mode 100644 index 541483ed6bd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/131.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: inline svg script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); - log("inline script #1") -</script> -<svg> -<script>log("inline script #2")</script> -</svg> -<script> -log("inline script #3"); -t.step(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/132.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/132.html deleted file mode 100644 index 3edb9595941..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/132.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: external svg script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); - log("inline script #1") -</script> -<svg> -<script xlink:href="scripts/include-1.js"></script> -</svg> -<script> -log("inline script #2"); -t.step(function() { - assert_array_equals(eventOrder, ["inline script #1", "external script #1", "inline script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/133.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/133.html deleted file mode 100644 index e6b327f7094..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/133.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: inline HTML script added by SVG script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); - log("inline script #1") -</script> -<svg> -<script> -log("inline script #2") -var s = document.createElement("script"); -s.textContent = "log('inline script #3');"; -document.getElementsByTagName("svg")[0].appendChild(s); -log("end inline script #2"); -</script> -</svg> -<script> -log("inline script #4"); -t.step(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3", - "end inline script #2", "inline script #4"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/134.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/134.html deleted file mode 100644 index bb2ad4f66b4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/134.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: external HTML script added by SVG script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); - log("inline script #1") -</script> -<svg> -<script> -log("inline script #2") -var s = document.createElement("script"); -s.src = "scripts/include-1.js" -document.getElementsByTagName("svg")[0].appendChild(s); -log("end inline script #2"); -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", - "end inline script #2", "external script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/135.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/135.html deleted file mode 100644 index dd8b8952184..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/135.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: external SVG script added by SVG script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); - log("inline script #1") -</script> -<svg> -<script> -log("inline script #2") -var s = document.createElementNS("http://www.w3.org/2000/svg", "script"); -s.setAttributeNS("http://www.w3.org/1999/xlink", "href", "scripts/include-1.js"); -document.getElementsByTagName("svg")[0].appendChild(s); -log("end inline script #2"); -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", - "end inline script #2", "external script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/136.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/136.html deleted file mode 100644 index b08a8b97989..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/136.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: DOM added external SVG script, force-async? </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script> - -var s1 = document.createElement("script"); -s1.src = "scripts/include-1.js"; -s1.async = false; - -var s = document.createElementNS("http://www.w3.org/2000/svg", "script"); -s.setAttributeNS("http://www.w3.org/1999/xlink", "href", "scripts/include-2.js?pipe=trickle(d2)"); - -document.getElementsByTagName("svg")[0].appendChild(s); -document.getElementsByTagName("svg")[0].appendChild(s1); - -</script> -</svg> -<script> -onload = t.step_func(function() { - <!-- assumes that the SVg script should be async --> - assert_array_equals(eventOrder, ["external script #1", "external script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/137.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/137.html deleted file mode 100644 index 35a49b806d9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/137.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG script empty xlink:href</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script xlink:href=""> -t.step(function() {assert_unreached()}); -</script> -</svg> -<script> -onload = t.step_func(function() { - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/138.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/138.html deleted file mode 100644 index 0ff25471e0f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/138.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG script nested inlines</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script> -t.step(function() { -log("inline script #2"); -var a = { - <script> - t.step(function() {log("inline script #1")}) - </script> -a:1} -log("end inline script #2"); -}); -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "end inline script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/139.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/139.html deleted file mode 100644 index 7bb703d8a2c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/139.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG script nested external in inline</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script> -t.step(function() { -log("inline script #1"); -var a = { - <script xlink:href="scripts/include-1.js"> - t.step(function() {assert_unreached()}) - </script> -a:1} -log("end inline script #1"); -}); -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["external script #1", "inline script #1", "end inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/140.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/140.html deleted file mode 100644 index 9b54d09d58d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/140.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG script nested inline in external</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script xlink:href="scripts/include-1.js"> - <script> - t.step(function() {log("inline script #1")}); - </script> -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "external script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/141.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/141.html deleted file mode 100644 index 54aa3f3686e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/141.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG inline script that document.writes inline script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script> - t.step(function() { - log('inline script #1'); - document.write("<" + "script>t.step(function() {log('inline script #2')})<" + "/script>"); - log('end inline script #1'); - }); -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "end inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/142.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/142.html deleted file mode 100644 index d314eddb906..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/142.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG inline script that document.writes external script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script> - t.step(function() { - log('inline script #1'); - document.write("<" + "script xlink:href='scripts/include-1.js'><" + "/script>"); - log('end inline script #1'); - }); -</script> -<script>t.step(function() {log("inline script #2")});</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "end inline script #1", "external script #1", "inline script #2"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/143.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/143.html deleted file mode 100644 index a0d9012f687..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/143.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG nested inline script that document.writes inline script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script> - t.step(function() { - log('inline script #3'); - }); - <script> - log("inline script #1") - document.write("<" + "script>t.step(function() {log('inline script #2')})<" + "/script><" + "/script>"); - </script> - t.step(function() { - assert_unreached(): - }); -</script> -</svg> -<script> -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/144.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/144.html deleted file mode 100644 index 3962c4d6923..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/144.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG inline script changing the type attribute </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script type="text/plain"> -t.step(function() {assert_unreached()}); -</script> -</svg> -<script> -t.step(function() { - var s = document.querySelector("svg > script"); - s.textContent = "t.step(function() {log('inline script #1')})"; - s.type = ""; - s.parentNode.appendChild(s); -}); -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/145.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/145.html deleted file mode 100644 index 9e2d73bafcd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/145.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG inline script adding text to empty script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script> - var t = async_test(); -</script> -<svg> -<script></script> -</svg> -<script> -t.step(function() { - var s = document.querySelector("svg > script"); - s.textContent = "t.step(function() {log('inline script #1')})"; -}); -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/146-href.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/146-href.html deleted file mode 100644 index 6c0869db541..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/146-href.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG script adding src attribute </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script>var t = async_test();</script> -<svg> -<script></script> -</svg> -<script> -t.step(function() { - var s = document.querySelector("svg > script"); - s.setAttribute("href", "scripts/include-1.js"); -}); -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["external script #1"]); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/146.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/146.html deleted file mode 100644 index 333ac3fa0fd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/146.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: SVG script adding src attribute </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<div id="log"></div> -<script>var t = async_test();</script> -<svg> -<script></script> -</svg> -<script> -t.step(function() { - var s = document.querySelector("svg > script"); - s.src = "scripts/include-1.js"; -}); -onload = t.step_func(function() { - // SVG <script> element uses href attribute, so src attribute is ignored. - assert_array_equals(eventOrder, []); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/147.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/147.html deleted file mode 100644 index 07dc4d97c96..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/147.html +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: insert multiple inline scripts; first script moves subsequent scripts </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> -<div id="log"></div> -<script> -var t = async_test(); -</script> -<div id="container"></div> -<script> -t.step(function() { - log("inline script #1"); - var container = document.getElementById("container"); - - var frag = document.createDocumentFragment(); - var frag_script_1 = document.createElement("script"); - var frag_script_2 = document.createElement("script"); - frag_script_2.id = "movee"; - var frag_script_3 = document.createElement("script"); - - frag_script_1.textContent = "t.step(function() {log('inline script #2'); var s = document.getElementById('movee'); s.parentNode.appendChild(s)});"; - frag_script_2.textContent = "t.step(function() {log('inline script #3');})"; - frag_script_3.textContent = "t.step(function() {log('inline script #4');})"; - - [frag_script_1, frag_script_2, frag_script_3].forEach(function(x) {frag.appendChild(x)}); - - container.appendChild(frag); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3", "inline script #4"]); - t.done(); -}); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/148.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/148.html deleted file mode 100644 index e2da8e8f0b1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/148.html +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: insert multiple inline scripts; first script deletes subsequent script </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> -<div id="log"></div> -<script> -var t = async_test(); -</script> -<div id="container"></div> -<script> -t.step(function() { - log("inline script #1"); - var container = document.getElementById("container"); - - var frag = document.createDocumentFragment(); - var frag_script_1 = document.createElement("script"); - var frag_script_2 = document.createElement("script"); - frag_script_2.id = "delete"; - var frag_script_3 = document.createElement("script"); - - frag_script_1.textContent = "t.step(function() {log('inline script #2'); var s = document.getElementById('delete'); s.parentNode.removeChild(s)});"; - frag_script_2.textContent = "t.step(function() {log('inline script #3');})"; - frag_script_3.textContent = "t.step(function() {log('inline script #4');})"; - - [frag_script_1, frag_script_2, frag_script_3].forEach(function(x) {frag.appendChild(x)}); - - container.appendChild(frag); -}); - -onload = t.step_func(function() { - assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3", "inline script #4"]); - t.done(); -}); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/149.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/149.html deleted file mode 100644 index 40594d80488..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/149.html +++ /dev/null @@ -1,59 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: event/for attribute on script</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> -<div id="log"></div> -<script> - -attributes = [ - {for:"window", event:"onload()", expect:true}, - {for:"window", event:"onload", expect:true}, - {for:" WINdow\t\n", event:"ONload\t\n", expect:true}, - {for:"window", event:"load", expect:false}, - {for:"window", event:"onpageshow", expect:false}, - {for:"document", event:"onload", expect:false}, -] - -function test_maker(array_name) { - return function(x, i) { - var title = "for='" + x.for + "' event='" + x.event + "' " + array_name.replace("_", " ") + " " + (x.expect ? "executes immediately" : "does not execute"); - script_content = "var d =" + array_name + "[" + i + "];" - script_content += x.expect?"d[1].step(function() {d[3] = true});":"d[1].step(function() {assert_unreached()});" - return [x, async_test(title), script_content, false]; - } -} - -parser_inserted = attributes.map(test_maker("parser_inserted")); -dom_inserted = attributes.map(test_maker("dom_inserted")); - -parser_inserted.forEach(function(x) { - var d = x[0]; - document.write("<script for='" + d.for + "' event='" + d.event + "'>" + x[2] + "<\/script>"); -}); - -dom_inserted.forEach(function(x) { - var d = x[0]; - var s = document.createElement("script"); - s.setAttribute("event", d.event); - s.setAttribute("for", d.for); - s.textContent = x[2]; - document.body.appendChild(s); -}); -</script> - -<script> -var all_tests = parser_inserted.concat(dom_inserted); - -all_tests.filter(function(x) {return x[0]["expect"]}).forEach(function(x) {var t = x[1]; t.step(function() {assert_true(x[3])});}) - -onload = function() { - all_tests.forEach(function(x) {var t = x[1]; t.step(function() {t.done()})}); -} -</script> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-import-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-import-xhtml.xhtml deleted file mode 100644 index d6144795db6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-import-xhtml.xhtml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Stylesheet in XHTML BODY with @import blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div id="test">Test</div> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)" /> - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-import.html deleted file mode 100644 index 40223ed104c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-import.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Stylesheet in BODY with @import blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="test">Test</div> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-noimport-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-noimport-xhtml.xhtml deleted file mode 100644 index fa587a2ddba..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-noimport-xhtml.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Stylesheet in XHTML BODY blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="test">Test</div> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)" /> - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-noimport.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-noimport.html deleted file mode 100644 index b5829d4da5d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/150-noimport.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Stylesheet in BODY blocking scripts</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - <div id="test">Test</div> - <!-- this stylesheet blocks scripts --> - <link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> - <script> - test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/css/background.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/css/background.css deleted file mode 100644 index 86a155b811a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/css/background.css +++ /dev/null @@ -1 +0,0 @@ -#test {position:fixed}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/css/import.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/css/import.css deleted file mode 100644 index d1664c29a14..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/css/import.css +++ /dev/null @@ -1 +0,0 @@ -@import url("background.css")
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/non-external-no-import.tentative.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/non-external-no-import.tentative.html deleted file mode 100644 index 50836e0d7be..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/non-external-no-import.tentative.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Module scripts with no imports always execute asynchronously</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://github.com/whatwg/html/issues/3746"> -</head> -<body> -<script> -async_test(t => { - window.results = []; - window.logExecution = msg => window.results.push(msg); - - const script = document.createElement('script'); - script.type = 'module'; - script.textContent = "window.logExecution('module')"; - document.body.append(script); - window.logExecution('classic'); - - window.onload = t.step_func_done(e => { - assert_array_equals(window.results, ['classic', 'module']); - }); -}); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/pages/helloworld-postMessage.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/pages/helloworld-postMessage.html deleted file mode 100644 index 2ed8731ceb5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/pages/helloworld-postMessage.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> TC component </title> -</head> -<body> - - <p>This page should appear in popup or frame</p> - - <script type="text/javascript"> - var target = opener || top; - var id = location.search?' '+location.search.substring(1) : ''; - target.log('frame/popup script'+id); - window.onload=function(){ - target.log('load event inside frame/popup script'+id); - target.postMessage('msg evt frame/popup script'+id, '*'); - } - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/pages/helloworld.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/pages/helloworld.html deleted file mode 100644 index 271bc8f569e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/pages/helloworld.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title> TC component </title> -</head> -<body> - - <p>This page should appear in popup or frame</p> - - <script type="text/javascript"> - var target = top || opener; - var id = location.search?' '+parseInt(location.search.substring(1)) : ''; - target.log('frame/popup script'+id); - </script> - -</body></html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/check-style-sheet.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/check-style-sheet.js deleted file mode 100644 index cbab154f5ae..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/check-style-sheet.js +++ /dev/null @@ -1,4 +0,0 @@ -test(function() { - assert_equals(getComputedStyle(document.getElementById("test")).position, - "fixed"); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/count-script-tags.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/count-script-tags.js deleted file mode 100644 index 8fba4ecb3c0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/count-script-tags.js +++ /dev/null @@ -1 +0,0 @@ -log('script tags in DOM: '+document.getElementsByTagName('script').length);
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/find-body.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/find-body.js deleted file mode 100644 index 1ce198f13ed..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/find-body.js +++ /dev/null @@ -1,4 +0,0 @@ -log( - 'document.body: ' + - (document.body ? '<' + document.body.localName.toUpperCase() + '>' : null)); -var findBodyLoaded=true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/find-foo.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/find-foo.js deleted file mode 100644 index 52d0ec91cb4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/find-foo.js +++ /dev/null @@ -1,2 +0,0 @@ -log('found #foo element: ' + ( document.getElementById('foo') ? 'YES' : 'NO' )); -var findFooLoaded=true;
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-1.js deleted file mode 100644 index 8ff291ad57e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-1.js +++ /dev/null @@ -1 +0,0 @@ -log('external script #1');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-10.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-10.js deleted file mode 100644 index 8dc770ddc05..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-10.js +++ /dev/null @@ -1 +0,0 @@ -document.write("<script src='scripts/include-9.js?pipe=trickle(d2)' defer></script>"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-11.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-11.js deleted file mode 100644 index 016913c4b80..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-11.js +++ /dev/null @@ -1,4 +0,0 @@ -log("external script before adding iframe"); -var iframe = document.createElement("iframe"); -iframe.srcdoc = "<script>parent.log('script in iframe')</script>" -document.body.appendChild(iframe); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-2.js deleted file mode 100644 index 31319423afd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-2.js +++ /dev/null @@ -1 +0,0 @@ -log('external script #2');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-3.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-3.js deleted file mode 100644 index 53352e0f83c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-3.js +++ /dev/null @@ -1,3 +0,0 @@ -log('external script before doc write'); -document.write( '<script>log(\'document.write external script\');</script>'); -log('external script after doc write');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-4.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-4.js deleted file mode 100644 index 0597a226242..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-4.js +++ /dev/null @@ -1,3 +0,0 @@ -log('include-4 before doc write'); -document.write( '<script src="scripts/include-3.js"></script>'); -log('include-4 after doc write');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-5.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-5.js deleted file mode 100644 index 52952d73791..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-5.js +++ /dev/null @@ -1,7 +0,0 @@ -log('include-5 before removing scripts'); -var scripts=[].slice.call(document.getElementsByTagName('script'), 3); -for(var i = 0; i < scripts.length; i++) { - var s = scripts[i]; - s.parentNode.removeChild(s); -} -log('include-5 after removing scripts'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-6.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-6.js deleted file mode 100644 index 77da2af2329..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-6.js +++ /dev/null @@ -1,6 +0,0 @@ -top.log( - 'external script (#foo found? ' + - (document.getElementById('foo') ? 'YES' : 'NO' ) + - ')' -); -top.include6Loaded=true;
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-7.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-7.js deleted file mode 100644 index 57c55080158..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-7.js +++ /dev/null @@ -1 +0,0 @@ -log('external script #7');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-8.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-8.js deleted file mode 100644 index 960f2129feb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-8.js +++ /dev/null @@ -1,4 +0,0 @@ -log("external script #8"); -var s = document.createElement("script") -s.src='scripts/include-9.js?pipe=trickle(d2)' -document.body.appendChild(s); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-9.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-9.js deleted file mode 100644 index 9042882024b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/scripts/include-9.js +++ /dev/null @@ -1,2 +0,0 @@ -log("external script #9"); -test();
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/testlib/testlib.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/testlib/testlib.js deleted file mode 100644 index a6fd39426b9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/testlib/testlib.js +++ /dev/null @@ -1,43 +0,0 @@ -/* -* Utility functions for script scheduler test -*/ -(function(){ /* namespace hiding local variables like arOrderOfAllEvents from global scope */ - window.testlib = {}; - window.eventOrder = []; - var arNumberOfScriptsParsedPerEvent=[]; - window.log = function (str){ - eventOrder.push(str); - arNumberOfScriptsParsedPerEvent.push(document.getElementsByTagName('script').length); - } - - window.testlib.addScript = function(source, attributes, parent, firstInParent,funcPrepare) { - try{ - parent = parent||document.body; - var script = document.createElement('script'); - if(funcPrepare) { - funcPrepare(script); - } - if(source)script.appendChild( document.createTextNode(source) ); - for( var name in attributes){ - if(/^on/i.test(name)) { - script[name] = attributes[name]; - } else { - script.setAttribute(name, attributes[name]); - } - } - if (firstInParent && parent.firstChild) { - parent.insertBefore(script, parent.firstChild); - } else { - parent.appendChild(script); - } - } catch(e) { - log('ERROR when adding script to DOM!'); - alert(e); - } - return script; - } - - window.testlib.urlParam = function(relativeURL) { - return location.href.replace( /\d*\.html$/, relativeURL); - } -})(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-utf8.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-utf8.js deleted file mode 100644 index eb442c97bc9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-utf8.js +++ /dev/null @@ -1,5 +0,0 @@ -(function() { - window.getSomeString = function() { - return "śćążź"; //<- these are five Polish letters, similar to scazz. It can be read correctly only with windows 1250 encoding. - }; -})(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-windows1250.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-windows1250.js deleted file mode 100644 index 50de6932ba2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-windows1250.js +++ /dev/null @@ -1,5 +0,0 @@ -(function() { - window.getSomeString = function() { - return "湿"; //<- these are five Polish letters, similar to scazz. It can be read correctly only with windows 1250 encoding. - }; -})(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html deleted file mode 100644 index dc0fa9dabb7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html +++ /dev/null @@ -1,15 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Script src with a base URL</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<base href=../beta/> -<div id=log></div> -<script> -function do_test(path) { - test(function() { - assert_equals(path, "beta"); - }); -} -</script> -<script src=test.js></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js deleted file mode 100644 index 3cbbb12e2eb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js +++ /dev/null @@ -1 +0,0 @@ -do_test("alpha"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js deleted file mode 100644 index 4ce0f5338d9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js +++ /dev/null @@ -1 +0,0 @@ -do_test("beta"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html deleted file mode 100644 index edc2c3d6f89..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html +++ /dev/null @@ -1,27 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Script src with an empty URL</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<base href=unreachable.js> -<div id=log></div> -<script> -async_test(function(t) { - window.unreachable = this.unreached_func("Should not load unreachable.js"); - var queued = false; - var script = document.createElement("script"); - script.onerror = this.step_func_done(function(ev) { - assert_equals(ev.type, "error"); - assert_false(ev.bubbles, "bubbles"); - assert_false(ev.cancelable, "cancelable"); - assert_true(ev.isTrusted, "isTrusted"); - assert_equals(ev.target, script); - assert_true(ev instanceof Event, "instanceof Event"); - assert_class_string(ev, "Event"); - assert_true(queued, "event should not be dispatched synchronously"); - }); - script.setAttribute("src", ""); - document.body.appendChild(script); - queued = true; -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html deleted file mode 100644 index d127f1eb3bf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html +++ /dev/null @@ -1,32 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Script src with an empty URL</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> -// For a better error message in case the UA tries to load "" (which resolves -// to this document). -setup({ - "allow_uncaught_exception": true, -}); -async_test(function(t) { - window.onerror = this.unreached_func("Should not get an error reported to " + - "the window before the script"); - var queued = false; - var script = document.createElement("script"); - script.onerror = this.step_func_done(function(ev) { - assert_equals(ev.type, "error"); - assert_false(ev.bubbles, "bubbles"); - assert_false(ev.cancelable, "cancelable"); - assert_true(ev.isTrusted, "isTrusted"); - assert_equals(ev.target, script); - assert_true(ev instanceof Event, "instanceof Event"); - assert_class_string(ev, "Event"); - assert_true(queued, "event should not be dispatched synchronously"); - }); - script.setAttribute("src", ""); - document.body.appendChild(script); - queued = true; -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html deleted file mode 100644 index b49e51740fa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html +++ /dev/null @@ -1,25 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Script src with an invalid URL</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<div id=log></div> -<script> -async_test(function(t) { - var queued = false; - var script = document.createElement("script"); - script.onerror = this.step_func_done(function(ev) { - assert_equals(ev.type, "error"); - assert_false(ev.bubbles, "bubbles"); - assert_false(ev.cancelable, "cancelable"); - assert_true(ev.isTrusted, "isTrusted"); - assert_equals(ev.target, script); - assert_true(ev instanceof Event, "instanceof Event"); - assert_class_string(ev, "Event"); - assert_true(queued, "event should not be dispatched synchronously"); - }); - script.setAttribute("src", "//[]"); - document.body.appendChild(script); - queued = true; -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js deleted file mode 100644 index ca7fdba71f1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js +++ /dev/null @@ -1 +0,0 @@ -unreachable(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/historical.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/historical.html deleted file mode 100644 index 1f1a91228c2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/historical.html +++ /dev/null @@ -1,53 +0,0 @@ -<!doctype html> -<title>Historical script element features should not be supported</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -function t(property) { - test(function() { - assert_false(property in document.createElement('script')); - }, 'script.' + property + ' should not be supported'); -} -// added in https://github.com/whatwg/html/commit/69f83cf2eacf4543860ccb7abab0ff5bb1e8b594 -// removed in https://github.com/whatwg/html/commit/1a0b5e8377d59462e05a5cffda4b8592324a2785 -t('onbeforescriptexecute'); -t('onafterscriptexecute'); - -var t_onbeforescriptexecute_attr = async_test('onbeforescriptexecute content attribute should not be supported'); -var t_onafterscriptexecute_attr = async_test('onafterscriptexecute content attribute should not be supported'); -var t_beforescriptexecute_event = async_test(function() { - addEventListener('beforescriptexecute', this.step_func(function() { - assert_unreached(); - }), true); -}, 'beforescriptexecute event should not be supported'); -var t_afterscriptexecute_event = async_test(function() { - addEventListener('afterscriptexecute', this.step_func(function() { - assert_unreached(); - }), true); -}, 'afterscriptexecute event should not be supported'); - -var a = false; - -onload = function() { - t_onbeforescriptexecute_attr.step(function() { - assert_true(a); - this.done(); - }); - t_onafterscriptexecute_attr.step(function() { - assert_true(a); - this.done(); - }); - t_beforescriptexecute_event.step(function() { - assert_true(a); - this.done(); - }); - t_afterscriptexecute_event.step(function() { - assert_true(a); - this.done(); - }); -}; -</script> -<script onbeforescriptexecute="t_onbeforescriptexecute_attr.step(function() { assert_unreached(); });" - onafterscriptexecute="t_onafterscriptexecute_attr.step(function() { assert_unreached(); });"> -a = true; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/dynamic-import-with-assertion-argument.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/dynamic-import-with-assertion-argument.any.js deleted file mode 100644 index ef032d27c57..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/dynamic-import-with-assertion-argument.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker - -promise_test(async test => { - const result = await import("./export-hello.js", { assert: { } }); - assert_equals(result.default, "hello"); -}, "Dynamic import with an empty assert clause should succeed"); - -promise_test(async test => { - const result = await import("./export-hello.js", { assert: { unsupportedAssertionKey: "unsupportedAssertionValue"} }); - assert_equals(result.default, "hello"); -}, "Dynamic import with an unsupported import assertion should succeed"); - -promise_test(test => { - return promise_rejects_js(test, TypeError, - import("./export-hello.js", { assert: { type: "notARealType"} } ), - "Dynamic import with an unsupported type assertion should fail"); -}, "Dynamic import with an unsupported type assertion should fail"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause.html deleted file mode 100644 index 3a7c371189c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<title>Handling of empty import assertion clause</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that no error occurs when an empty import assertion clause is provided."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(window.log, ["hello", "empty-assertion-clause"]); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./empty-assertion-clause.js" onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause.js deleted file mode 100644 index 6913dd61dff..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./hello.js" assert { }; -log.push("empty-assertion-clause"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-type-assertion.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-type-assertion.js deleted file mode 100644 index 5bb9b1ddb8e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-type-assertion.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./hello.js#2" assert { type: "" }; -log.push("empty-type-assertion"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/export-hello.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/export-hello.js deleted file mode 100644 index 34b58e6e126..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/export-hello.js +++ /dev/null @@ -1 +0,0 @@ -export default "hello"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/hello.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/hello.js deleted file mode 100644 index 2f348444606..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/hello.js +++ /dev/null @@ -1 +0,0 @@ -log.push("hello");
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion-error.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion-error.html deleted file mode 100644 index 0adcc475693..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion-error.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<title>Handling of invalid module type import assertions</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that invalid module type assertion leads to TypeError on window."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 4); - assert_equals(log[0].constructor, TypeError); - assert_equals(log[1].constructor, TypeError); - assert_equals(log[2].constructor, TypeError); - assert_equals(log[3].constructor, TypeError); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./invalid-type-assertion.js" onerror="unreachable()"></script> -<script type="module" src="./empty-type-assertion.js" onerror="unreachable()"></script> -<script type="module" src="./js-type-assertion.js" onerror="unreachable()"></script> -<script type="module" src="./javascript-type-assertion.js" onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion.js deleted file mode 100644 index e28c0176d5c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./hello.js#1" assert { type: "notARealType" }; -log.push("invalid-type-assertion"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/javascript-type-assertion.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/javascript-type-assertion.js deleted file mode 100644 index cc0f531026e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/javascript-type-assertion.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./hello.js#4" assert { type: "javascript" }; -log.push("javascript-type-assertion"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/js-type-assertion.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/js-type-assertion.js deleted file mode 100644 index c649c95ffea..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/js-type-assertion.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./hello.js#3" assert { type: "js" }; -log.push("js-type-assertion"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.html deleted file mode 100644 index edda2d737a3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<title>Handling of unsupported assertion</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that no error occurs when an unsupported import assertion is provided."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(window.log, ["hello", "unsupported-assertion"]); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./unsupported-assertion.js" onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.js deleted file mode 100644 index 45f6d60c9da..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./hello.js" assert { unsupportedAssertionKey: "unsupportedAssertionValue" }; -log.push("unsupported-assertion"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs deleted file mode 100644 index b533fc2e906..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs +++ /dev/null @@ -1 +0,0 @@ -import "./serve-with-content-type.py?fn=is-module-goal.mjs&ct=text%2Fjavascript%3Bgoal=module";
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js deleted file mode 100644 index 069363dd400..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js +++ /dev/null @@ -1,3 +0,0 @@ -with ({}) { - ; -};
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json deleted file mode 100644 index e77e32d3382..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/array.json +++ /dev/null @@ -1 +0,0 @@ -["en", "try"] diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json Binary files differdeleted file mode 100644 index d22a45a5910..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16be.json +++ /dev/null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json Binary files differdeleted file mode 100644 index 4d1aa264a69..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-16le.json +++ /dev/null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json deleted file mode 100644 index 07ba933e860..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/bom-utf-8.json +++ /dev/null @@ -1 +0,0 @@ -{ "data": "hello" }
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html deleted file mode 100644 index 1bfd3fc00ae..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-2.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset="windows-1250"> -<title>JSON modules: UTF-8 decoding</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script type="module"> - import json from "../serve-with-content-type.py?fn=json-module/utf-8.json" assert { type: "json"}; - test(() => { - assert_equals(json.data, "śćążź"); - }, "JSON module should be loaded as utf-8 even though document's encoding is windows-1250"); -</script> -<script type="module"> - import json from "../serve-with-content-type.py?fn=json-module/windows-1250.json&ct=text/json%3Bcharset=windows-1250" assert { type: "json"}; - test(() => { - assert_not_equals(json.data, "śćążź", - 'Should be decoded as UTF-8'); - }, "JSON module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header, and this document's encoding is windows-1250"); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js deleted file mode 100644 index d2dbe3e468f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-bom.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker -// META: script=/common/utils.js - -promise_test(async () => { - const jsonModule = await import('./bom-utf-8.json', { assert: { type: 'json' } }); - assert_equals(jsonModule.default.data, 'hello'); -}, 'UTF-8 BOM should be stripped when decoding JSON module script'); - -promise_test(async test => { - await promise_rejects_js(test, SyntaxError, - import('./bom-utf-16be.json', { assert: { type: 'json' } }), 'Expected parse error from UTF-16BE BOM'); -}, 'UTF-16BE BOM should result in parse error in JSON module script'); - -promise_test(async test => { - await promise_rejects_js(test, SyntaxError, - import('./bom-utf-16le.json', { assert: { type: 'json' } }), 'Expected parse error from UTF-16LE BOM'); -}, 'UTF-16LE BOM should result in parse error in JSON module script'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html deleted file mode 100644 index de30de8c2e5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>JSON modules: UTF-8 decoding</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script type="module" onerror="unreachable()"> - import json from "../serve-with-content-type.py?fn=json-module/utf-8.json&ct=text/json%3Bcharset=utf-8" assert { type: "json"}; - test(() => { - assert_equals(json.data, "śćążź"); - }, "JSON module should be loaded as utf-8 when charset=utf8 is specified"); -</script> -<script type="module" onerror="unreachable()"> - import json from "../serve-with-content-type.py?fn=json-module/utf-8.json&ct=text/json%3Bcharset=shift-jis" assert { type: "json"}; - test(() => { - assert_equals(json.data, "śćążź"); - }, "JSON module should be loaded as utf-8 when charset=shift-jis is specified"); -</script> -<script type="module" onerror="unreachable()"> - import json from "../serve-with-content-type.py?fn=json-module/utf-8.json&ct=text/json%3Bcharset=windows-1252" assert { type: "json"}; - test(() => { - assert_equals(json.data, "śćążź"); - }, "JSON module should be loaded as utf-8 when charset=windows-1252 is specified"); -</script> -<script type="module" onerror="unreachable()"> - import json from "../serve-with-content-type.py?fn=json-module/utf-8.json&ct=text/json%3Bcharset=utf-7" assert { type: "json"};; - test(() => { - assert_equals(json.data, "śćążź"); - }, "JSON module should be loaded as utf-8 when charset=utf-7 is specified"); -</script> -<script type="module" onerror="unreachable()"> - import json from "../serve-with-content-type.py?fn=json-module/windows-1250.json&ct=text/json%3Bcharset=windows-1250" assert { type: "json"}; - test(() => { - assert_not_equals(json.data, "śćążź", - 'Should be decoded as UTF-8'); - }, "JSON module should be loaded as utf-8 even if it is encoded in windows-1250 and served with a windows-1250 charset response header"); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html deleted file mode 100644 index 99ff2f67e80..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests.html +++ /dev/null @@ -1,33 +0,0 @@ -<!doctype html> -<html> -<head> - <title>json-module-crossorigin</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <h1>json-module-crossorigin</h1> - <iframe id="import-WithCORS" src="crossorigin-import-with-cors.sub.html"></iframe> - <iframe id="import-NoCORS" src="crossorigin-import-without-cors.sub.html"></iframe> - <iframe id="import-parseerror-WithCors" src="crossorigin-import-parse-error-with-cors.sub.html"></iframe> - <script> - - var tests = [ - { "obj": async_test("Imported JSON module, cross-origin with CORS"), "id": "import-WithCORS", "expected": "imported JSON: 42" }, - { "obj": async_test("Imported JSON module, cross-origin, missing CORS ACAO header"), "id": "import-NoCORS", "expected": "error" }, - { "obj": async_test("Imported JSON module with parse error, cross-origin, with CORS"), "id": "import-parseerror-WithCors", "expected": "0-0" }, - ]; - - window.addEventListener("load", function () { - tests.forEach(function (test) { - var target = document.getElementById(test.id); - test.obj.step(function () { - assert_equals(target.contentDocument._log, test.expected, "Unexpected _log value"); - }); - test.obj.done(); - }); - }); - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html deleted file mode 100644 index dbb9fe6d1a2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials-iframe.sub.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> - -<script type="module"> - import json from "./cross-origin.py?id=sameOriginNoneDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "json" }; - window.sameOriginNoneDescendant = json.requestHadCookies; -</script> -<script type="module" crossOrigin="anonymous"> - import json from "./cross-origin.py?id=sameOriginAnonymousDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "json" }; - window.sameOriginAnonymousDescendant = json.requestHadCookies; -</script> -<script type="module" crossOrigin="use-credentials"> - import json from "./cross-origin.py?id=sameOriginUseCredentialsDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "json" }; - window.sameOriginUseCredentialsDescendant = json.requestHadCookies; -</script> -<script type="module"> - import json from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py?id=crossOriginNoneDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "json" }; - window.crossOriginNoneDescendant = json.requestHadCookies; -</script> -<script type="module" crossOrigin="anonymous"> - import json from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py?id=crossOriginAnonymousDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "json" }; - window.crossOriginAnonymousDescendant = json.requestHadCookies; -</script> -<script type="module" crossOrigin="use-credentials"> -import json from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py?id=crossOriginUseCredentialsDescendant&origin=http://{{host}}:{{ports[http][0]}}" assert { type: "json" }; -window.crossOriginUseCredentialsDescendant = json.requestHadCookies; -</script> - -<script type="text/javascript"> -window.addEventListener('load', event => { - window.parent.postMessage({}, '*'); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html deleted file mode 100644 index a6df506e214..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub.html +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -document.cookie = 'milk=1'; - -const setCookiePromise = fetch( - 'http://{{domains[www2]}}:{{ports[http][0]}}/cookies/resources/set-cookie.py?name=milk&path=/html/semantics/scripting-1/the-script-element/json-module/', - { - mode: 'no-cors', - credentials: 'include', - }); - -const windowLoadPromise = new Promise(resolve => { - window.addEventListener('load', () => { - resolve(); - }); -}); - -promise_test(t => { - const iframe = document.createElement('iframe'); - - return Promise.all([setCookiePromise, windowLoadPromise]).then(() => { - const messagePromise = new Promise(resolve => { - window.addEventListener('message', event => { - resolve(); - }); - }); - - iframe.src = 'credentials-iframe.sub.html'; - document.body.appendChild(iframe); - - return messagePromise; - }).then(() => { - const w = iframe.contentWindow; - - assert_equals(w.sameOriginNoneDescendant, true, - 'Descendant JSON modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin'); - assert_equals(w.sameOriginAnonymousDescendant, true, - 'Descendant JSON modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin'); - assert_equals(w.sameOriginUseCredentialsDescendant, true, - 'Descendant JSON modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin'); - assert_equals(w.crossOriginNoneDescendant, false, - 'Descendant JSON modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin'); - assert_equals(w.crossOriginAnonymousDescendant, false, - 'Descendant JSON modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin'); - assert_equals(w.crossOriginUseCredentialsDescendant, true, - 'Descendant JSON modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin'); -}); -}, 'JSON Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute'); -</script> -<body> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py deleted file mode 100644 index cd56c3628a0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cross-origin.py +++ /dev/null @@ -1,16 +0,0 @@ -def main(request, response): - - headers = [ - (b"Content-Type", b"application/json"), - (b"Access-Control-Allow-Origin", request.GET.first(b"origin")), - (b"Access-Control-Allow-Credentials", b"true") - ] - - milk = request.cookies.first(b"milk", None) - - if milk is None: - return headers, u'{"requestHadCookies": false}' - elif milk.value == b"1": - return headers, u'{"requestHadCookies": true}' - - return headers, u'{"requestHadCookies": false}' diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html deleted file mode 100644 index 12c6a608832..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-parse-error-with-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>json-module-import-cross-domain-parse-error-WithCORS</title> - <script src="../module/crossorigin-common.js"></script> -</head> -<body> - <h1>json-module-import-cross-domain-parse-error-WithCORS</h1> - <script type="module" crossorigin> - import json from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/parse-error.json?pipe=header(Access-Control-Allow-Origin,*)" assert { type: "json" }; - // Push an event to the log indicating that the script was executed. - document._log.push(`imported JSON: ${json.answer}`); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html deleted file mode 100644 index 01663d25169..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-with-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>json-module-import-cross-domain-WithCORS</title> - <script src="../module/crossorigin-common.js"></script> -</head> -<body> - <h1>json-module-import-cross-domain-WithCORS</h1> - <script type="module" crossorigin> - import json from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/data.json?pipe=header(Access-Control-Allow-Origin,*)" assert { type: "json" }; - // Push an event to the log indicating that the script was executed. - document._log.push(`imported JSON: ${json.answer}`); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html deleted file mode 100644 index 7849c6aeddf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/crossorigin-import-without-cors.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>json-module-import-cross-domain-NoCORS</title> - <script src="../module/crossorigin-common.js"></script> -</head> -<body> - <h1>json-module-import-cross-domain-NoCORS</h1> - <script type="module" onerror="document._log.push('error');"> - import json from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/data.json" assert { type: "json" }; - // Push an event to the log indicating that the script was executed. - document._log.push(`imported JSON: ${json.answer}`); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json deleted file mode 100644 index 14a0526ebb2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/data.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "answer": 42 -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json deleted file mode 100644 index c508d5366f7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/false.json +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js deleted file mode 100644 index 969c90c2907..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-matches.js +++ /dev/null @@ -1,2 +0,0 @@ -import json from "./data.json" assert { type: "json" }; -window.matchesLog.push(`integrity-matches,json:${json.answer}`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js deleted file mode 100644 index 3c88a98dbc5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-mismatches.js +++ /dev/null @@ -1,2 +0,0 @@ -import json "./data.json" assert { type: "json" }; -window.mismatchesLog.push(`integrity-mismatches,json:${json.answer}`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html deleted file mode 100644 index 68a794b9733..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title><script> integrity=""</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -window.matchesLog = []; -window.matchesEvents = []; - -window.mismatchesLog = []; -window.mismatchesEvents = []; -</script> -<script type="module" src="integrity-matches.js" integrity="sha384-VmQQfGzBiLKdyzw4FA4kL4ohu4tyujV68ddgW1aN/1v3cBZNNBn2gDFdVQxfL7+a" onload="window.matchesEvents.push('load');" onerror="window.matchesEvents.push('error')"></script> -<script type="module" src="integrity-mismatches.js" integrity="sha384-doesnotmatch" onload="window.mismatchesEvents.push('load');" onerror="window.mismatchesEvents.push('error')"></script> - -<script type="module"> -test(() => { - assert_array_equals(window.matchesLog, ["integrity-matches,json:42"], "The module and its dependency must have executed"); - assert_array_equals(window.matchesEvents, ["load"], "The load event must have fired"); -}, "The integrity attribute must be verified on the top-level of a module loading a JSON module and allow it to execute when it matches"); - -test(() => { - assert_array_equals(window.mismatchesLog, [], "The module and its dependency must not have executed"); - assert_array_equals(window.mismatchesEvents, ["error"], "The error event must have fired"); -}, "The integrity attribute must be verified on the top-level of a module loading a JSON module and not allow it to execute when there's a mismatch"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js deleted file mode 100644 index cbccbd48429..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/invalid-content-type.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker - -const content_types = [ - "application/json+protobuf", - "application/json+blah", - "text/x-json", - "text/json+blah", - "application/blahjson", - "image/json", -]; -for (const content_type of content_types) { - promise_test(async test => { - await promise_rejects_js(test, TypeError, - import(`./module.json?pipe=header(Content-Type,${content_type})`, { assert: { type: "json"} }), - `Import of a JSON module with MIME type ${content_type} should fail`); - }, `Try importing JSON module with MIME type ${content_type}`); -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html deleted file mode 100644 index cc47da1499f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.html +++ /dev/null @@ -1,29 +0,0 @@ -<!doctype html> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> - promise_test(async (test) => { - const reg = await navigator.serviceWorker.register('./serviceworker.js', { type: 'module' }); - test.add_cleanup(() => reg.unregister()); - assert_not_equals(reg.installing, undefined); - }, "Javascript importing JSON Module should load within the context of a service worker"); - - promise_test(test => { - return promise_rejects_dom(test, "SecurityError", - navigator.serviceWorker.register('./module.json', { type: 'module' }), - "Attempting to load JSON as a service worker should fail"); - }, "Trying to register a service worker with a top-level JSON Module should fail"); - - promise_test(async (test) => { - const reg = await navigator.serviceWorker.register('./serviceworker-dynamic-import.js', { type: 'module' }); - test.add_cleanup(() => reg.unregister()); - assert_not_equals(reg.installing, undefined); - reg.installing.postMessage("PING"); - const msgEvent = await new Promise(resolve => { - navigator.serviceWorker.onmessage = resolve; - }); - assert_equals(msgEvent.data, "FAILED"); - }, "JSON Module dynamic import should not load within the context of a service worker"); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html deleted file mode 100644 index a9dfc1e6917..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.html +++ /dev/null @@ -1,67 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for JSON modules</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -</head> -<script> - "use strict"; - - var test1_load = event_test('inline, 200, parser-inserted', false, false); - var test1_error = event_test('inline, 404, parser-inserted', false, true); - - var test2_load = event_test('src, 200, parser-inserted', true, false); - var test2_error = event_test('src, 404, parser-inserted', false, true); - - var test3_dynamic_load = event_test('src, 200, not parser-inserted', true, false); - var test3_dynamic_error = event_test('src, 404, not parser-inserted', false, true); - - var test4_dynamic_load = event_test('inline, 200, not parser-inserted', false, false); - var test4_dynamic_error = event_test('inline, 404, not parser-inserted', false, true); - - var script3_dynamic_load = document.createElement('script'); - script3_dynamic_load.setAttribute('type', 'module'); - script3_dynamic_load.onload = () => onLoad(test3_dynamic_load); - script3_dynamic_load.onerror = () => onError(test3_dynamic_load); - script3_dynamic_load.src = "./load-error-events.py?test=test3_dynamic_load"; - document.head.appendChild(script3_dynamic_load); - - var script3_dynamic_error = document.createElement('script'); - script3_dynamic_error.setAttribute('type', 'module'); - script3_dynamic_error.onload = () => onLoad(test3_dynamic_error); - script3_dynamic_error.onerror = () => onError(test3_dynamic_error); - script3_dynamic_error.src = "./load-error-events.py?test=test3_dynamic_error"; - document.head.appendChild(script3_dynamic_error); - - var script4_dynamic_load = document.createElement('script'); - script4_dynamic_load.setAttribute('type', 'module'); - script4_dynamic_load.onload = () => onLoad(test4_dynamic_load); - script4_dynamic_load.onerror = () => onError(test4_dynamic_load); - script4_dynamic_load.async = true; - script4_dynamic_load.appendChild(document.createTextNode(` - import "./module.json" assert { type: "json" }; - onExecute(test4_dynamic_load);` - )); - document.head.appendChild(script4_dynamic_load); - - var script4_dynamic_error = document.createElement('script'); - script4_dynamic_error.setAttribute('type', 'module'); - script4_dynamic_error.onload = () => onLoad(test4_dynamic_error); - script4_dynamic_error.onerror = () => onError(test4_dynamic_error); - script4_dynamic_error.async = true; - script4_dynamic_error.appendChild(document.createTextNode(`import "./not_found.json" assert { type: "json" };`)); - document.head.appendChild(script4_dynamic_error); -</script> -<script onload="onLoad(test1_load);" onerror="onError(test1_load);" type="module"> - import "./module.json" assert { type: "json"}; - onExecute(test1_load); -</script> -<script onload="onLoad(test1_error);" onerror="onError(test1_error);" type="module"> - import "./not_found.json" assert { type: "json"}; - onExecute(test1_error); -</script> -<script src="./load-error-events.py?test=test2_load" onload="onLoad(test2_load);" onerror="onError(test2_load);" type="module"></script> -<script src="./load-error-events.py?test=test2_error" onload="onLoad(test2_error);" onerror="onError(test2_error);" type="module"></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py deleted file mode 100644 index 4018adcdf7c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events.py +++ /dev/null @@ -1,14 +0,0 @@ -import re - -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - test = request.GET.first(b'test') - assert(re.match(b'^[a-zA-Z0-9_]+$', test)) - - status = 200 - if test.find(b'_load') >= 0: - content = b'import "./module.json" assert { type: "json"}; %s.executed = true;' % test - else: - content = b'import "./not_found.json" assert { type: "json"}; %s.test.step(function() { assert_unreached("404 script should not be executed"); });' % test - - return status, headers, content diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html deleted file mode 100644 index a495d4ac186..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>JSON modules</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script> -const t = async_test(); -</script> -<script type="module" onerror="t.step(() => assert_unreached(event))"> -import v from "./module.json" assert { type: "json" }; -t.step(() => { - assert_equals(typeof v, "object"); - assert_array_equals(Object.keys(v), ["test"]); - assert_equals(v.test, true); - t.done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json deleted file mode 100644 index f834b2a4e8f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test": true -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js deleted file mode 100644 index 37fbcae9fab..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.any.js +++ /dev/null @@ -1,14 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker - -for (const value of [null, true, false, "string"]) { - promise_test(async t => { - const result = await import(`./${value}.json`, { assert: { type: "json" } }); - assert_equals(result.default, value); - }, `Non-object: ${value}`); -} - -promise_test(async t => { - const result = await import("./array.json", { assert: { type: "json" } }); - assert_array_equals(result.default, ["en", "try"]); -}, "Non-object: array"); - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json deleted file mode 100644 index 19765bd501b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/null.json +++ /dev/null @@ -1 +0,0 @@ -null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html deleted file mode 100644 index 68d3ef0a9ad..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>JSON modules: parse error</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script> -setup({ - allow_uncaught_exception: true, -}); -async_test(t => { - window.addEventListener("error", t.step_func_done(e => { - assert_true(e instanceof ErrorEvent, "ErrorEvent"); - assert_equals(e.filename, new URL("parse-error.json", location).href); - assert_true(e.error instanceof SyntaxError, "SyntaxError"); - })); -}); -</script> -<script type="module"> -import v from "./parse-error.json"; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json deleted file mode 100644 index 98232c64fce..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.json +++ /dev/null @@ -1 +0,0 @@ -{ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py deleted file mode 100644 index e9f0f1789ba..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(request, response): - referrer = request.headers.get(b"referer", b"") - response_headers = [(b"Content-Type", b"application/json"), - (b"Access-Control-Allow-Origin", b"*")] - return (200, response_headers, - b'{"referrer": "' + referrer + b'"}') diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html deleted file mode 100644 index 83e103529dc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/referrer-policies.sub.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrers with JSON module requests</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - // "name" parameter is necessary for bypassing the module map. - import referrerSame from "./referrer-checker.py?name=sameNoReferrerPolicy" assert { type: "json"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py?name=remoteNoReferrerPolicy" assert { type: "json"}; - - const origin = (new URL(location.href)).origin + "/"; - const originUrl = location.href; - - test(t => { - assert_equals( - referrerSame.referrer, originUrl, - "Referrer URL should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the default referrer policy."); - - test(t => { - assert_equals( - referrerRemote.referrer, origin, - "Referrer origin should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the default referrer policy."); -</script> -<script type="module" referrerpolicy="origin"> - import referrerSame from "./referrer-checker.py?name=sameReferrerPolicyOrigin" assert { type: "json"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py?name=remoteReferrerPolicyOrigin" assert { type: "json"}; - - const origin = (new URL(location.href)).origin + "/"; - - test(t => { - assert_equals( - referrerSame.referrer, origin, - "Referrer origin should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the origin policy."); - - test(t => { - assert_equals( - referrerRemote.referrer, origin, - "Referrer origin should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the origin policy."); - -</script> -<script type="module" referrerpolicy="no-referrer"> - import referrerSame from "./referrer-checker.py?name=sameReferrerPolicyNoReferrer" assert { type: "json"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py?name=remoteReferrerPolicyNoReferrer" assert { type: "json"}; - - test(t => { - assert_equals( - referrerSame.referrer, "", - "No referrer should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the no-referrer policy."); - - test(t => { - assert_equals( - referrerRemote.referrer, "", - "No referrer should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the no-referrer policy."); - -</script> -<script type="module" referrerpolicy="unsafe-url"> - import referrerSame from "./referrer-checker.py?name=sameNoReferrerPolicyUnsafeUrl" assert { type: "json"}; - import referrerRemote from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/json-module/referrer-checker.py?name=remoteNoReferrerPolicyUnsafeUrl" assert { type: "json"}; - - const originUrl = location.href; - - test(t => { - assert_equals( - referrerSame.referrer, originUrl, - "Referrer URL should be sent for the same-origin top-level script."); - }, "Importing a same-origin top-level script with the unsafe-url referrer policy."); - - test(t => { - assert_equals( - referrerRemote.referrer, originUrl, - "Referrer URL should be sent for the remote-origin top-level script."); - }, "Importing a remote-origin top-level script with the unsafe-url referrer policy."); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js deleted file mode 100644 index 5cc3ee5b7c4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.js +++ /dev/null @@ -1,65 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker -// META: script=/common/utils.js - -promise_test(async test => { - await promise_rejects_js(test, TypeError, - import("./module.json"), - "Dynamic import of a JSON module without a type assertion should fail"); - - // This time the import should succeed because we're using the correct - // import even though the previous attempt with the same specifier failed. - const result = await import("./module.json", { assert: { type: "json" } }); - assert_true(result.default.test); -}, "Importing a specifier that previously failed due to an incorrect type assertion can succeed if the correct assertion is later given"); - -promise_test(async test => { - // Append a URL fragment to the specifier so that this is independent - // from the previous test. - const result = await import("./module.json#2", { assert: { type: "json" } }); - assert_true(result.default.test); - - await promise_rejects_js(test, TypeError, - import("./module.json#2"), - "Dynamic import should fail with the type assertion missing even if the same specifier previously succeeded"); -}, "Importing a specifier that previously succeeded with the correct type assertion should fail if the incorrect assertion is later given"); - -promise_test(async test => { - const uuid_token = token(); - // serve-json-then-js.py gives us JSON the first time - const result_json = await import(`../serve-json-then-js.py?key=${uuid_token}`, { assert: { type: "json" } }); - assert_equals(result_json.default.hello, "world"); - - // Import using the same specifier again; this time we get JS, which - // should succeed since we're not asserting a non-JS type this time. - const result_js = await import(`../serve-json-then-js.py?key=${uuid_token}`); - assert_equals(result_js.default, "hello"); -}, "Two modules of different type with the same specifier can load if the server changes its responses"); - -promise_test(async test => { - const uuid_token = token(); - // serve-json-then-js.py gives us JSON the first time - await promise_rejects_js(test, TypeError, - import(`../serve-json-then-js.py?key=${uuid_token}`), - "Dynamic import of JS with a JSON type assertion should fail"); - - // Import using the same specifier/module type pair again; this time we get JS, - // but the import should still fail because the module map entry for this - // specifier/module type pair already contains a failure. - await promise_rejects_js(test, TypeError, - import(`../serve-json-then-js.py?key=${uuid_token}`), - "import should always fail if the same specifier/type assertion pair failed previously"); -}, "An import should always fail if the same specifier/type assertion pair failed previously"); - -promise_test(async test => { - const uuid_token = token(); - // serve-json-then-js.py gives us JSON the first time - const result_json = await import(`../serve-json-then-js.py?key=${uuid_token}`, { assert: { type: "json" } }); - assert_equals(result_json.default.hello, "world"); - - // If this were to do another fetch, the import would fail because - // serve-json-then-js.py would give us JS this time. But, the module map - // entry for this specifier/module type pair already exists, so we - // successfully reuse the entry instead of fetching again. - const result_json_2 = await import(`../serve-json-then-js.py?key=${uuid_token}`, { assert: { type: "json" } }); - assert_equals(result_json_2.default.hello, "world"); -}, "If an import previously succeeded for a given specifier/type assertion pair, future uses of that pair should yield the same result"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html deleted file mode 100644 index c6d7c9a76e8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/script-element-json-src.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<title><script> with JSON src</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that <script> doesn't load when the src is JSON."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, ["error"]); - })); -</script> -<script type="module" src="./module.json" onload="t.unreached_func('JSON src should fail to load')" onerror="log.push('error')"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js deleted file mode 100644 index 9466c6fbe40..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker-dynamic-import.js +++ /dev/null @@ -1,5 +0,0 @@ -onmessage = e => { - e.waitUntil(import("./module.json", { assert: { type: "json" } }) - .then(module => e.source.postMessage("LOADED")) - .catch(error => e.source.postMessage("FAILED"))); - };
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js deleted file mode 100644 index 3f0a4d16640..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/serviceworker.js +++ /dev/null @@ -1 +0,0 @@ -import './module.json' assert { type: "json" };
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json deleted file mode 100644 index ace2d72d9d3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/string.json +++ /dev/null @@ -1 +0,0 @@ -"string" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json deleted file mode 100644 index 27ba77ddaf6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/true.json +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json deleted file mode 100644 index 088d9823587..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/utf-8.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "data": "śćążź", - "comment": "The data above are five Polish letters, similar to scazz. It can be read correctly only with utf-8 encoding." -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html deleted file mode 100644 index 89ccc59817d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html +++ /dev/null @@ -1,46 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>JSON modules: Content-Type</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script> -function check(t, v) { - t.step(() => { - assert_equals(typeof v, "object"); - assert_array_equals(Object.keys(v), ["test"]); - assert_equals(v.test, true); - t.done(); - }); -} -const t1 = async_test("text/json"); -const t2 = async_test("application/json"); -const t3 = async_test("text/html+json"); -const t4 = async_test("image/svg+json"); -const t5 = async_test("text/json;boundary=something"); -const t6 = async_test("text/json;foo=bar"); -</script> -<script type="module" onerror="t1.step(() => assert_unreached(event))"> -import v from "../serve-with-content-type.py?fn=json-module/module.json&ct=text/json" assert { type: "json"}; -check(t1, v); -</script> -<script type="module" onerror="t2.step(() => assert_unreached(event))"> -import v from "../serve-with-content-type.py?fn=json-module/module.json&ct=application/json" assert { type: "json"}; -check(t2, v); -</script> -<script type="module" onerror="t3.step(() => assert_unreached(event))"> -import v from "../serve-with-content-type.py?fn=json-module/module.json&ct=text/html%2Bjson" assert { type: "json"}; -check(t3, v); -</script> -<script type="module" onerror="t4.step(() => assert_unreached(event))"> -import v from "../serve-with-content-type.py?fn=json-module/module.json&ct=image/svg%2Bjson" assert { type: "json"}; -check(t4, v); -</script> -<script type="module" onerror="t5.step(() => assert_unreached(event))"> -import v from "../serve-with-content-type.py?fn=json-module/module.json&ct=text/json;boundary=something" assert { type: "json"}; -check(t5, v); -</script> -<script type="module" onerror="t6.step(() => assert_unreached(event))"> -import v from "../serve-with-content-type.py?fn=json-module/module.json&ct=text/json;foo=bar" assert { type: "json"}; -check(t6, v); -</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json deleted file mode 100644 index 490e752ce93..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/windows-1250.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "data": "�湿�", - "comment": "The data above are five Polish letters, similar to scazz. It can be read correctly only with windows1250 encoding." -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-1.html deleted file mode 100644 index 45571550e1c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-1.html +++ /dev/null @@ -1,68 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for classic scripts</title> -<!-- For module scripts see module/load-error-events*.html --> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -</head> -<script> -"use strict"; -var test1_load = event_test('src, 200, parser-inserted, defer, no async', true, false); -var test2_load = event_test('src, 200, parser-inserted, no defer, no async', true, false); -var test4_load = event_test('src, 200, parser-inserted, no defer, async', true, false); - -var test3_dynamic_load = event_test('src, 200, not parser-inserted, no defer, no async, no non-blocking', true, false); -var test4_dynamic_load = event_test('src, 200, not parser-inserted, no defer, async', true, false); - -var test1_error = event_test('src, 404, parser-inserted, defer, no async', false, true); -var test2_error = event_test('src, 404, parser-inserted, no defer, no async', false, true); -var test4_error = event_test('src, 404, parser-inserted, no defer, async', false, true); - -var test3_dynamic_error = event_test('src, 404, not parser-inserted, no defer, no async, no non-blocking', false, true); -var test4_dynamic_error = event_test('src, 404, not parser-inserted, no defer, async', false, true); - -var test6_load = event_test('no src, parser-inserted, no style sheets blocking scripts', false, false); - -var script3_dynamic_load = document.createElement('script'); -script3_dynamic_load.onload = () => onLoad(test3_dynamic_load); -script3_dynamic_load.onerror = () => onError(test3_dynamic_load); -script3_dynamic_load.async = false; -script3_dynamic_load.src = "resources/load-error-events.py?test=test3_dynamic_load"; -document.head.appendChild(script3_dynamic_load); - -var script3_dynamic_error = document.createElement('script'); -script3_dynamic_error.onload = () => onLoad(test3_dynamic_error); -script3_dynamic_error.onerror = () => onError(test3_dynamic_error); -script3_dynamic_error.async = false; -script3_dynamic_error.src = "resources/load-error-events.py?test=test3_dynamic_error"; -document.head.appendChild(script3_dynamic_error); - -var script4_dynamic_load = document.createElement('script'); -script4_dynamic_load.onload = () => onLoad(test4_dynamic_load); -script4_dynamic_load.onerror = () => onError(test4_dynamic_load); -script4_dynamic_load.async = true; -script4_dynamic_load.src = "resources/load-error-events.py?test=test4_dynamic_load"; -document.head.appendChild(script4_dynamic_load); - -var script4_dynamic_error = document.createElement('script'); -script4_dynamic_error.onload = () => onLoad(test4_dynamic_error); -script4_dynamic_error.onerror = () => onError(test4_dynamic_error); -script4_dynamic_error.async = true; -script4_dynamic_error.src = "resources/load-error-events.py?test=test4_dynamic_error"; -document.head.appendChild(script4_dynamic_error); -</script> - -<script src="resources/load-error-events.py?test=test1_load" onload="onLoad(test1_load);" onerror="onError(test1_load);" defer></script> -<script src="resources/load-error-events.py?test=test2_load" onload="onLoad(test2_load);" onerror="onError(test2_load);"></script> -<script src="resources/load-error-events.py?test=test4_load" onload="onLoad(test4_load);" onerror="onError(test4_load);" async></script> -<script src="resources/load-error-events.py?test=test1_error" onload="onLoad(test1_error);" onerror="onError(test1_error);" defer></script> -<script src="resources/load-error-events.py?test=test2_error" onload="onLoad(test2_error);" onerror="onError(test2_error);"></script> -<script src="resources/load-error-events.py?test=test4_error" onload="onLoad(test4_error);" onerror="onError(test4_error);" async></script> - -<script onload="onLoad(test6_load);" onerror="onError(test6_load);"> -"use strict"; -onExecute(test6_load); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html deleted file mode 100644 index 0748b459092..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for classic scripts with a style sheet that is blocking scripts</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script> -"use strict"; -var test5_load = event_test('no src, parser-inserted, has style sheets blocking scripts, script nesting level == 1', false, false); -</script> - -<link rel="stylesheet" href="/common/slow.py"></link> -<!-- This is testing the case where an inline classic script is inserted -by parser while there is an loading stylesheet. Therefore, it is critical to -place a <link rel="stylesheet"> just above the <script> to be tested. --> -<script onload="onLoad(test5_load);" onerror="onError(test5_load);"> -"use strict"; -onExecute(test5_load); -</script> -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html deleted file mode 100644 index 83a752ce2cd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for classic scripts with a style sheet that is blocking scripts and script nesting level > 1</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -</head> -<script> -"use strict"; -var test6_load = event_test('no src, parser-inserted, has style sheets blocking scripts, script nesting level == 2', - false, false); - -document.write( - `<link rel="stylesheet" href="/common/slow.py"></link> - <script onload="onLoad(test6_load);" - onerror="onError(test6_load);"> - "use strict"; - onExecute(test6_load); - </scr` + `ipt>`); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/log.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/log.py deleted file mode 100644 index 2a6cc330296..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/log.py +++ /dev/null @@ -1,13 +0,0 @@ -import time - -def main(request, response): - response.headers.append(b"Content-Type", b"text/javascript") - try: - script_id = int(request.GET.first(b"id")) - delay = int(request.GET.first(b"sec")) - except: - response.set_error(400, u"Invalid parameter") - - time.sleep(int(delay)) - - return u"log('%s')" % script_id diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-window-onerror-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-window-onerror-module.html deleted file mode 100644 index 728ce32c38c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-window-onerror-module.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<head> - <meta charset="utf-8"> - <title>Microtask checkpoint after window.onerror events (module)</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/checkpoint-after-error-event.js" type="module"></script> - <script type="module">self.postMessage("foo");</script> -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-window-onerror.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-window-onerror.html deleted file mode 100644 index 72a197ca6ab..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-window-onerror.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<head> - <meta charset="utf-8"> - <title>Microtask checkpoint after window.onerror events (classic)</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/checkpoint-after-error-event.js"></script> - <script>self.postMessage("foo");</script> -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module.html deleted file mode 100644 index ff2b5d49432..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<head> - <meta charset="utf-8"> - <title>Microtask checkpoint after window.onerror events (module)</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script> - const worker = new Worker( - "resources/checkpoint-after-error-event-worker-module.js", - {type: "module"}); - fetch_tests_from_worker(worker); - worker.postMessage("foo"); - </script> -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror.html deleted file mode 100644 index 1932c7183bb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror.html +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE html> -<head> - <meta charset="utf-8"> - <title>Microtask checkpoint after window.onerror events (module)</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script> - const worker = new Worker( - "resources/checkpoint-after-error-event-worker.js"); - fetch_tests_from_worker(worker); - worker.postMessage("foo"); - </script> -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-importScripts.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-importScripts.any.js deleted file mode 100644 index 8791a099b6e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-importScripts.any.js +++ /dev/null @@ -1,40 +0,0 @@ -// META: global=dedicatedworker,sharedworker - -// The `then` handlers for `Promise.resolve()` are evaluated in the first -// microtasks checkpoint after `Promise.resolve()`. - -// ---------------------------------------------------------------- -// Check when microtasks checkpoint is performed around importScripts(). - -// The expectation is: the `then` handlers are evaluated after the script -// calling importScripts() is finished, not immediately after importScripts(). -// Although #clean-up-after-running-script is executed as a part of -// #run-a-classic-script for importScripts()ed scripts, but at that time -// microtasks checkpoint is NOT performed because JavaScript execution context -// stack is not empty. - -self.log = []; - -// Microtasks should be executed before -// #run-a-classic-script/#run-a-module-script is completed, and thus before -// script evaluation scheduled by setTimeout(). -async_test(t => { - self.addEventListener('error', - t.unreached_func('error event should not be fired')); - - t.step_timeout(() => { - assert_array_equals(log, [ - 'importScripts()ed script', - 'catch', - 'promise' - ]); - t.done(); - }, - 0); -}, "Promise resolved during importScripts()"); - -try { - importScripts('resources/resolve-then-throw.js'); -} catch (e) { - self.log.push('catch'); -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-nothrow-importScripts.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-nothrow-importScripts.any.js deleted file mode 100644 index bacfc9fd04b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-nothrow-importScripts.any.js +++ /dev/null @@ -1,11 +0,0 @@ -// META: global=dedicatedworker,sharedworker -// META: script=./resources/evaluation-order-setup.js - -// Spec: https://html.spec.whatwg.org/C/#run-a-classic-script -// called from https://html.spec.whatwg.org/C/#import-scripts-into-worker-global-scope -setupTest("importScripts() queueing a microtask then throwing an exception", [ - "body", - "microtask", -]); - -importScripts('./resources/evaluation-order-1-nothrow.js'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-nothrow-static-import.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-nothrow-static-import.any.js deleted file mode 100644 index 006eab7a7e0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-nothrow-static-import.any.js +++ /dev/null @@ -1,5 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module -// META: script=./resources/evaluation-order-setup.js - -import './resources/evaluation-order-1-nothrow-setup.js'; -import './resources/evaluation-order-1-nothrow.js'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js deleted file mode 100644 index 0b42ea1e501..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-importScripts.any.js +++ /dev/null @@ -1,22 +0,0 @@ -// META: global=dedicatedworker,sharedworker -// META: script=./resources/evaluation-order-setup.js - -// Spec: https://html.spec.whatwg.org/C/#run-a-classic-script -// called from https://html.spec.whatwg.org/C/#import-scripts-into-worker-global-scope -setupTest("importScripts() queueing a microtask then throwing an exception", [ - // Step 6 of #run-a-classic-script. - "body", - - // Step 7.1.1 ("Clean up after running script") is no-op because JavaScript - // execution context stack is still non-empty immediately after - // importScripts() as the outer script is still executing. - - // Step 7.1.2 (Rethrowing an exception) causes worker onerror. - "global-error", - - // Microtask checkpoint is performed later, perhaps - // "Clean up after running script" after the outer script is finished. - "microtask", -]); - -importScripts('./resources/evaluation-order-1-throw.js'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-static-import.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-static-import.any.js deleted file mode 100644 index f6cc427c719..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1-throw-static-import.any.js +++ /dev/null @@ -1,5 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module -// META: script=./resources/evaluation-order-setup.js - -import './resources/evaluation-order-1-throw-setup.js'; -import './resources/evaluation-order-1-throw.js'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1.html deleted file mode 100644 index 4800ef81bc0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-1.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/evaluation-order-setup.js"></script> - -<script> -// Spec: https://html.spec.whatwg.org/C/#run-a-classic-script -setupTest("Classic script queueing a microtask then throwing an exception", [ - "body", // Step 6. - "global-error", // "Report the exception" at Step 7.3. - "microtask", // "Clean up after running script" at Step 7.2. - ]); -</script> -<script src="resources/evaluation-order-1-throw.js" - onerror="unreachable()" onload="testDone()"></script> - -<script> -// Spec: https://html.spec.whatwg.org/C/#run-a-classic-script -setupTest("Classic script queueing a microtask", [ - "body", // Step 6. - "microtask", // "Clean up after running script" at Step 7.2. - ]); -</script> -<script src="resources/evaluation-order-1-nothrow.js" - onerror="unreachable()" onload="testDone()"></script> - - -<script type="module" src="resources/evaluation-order-1-throw-setup.js"></script> -<script type="module" src="resources/evaluation-order-1-throw.js" - onerror="unreachable()" onload="testDone()"></script> - -<script type="module" src="resources/evaluation-order-1-nothrow-setup.js"></script> -<script type="module" src="resources/evaluation-order-1-nothrow.js" - onerror="unreachable()" onload="testDone()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-2.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-2.any.js deleted file mode 100644 index bbc64748235..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-2.any.js +++ /dev/null @@ -1,5 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module -// META: script=./resources/evaluation-order-setup.js - -import './resources/evaluation-order-2-setup.js'; -import './resources/evaluation-order-2.1.mjs'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-2.html deleted file mode 100644 index e55c2ecbed4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-2.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/evaluation-order-setup.js"></script> - -<script type="module" src="resources/evaluation-order-2-setup.js"></script> -<script type="module" src="resources/evaluation-order-2.1.mjs" - onerror="unreachable()" onload="testDone()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-3.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-3.any.js deleted file mode 100644 index 19e94714e5d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-3.any.js +++ /dev/null @@ -1,5 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module -// META: script=./resources/evaluation-order-setup.js - -import './resources/evaluation-order-3-setup.js'; -import './resources/evaluation-order-3.1.mjs'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-3.html deleted file mode 100644 index ef351acd288..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-3.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/evaluation-order-setup.js"></script> - -<script type="module" src="resources/evaluation-order-3-setup.js"></script> -<script type="module" src="resources/evaluation-order-3.1.mjs" - onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-4.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-4.html deleted file mode 100644 index f27678439df..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/evaluation-order-4.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/evaluation-order-setup.js"></script> - -<script> -// Spec: https://html.spec.whatwg.org/C/#run-a-module-script -setupTest("Module script queueing a microtask then top-level await", [ - "step-4.1-1", "step-4.1-2", - "microtask-4.1", - "script-load", - "step-4.2-1", "step-4.2-2", - "microtask-4.2", -]); -window.onerror = testDone; -</script> -<script type="module" src="resources/evaluation-order-4.1.mjs" - onerror="unreachable()" onload="log.push('script-load')"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event-worker-module.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event-worker-module.js deleted file mode 100644 index b9ae7142d50..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event-worker-module.js +++ /dev/null @@ -1,2 +0,0 @@ -import "/resources/testharness.js"; -import "./checkpoint-after-error-event.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event-worker.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event-worker.js deleted file mode 100644 index 4694db1e445..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event-worker.js +++ /dev/null @@ -1,2 +0,0 @@ -importScripts("/resources/testharness.js"); -importScripts("checkpoint-after-error-event.js"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event.js deleted file mode 100644 index 1a2b9404a7e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/checkpoint-after-error-event.js +++ /dev/null @@ -1,89 +0,0 @@ -// The `then` handlers for `Promise.resolve()` are evaluated in the first -// microtasks checkpoint after `Promise.resolve()`. - -self.setup({allow_uncaught_exception: true}); - -// ---------------------------------------------------------------- -// Check when microtasks checkpoint is performed -// - Around `self`'s error event fired via -// https://html.spec.whatwg.org/C/#report-the-error during -// - https://html.spec.whatwg.org/C/#run-a-classic-script or -// - https://html.spec.whatwg.org/C/#run-a-module-script. - -// The expectation is: the `then` handlers are evaluated after all error event -// handlers are evaluated, not after each error event handler. - -// Just after each event handler is invoked, -// https://webidl.spec.whatwg.org/#call-a-user-objects-operation -// calls #clean-up-after-running-script, but this doesn't execute new -// microtasks immediately, because: -// - Before https://github.com/whatwg/html/pull/4352: -// #report-the-error is called before #clean-up-after-running-script by -// #run-a-classic-script/#run-a-module-script, so microtask checkpoint -// is not performed because JavaScript execution context stack is not empty. -// - After https://github.com/whatwg/html/pull/4352: -// #report-the-error is called during #perform-a-microtask-checkpoint (because -// it is called on rejection of promises), so #perform-a-microtask-checkpoint -// is executed but early exited. -self.log = []; - -self.addEventListener('error', () => { - log.push('handler 1'); - Promise.resolve().then(() => log.push('handler 1 promise')); -}); -self.addEventListener('error', () => { - log.push('handler 2'); - Promise.resolve().then(() => log.push('handler 2 promise')); -}); - -// Microtasks should be executed before -// #run-a-classic-script/#run-a-module-script is completed, and thus before -// script evaluation scheduled by setTimeout(). -async_test(t => { - t.step_timeout(() => { - assert_array_equals(log, [ - 'handler 1', - 'handler 2', - 'handler 1 promise', - 'handler 2 promise' - ]); - t.done(); - }, - 0); -}, "Promise resolved during #report-the-error"); - -// ---------------------------------------------------------------- -// Check when microtasks checkpoint is performed -// around event events other than the `self` error event cases above. -// In this case, microtasks are executed just after each event handler is -// invoked via #clean-up-after-running-script called from -// https://webidl.spec.whatwg.org/#call-a-user-objects-operation, -// because the event handlers are executed outside the -// #prepare-to-run-script/#clean-up-after-running-script scopes in -// #run-a-classic-script/#run-a-module-script. -self.log2 = []; -self.t2 = async_test( - "Promise resolved during event handlers other than error"); - -self.addEventListener('message', () => { - log2.push('handler 1'); - Promise.resolve().then(() => log2.push('handler 1 promise')); -}); -self.addEventListener('message', () => { - log2.push('handler 2'); - Promise.resolve().then(t2.step_func_done(() => { - log2.push('handler 2 promise'); - assert_array_equals(log2, [ - 'handler 1', - 'handler 1 promise', - 'handler 2', - 'handler 2 promise' - ]); - })); -}); - -// ---------------------------------------------------------------- - -done(); - -throw new Error('script 1'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-nothrow-setup.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-nothrow-setup.js deleted file mode 100644 index 1b42e995937..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-nothrow-setup.js +++ /dev/null @@ -1,5 +0,0 @@ -// Spec: https://html.spec.whatwg.org/C/#run-a-module-script -setupTest("Module script queueing a microtask", [ - "body", // Step 6. - "microtask", // "Clean up after running script" at Step 8. -]); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-nothrow.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-nothrow.js deleted file mode 100644 index e19d9b1b137..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-nothrow.js +++ /dev/null @@ -1,2 +0,0 @@ -queueMicrotask(() => globalThis.log.push("microtask")); -globalThis.log.push("body"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-throw-setup.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-throw-setup.js deleted file mode 100644 index 651a494e530..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-throw-setup.js +++ /dev/null @@ -1,10 +0,0 @@ -// Spec: https://html.spec.whatwg.org/C/#run-a-module-script -setupTest("Module script queueing a microtask then throwing an exception", [ - "body", // Step 6. - "microtask", // "Clean up after running script" at Step 8. - "global-error", // "Clean up after running script" at Step 8, because - // `evaluationPromise` is synchronously rejected and the rejection is - // processed in the microtask checkpoint here (See also Step 7). - // As `evaluationPromise` is rejected after the microtask queued during - // evaluation, "global-error" occurs after "microtask". -]); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-throw.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-throw.js deleted file mode 100644 index 2451df1c155..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-1-throw.js +++ /dev/null @@ -1,4 +0,0 @@ -queueMicrotask(() => globalThis.log.push("microtask")); -globalThis.log.push("body"); - -throw new Error("error"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2-setup.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2-setup.js deleted file mode 100644 index 46f7354538a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2-setup.js +++ /dev/null @@ -1,10 +0,0 @@ -// Spec: https://html.spec.whatwg.org/C/#run-a-module-script -setupTest("Module script queueing a microtask then throwing an exception", [ - "step-2.2-1", "step-2.2-2", // Step 6. - "microtask-2.2", // "Clean up after running script" at Step 8. - "global-error", // "Clean up after running script" at Step 8, - // because `evaluationPromise` is synchronously rejected and the rejection - // is processed in the microtask checkpoint here (See also Step 7). - // As `evaluationPromise` is rejected after the microtask queued during - // evaluation, "global-error" occurs after "microtask". -]); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2.1.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2.1.mjs deleted file mode 100644 index d6c2afa2f72..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2.1.mjs +++ /dev/null @@ -1,8 +0,0 @@ -globalThis.log.push("step-2.1-1"); -queueMicrotask(() => globalThis.log.push("microtask-2.1")); -globalThis.log.push("step-2.1-2"); - -// import is evaluated first. -import "./evaluation-order-2.2.mjs"; - -globalThis.log.push("step-2.1-3"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2.2.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2.2.mjs deleted file mode 100644 index 5c67c4f9a25..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-2.2.mjs +++ /dev/null @@ -1,7 +0,0 @@ -globalThis.log.push("step-2.2-1"); -queueMicrotask(() => globalThis.log.push("microtask-2.2")); -globalThis.log.push("step-2.2-2"); - -globalThis.test_load.step_timeout(() => globalThis.testDone(), 0); - -throw new Error("error"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3-setup.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3-setup.js deleted file mode 100644 index edc046910e4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3-setup.js +++ /dev/null @@ -1,7 +0,0 @@ -setupTest("Module script queueing a microtask then throwing an exception", [ - "step-3.1-1", "step-3.1-2", "step-3.1-3", - "microtask-3.1", - "step-3.2-1", "step-3.2-2", - "microtask-3.2", - "import-catch", "error", -]); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3.1.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3.1.mjs deleted file mode 100644 index ef320632af7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3.1.mjs +++ /dev/null @@ -1,11 +0,0 @@ -globalThis.log.push("step-3.1-1"); -queueMicrotask(() => globalThis.log.push("microtask-3.1")); -globalThis.log.push("step-3.1-2"); - -import("./evaluation-order-3.2.mjs").catch( - exception => { - globalThis.log.push("import-catch", exception.message); - globalThis.testDone(); - }); - -globalThis.log.push("step-3.1-3"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3.2.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3.2.mjs deleted file mode 100644 index 8ccb5812066..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-3.2.mjs +++ /dev/null @@ -1,5 +0,0 @@ -globalThis.log.push("step-3.2-1"); -queueMicrotask(() => globalThis.log.push("microtask-3.2")); -globalThis.log.push("step-3.2-2"); - -throw new Error("error"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-4.1.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-4.1.mjs deleted file mode 100644 index f3347c1d28e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-4.1.mjs +++ /dev/null @@ -1,8 +0,0 @@ -log.push("step-4.1-1"); -queueMicrotask(() => log.push("microtask-4.1")); -log.push("step-4.1-2"); - -await import("./evaluation-order-4.2.mjs"); - -// Not happening as we throw in the above module. -log.push("step-4.1-3"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-4.2.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-4.2.mjs deleted file mode 100644 index 96a5cca3a63..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-4.2.mjs +++ /dev/null @@ -1,5 +0,0 @@ -log.push("step-4.2-1"); -queueMicrotask(() => log.push("microtask-4.2")); -log.push("step-4.2-2"); - -throw new Error("error"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-setup.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-setup.js deleted file mode 100644 index d2e28935c43..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/evaluation-order-setup.js +++ /dev/null @@ -1,30 +0,0 @@ -globalThis.setup({allow_uncaught_exception: true}); - -// Must be called after previous tests are completed. -globalThis.setupTest = (description, expectedLog) => { - globalThis.log = []; - globalThis.onerror = message => { - globalThis.log.push("global-error"); - return true; - }; - globalThis.onunhandledrejection = - () => globalThis.log.push('unhandled-promise-rejection'); - - globalThis.unreachable = () => globalThis.log.push("unreachable"); - - globalThis.test_load = async_test(description); - globalThis.testDone = globalThis.test_load.step_func_done(() => { - assert_array_equals(globalThis.log, expectedLog); - }); - - if (!('Window' in globalThis && globalThis instanceof Window)) { - // In workers, there are no <script> load event, so scheduling `testDone()` - // here, assuming the target script is loaded and evaluated soon. - globalThis.test_load.step_timeout(() => globalThis.testDone(), 1000); - - // In workers, call `done()` here because the auto-generated `done()` calls - // by `any.js` etc. are at the end of main script and thus are not - // evaluated when the target script throws an exception. - done(); - } -}; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/resolve-then-throw.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/resolve-then-throw.js deleted file mode 100644 index a841eb780a0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/resources/resolve-then-throw.js +++ /dev/null @@ -1,3 +0,0 @@ -self.log.push('importScripts()ed script'); -Promise.resolve().then(() => self.log.push('promise')); -throw new Error('foo'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js deleted file mode 100644 index a53a3bebe71..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js +++ /dev/null @@ -1,3 +0,0 @@ -import "string-without-dot-slash-prefix"; -import "./this.js"; -log.push("bad-module-specifier"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-01.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-01.html deleted file mode 100644 index 7cd49163097..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-01.html +++ /dev/null @@ -1,52 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Root module scripts should always use UTF-8</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module" src="../serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript&dummy=1"></script> -<script type="module"> -test(function() { - assert_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'UTF-8 module script'); -</script> - -<script type="module" src="../serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript&dummy=2" charset="windows-1250"></script> -<script type="module"> -test(function() { - assert_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'UTF-8 module script with wrong charset in attribute'); -</script> - -<script type="module" src="../serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript%3Bcharset=windows-1250&dummy=3"></script> -<script type="module"> -test(function() { - assert_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'UTF-8 module script with wrong charset in Content-Type'); -</script> - -<script type="module" src="../serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript&dummy=1"></script> -<script type="module"> -test(function() { - assert_not_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'Non-UTF-8 module script'); -</script> - -<script type="module" src="../serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript&dummy=2" charset="windows-1250"></script> -<script type="module"> -test(function() { - assert_not_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'Non-UTF-8 module script with charset in attribute'); -</script> - -<script type="module" src="../serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript%3Bcharset=windows-1250"></script> -<script type="module"> -test(function() { - assert_not_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'Non-UTF-8 module script with charset in Content-Type'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-02.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-02.html deleted file mode 100644 index c7c4517ad3a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-02.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<title>Module scripts should ignore BOMs and always use UTF-8</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -setup({allow_uncaught_exception: true}); -</script> -<script type="module" src="../serve-with-content-type.py?fn=resources/bom-utf-8.js&ct=text/javascript"></script> -<script type="module" src="../serve-with-content-type.py?fn=resources/bom-utf-16be.js&ct=text/javascript"></script> -<script type="module" src="../serve-with-content-type.py?fn=resources/bom-utf-16le.js&ct=text/javascript"></script> -<script type="module"> -test(function() { - assert_equals(window.executed_utf8_bom, '\u4e09\u6751\u304b\u306a\u5b50', - 'Should be decoded as UTF-8'); -}, 'UTF-8 module script with UTF-8 BOM'); - -test(function() { - assert_equals(window.executed_utf16be_bom, undefined, - 'Should result in compile error because of UTF-16BE BOM'); -}, 'UTF-16 module script with UTF-16BE BOM'); - -test(function() { - assert_equals(window.executed_utf16le_bom, undefined, - 'Should result in compile error because of UTF-16LE BOM'); -}, 'UTF-16 module script with UTF-16LE BOM'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-03.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-03.html deleted file mode 100644 index 666cb2e68be..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-03.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Imported module scripts should always use UTF-8</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script type="module" src="resources/import-utf8.js"></script> -<script type="module"> -test(function() { - assert_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'UTF-8 imported module script'); -</script> - -<script type="module" src="resources/import-utf8-with-charset-header.js"></script> -<script type="module"> -test(function() { - assert_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'UTF-8 imported module script with wrong charset in Content-Type'); -</script> - -<script type="module" src="resources/import-non-utf8.js"></script> -<script type="module"> -test(function() { - assert_not_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'Non-UTF-8 imported module script'); -</script> - -<script type="module" src="resources/import-non-utf8-with-charset-header.js"></script> -<script type="module"> -test(function() { - assert_not_equals(window.getSomeString(), "śćążź", - 'Should be decoded as UTF-8'); -}, 'Non-UTF-8 imported module script with charset in Content-Type'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html deleted file mode 100644 index 50933da2c1d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<title>Choice of parse errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Parse errors in different files should be reported " + - "depending on different roots"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 4); - - // Two different parse errors from different module scripts - // should be reported for each <script> element. - assert_equals(log[0].constructor, SyntaxError); - assert_equals(log[1], 1); - - assert_equals(log[2].constructor, SyntaxError); - assert_equals(log[3], 2); - - assert_not_equals(log[0], log[2], - 'two different parse errors should be reported'); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./choice-of-error-1a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./choice-of-error-1b.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1a.js deleted file mode 100644 index f479e5e1fac..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1a.js +++ /dev/null @@ -1,2 +0,0 @@ -import './choice-of-error-1b.js'; -import './syntaxerror.js?1c'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1b.js deleted file mode 100644 index 257f4a46784..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-1b.js +++ /dev/null @@ -1,2 +0,0 @@ -import './choice-of-error-1a.js'; -import './syntaxerror.js?1d'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2.html deleted file mode 100644 index 51adb09d11a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<title>Choice of instantiation errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Instantiation errors in different files should be reported " + - "depending on different roots"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 4); - - // Two different instantiation errors from different module scripts - // should be reported for each <script> element. - assert_equals(log[0].constructor, SyntaxError); - assert_equals(log[1], 1); - - assert_equals(log[2].constructor, SyntaxError); - assert_equals(log[3], 2); - - assert_not_equals(log[0], log[2], - 'two different instantiation errors should be reported'); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./choice-of-error-2a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./choice-of-error-2b.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2a.js deleted file mode 100644 index 2dc7aac11a8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2a.js +++ /dev/null @@ -1,2 +0,0 @@ -import './choice-of-error-2b.js'; -import './instantiation-error-1.js?2c'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2b.js deleted file mode 100644 index 2adb9eea597..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2b.js +++ /dev/null @@ -1,2 +0,0 @@ -import './choice-of-error-2a.js'; -import './instantiation-error-1.js?2d'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3.html deleted file mode 100644 index bc52119bfe4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3.html +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE html> -<title>Choice of evaluation errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Evaluation errors are cached in intermediate module scripts"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 5); - - // Evaluation errors, unlike parse/instantiation errors, are remembered - // and cached in module scripts between the root and the script that - // caused an evaluation error, and thus the same evaluation error - // is reported for both <script> elements. - assert_equals(log[0], "throw2"); - assert_true(log[1].bar); - assert_equals(log[2], 1); - - assert_true(log[3].bar); - assert_equals(log[4], 2); - - assert_equals(log[1], log[3], 'evaluation errors must be the same'); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./choice-of-error-3a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./choice-of-error-3b.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3a.js deleted file mode 100644 index 71154674a34..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3a.js +++ /dev/null @@ -1,2 +0,0 @@ -import './choice-of-error-3b.js'; -import './throw.js?3c'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3b.js deleted file mode 100644 index 2131a35eff1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-3b.js +++ /dev/null @@ -1,2 +0,0 @@ -import './choice-of-error-3a.js'; -import './throw2.js?3d'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-1.html deleted file mode 100644 index ff580d4899a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-1.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<title>Handling of compilation errors, 1</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that syntax errors lead to SyntaxError events on window, " + - "and that exceptions are remembered."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 5); - assert_equals(log[0].constructor, SyntaxError); - assert_true(log.every(exn => exn === log[0])); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-2.html deleted file mode 100644 index 131a6e439fd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-2.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<title>Handling of compilation errors, 2</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that syntax errors lead to SyntaxError events on window, " + - "and that exceptions are remembered."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 5); - assert_equals(log[0].constructor, SyntaxError); - assert_true(log.every(exn => exn === log[0])); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></script> -<script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html deleted file mode 100644 index 983961ae44c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html +++ /dev/null @@ -1,68 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -document.cookie = 'same=1'; - -const setCookiePromise = fetch( - 'http://{{domains[www2]}}:{{ports[http][0]}}/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/', - { - mode: 'no-cors', - credentials: 'include', - }); - -const windowLoadPromise = new Promise(resolve => { - window.addEventListener('load', () => { - resolve(); - }); -}); - -promise_test(t => { - const iframe = document.createElement('iframe'); - - return Promise.all([setCookiePromise, windowLoadPromise]).then(() => { - const messagePromise = new Promise(resolve => { - window.addEventListener('message', event => { - resolve(); - }); - }); - - iframe.src = 'resources/credentials-iframe.sub.html'; - document.body.appendChild(iframe); - - return messagePromise; - }).then(() => { - const w = iframe.contentWindow; - - assert_equals(w.sameOriginNone, 'found', - 'Modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin'); - assert_equals(w.sameOriginAnonymous, 'found', - 'Modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin'); - assert_equals(w.sameOriginUseCredentials, 'found', - 'Modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin'); - assert_equals(w.crossOriginNone, 'not found', - 'Modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin'); - assert_equals(w.crossOriginAnonymous, 'not found', - 'Modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin'); - assert_equals(w.crossOriginUseCredentials, 'found', - 'Modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin'); - - assert_equals(w.sameOriginNoneDescendant, 'found', - 'Descendant modules should be loaded with the credentials when the crossOrigin attribute is not specified and the target is same-origin'); - assert_equals(w.sameOriginAnonymousDescendant, 'found', - 'Descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is same-origin'); - assert_equals(w.sameOriginUseCredentialsDescendant, 'found', - 'Descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is same-origin'); - assert_equals(w.crossOriginNoneDescendant, 'not found', - 'Descendant modules should not be loaded with the credentials when the crossOrigin attribute is not specified and the target is cross-origin'); - assert_equals(w.crossOriginAnonymousDescendant, 'not found', - 'Descendant modules should not be loaded with the credentials when the crossOrigin attribute is specified with "anonymous" as its value and the target is cross-origin'); - assert_equals(w.crossOriginUseCredentialsDescendant, 'found', - 'Descendant modules should be loaded with the credentials when the crossOrigin attribute is specified with "use-credentials" as its value and the target is cross-origin'); -}); -}, 'Modules should be loaded with or without the credentials based on the same-origin-ness and the crossOrigin attribute'); -</script> -<body> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-common.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-common.js deleted file mode 100644 index 59bf0fd42fc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-common.js +++ /dev/null @@ -1,8 +0,0 @@ -document._log = []; -window.addEventListener("error", function (ev) { - var errorSerialized = ev.lineno + "-" + ev.colno; - document._log.push(errorSerialized); -}); -window.addEventListener("load", function () { - document._log = document._log.join(","); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-different.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-different.sub.html deleted file mode 100644 index 8eb3292e89a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-different.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-import-NoCORS</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-import-NoCORS</h1> - <script type="module" onerror="document._log.push('error');"> - - import { foo } from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js"; - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-missingheader.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-missingheader.sub.html deleted file mode 100644 index cccb30f7188..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-missingheader.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-BlockedMissingHeader</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-BlockedMissingHeader</h1> - <script type="module" onerror="document._log.push('error');" crossorigin> - - import { foo } from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js"; - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-same.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-same.sub.html deleted file mode 100644 index 84f4de1d7e0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-same.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-WithCORS</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-WithCORS</h1> - <script type="module" crossorigin> - - import { foo } from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js?pipe=header(Access-Control-Allow-Origin,*)"; - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-wrongheader.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-wrongheader.sub.html deleted file mode 100644 index 5743a9e3042..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-wrongheader.sub.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-BlockedWrongHeader</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-BlockedWrongHeader</h1> - <script type="module" onerror="document._log.push('error');" crossorigin> - - import { foo } from "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js?pipe=header(Access-Control-Allow-Origin,http://{{domains[www2]}}:{{ports[http][0]}})"; - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-different.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-different.sub.html deleted file mode 100644 index 54d4354c53f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-different.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-NoCORS</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-NoCORS</h1> - <script type="module" src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js" onerror="document._log.push('error');"></script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-missingheader.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-missingheader.sub.html deleted file mode 100644 index 03943002ba3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-missingheader.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-BlockedMissingHeader</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-BlockedMissingHeader</h1> - <script type="module" src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js" onerror="document._log.push('error');" crossorigin></script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-same.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-same.sub.html deleted file mode 100644 index 3ec839e9a90..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-same.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-WithCORS</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-WithCORS</h1> - <script type="module" src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js?pipe=header(Access-Control-Allow-Origin,*)" crossorigin></script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-wrongheader.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-wrongheader.sub.html deleted file mode 100644 index c45736a896b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-wrongheader.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-crossOrigin-root-BlockedWrongHeader</title> - <script src="crossorigin-common.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin-root-BlockedWrongHeader</h1> - <script type="module" src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js?pipe=header(Access-Control-Allow-Origin,http://{{domains[www2]}}:{{ports[http][0]}})" onerror="document._log.push('error');" crossorigin></script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js deleted file mode 100644 index 29d04ec6198..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js +++ /dev/null @@ -1,8 +0,0 @@ -export var foo = {}; - -// Push an event to the log indicating that the script was executed. -document._log.push("running"); - -// Deliberately trigger an error to test what details of the error -// the (possibly) cross-origin parent can listen to. -nonExistentMethod(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin.html deleted file mode 100644 index 5c8d6667b05..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin.html +++ /dev/null @@ -1,43 +0,0 @@ -<!doctype html> -<html> -<head> - <title>html-script-module-crossOrigin</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <h1>html-script-module-crossOrigin</h1> - <iframe id="root-WithCORS" src="crossorigin-root-same.sub.html"></iframe> - <iframe id="root-NoCORS" src="crossorigin-root-different.sub.html"></iframe> - <iframe id="root-BlockedMissingHeader" src="crossorigin-root-missingheader.sub.html"></iframe> - <iframe id="root-BlockedWrongHeader" src="crossorigin-root-wrongheader.sub.html"></iframe> - <iframe id="import-WithCORS" src="crossorigin-import-same.sub.html"></iframe> - <iframe id="import-NoCORS" src="crossorigin-import-different.sub.html"></iframe> - <iframe id="import-BlockedMissingHeader" src="crossorigin-import-missingheader.sub.html"></iframe> - <iframe id="import-BlockedWrongHeader" src="crossorigin-import-wrongheader.sub.html"></iframe> - <script> - - var tests = [ - { "obj": async_test("Root module, Error in CORS-same-origin script"), "id": "root-WithCORS", "expected": "running,8-1" }, - { "obj": async_test("Root module, Blocked script download, missing CORS ACAO header"), "id": "root-NoCORS", "expected": "error" }, - { "obj": async_test("Root module, Blocked script download, crossorigin attribute with missing CORS ACAO header"), "id": "root-BlockedMissingHeader", "expected": "error" }, - { "obj": async_test("Root module, Blocked script download, mismatched CORS ACAO header"), "id": "root-BlockedWrongHeader", "expected": "error" }, - { "obj": async_test("Imported module, Error in CORS-same-origin script"), "id": "import-WithCORS", "expected": "running,8-1" }, - { "obj": async_test("Imported module, Blocked script download, missing CORS ACAO header"), "id": "import-NoCORS", "expected": "error" }, - { "obj": async_test("Imported module, Blocked script download, crossorigin attribute with missing CORS ACAO header"), "id": "import-BlockedMissingHeader", "expected": "error" }, - { "obj": async_test("Imported module, Blocked script download, mismatched CORS ACAO header"), "id": "import-BlockedWrongHeader", "expected": "error" }, - ]; - - window.addEventListener("load", function () { - tests.forEach(function (test) { - var target = document.getElementById(test.id); - test.obj.step(function () { - assert_equals(target.contentDocument._log, test.expected, "Unexpected _log value"); - }); - test.obj.done(); - }); - }); - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentScript-null.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentScript-null.html deleted file mode 100644 index 146a9db60de..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentScript-null.html +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module" src="set-currentScript-on-window.js"></script> -<script type="module"> -import { currentScriptOnImportedModule } from "./currentscript.js"; - -test(() => { - assert_equals(document.currentScript, null, "document.currentScript on inline scripts should be null"); - assert_equals(currentScriptOnImportedModule, null, "document.currentScript on imported scripts should be null"); - assert_equals(window.currentScriptRecorded, null, "document.currentScript on external module scripts should be null"); -}, "currentScript on script type=module should be all null"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentscript.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentscript.js deleted file mode 100644 index 547359ff96e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentscript.js +++ /dev/null @@ -1 +0,0 @@ -export let currentScriptOnImportedModule = window.document.currentScript; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/custom-element-exception.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/custom-element-exception.html deleted file mode 100644 index bd77a8f1bba..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/custom-element-exception.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<title>Handling of exceptions in custom element constructors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that exceptions from the constructor of a custom element " + - "inside a module are propagated as expected.\n"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(1, log.length); - const exception = log[0]; - assert_true(exception instanceof Error); - assert_equals(exception.message, "custom element error"); - })); -</script> -<script type="module"> - class XThrower extends HTMLElement { - constructor() { - super(); - throw new Error("custom element error"); - } - } - customElements.define("x-thrower", XThrower); - document.createElement("x-thrower"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js deleted file mode 100644 index 1f91f93eb13..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js +++ /dev/null @@ -1,3 +0,0 @@ -log.push("cycle-tdz-access-a"); -import { Y } from "./cycle-tdz-access.js"; -export var X = Y; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js deleted file mode 100644 index 9df68b3b27d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js +++ /dev/null @@ -1,3 +0,0 @@ -log.push("cycle-tdz-access"); -import { X } from "./cycle-tdz-access-a.js"; -export let Y = X; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js deleted file mode 100644 index 12994f23d0c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js +++ /dev/null @@ -1,2 +0,0 @@ -export {x} from "./cycle-unresolvable.js"; -log.push("cycle-unresolvable-a"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js deleted file mode 100644 index 61c6d8dcb09..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js +++ /dev/null @@ -1,2 +0,0 @@ -export {x} from "./cycle-unresolvable-a.js"; -log.push("cycle-unresolvable"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/duplicated-imports-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/duplicated-imports-1.html deleted file mode 100644 index 57002a3e07e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/duplicated-imports-1.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<title>Importing a module multiple times with the same specifier</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -window.log = []; -</script> -<script type="module"> -import { foo } from './export-something.js'; -import { set_foo } from './export-something.js'; -import default1 from './export-default.js'; -import default2 from './export-default.js'; - -test(() => { - assert_array_equals(log, ['export-something', 'export-default']); - assert_equals(foo, 42); - set_foo(43); - assert_equals(foo, 43); - assert_equals(default1, "fox"); - assert_equals(default2, "fox"); -}, 'Duplicated imports with the same specifier'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/duplicated-imports-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/duplicated-imports-2.html deleted file mode 100644 index 6a01495c333..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/duplicated-imports-2.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<title>Importing a module multiple times with the different specifier</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -window.log = []; -</script> -<script type="module"> -import { foo } from './export-something.js'; -import { set_foo } from '../module/export-something.js'; -import default1 from './export-default.js'; -import default2 from '../module/export-default.js'; - -test(() => { - assert_array_equals(log, ['export-something', 'export-default']); - assert_equals(foo, 42); - set_foo(43); - assert_equals(foo, 43); - assert_equals(default1, "fox"); - assert_equals(default2, "fox"); -}, 'Duplicated imports with the different specifier'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts.html deleted file mode 100644 index 817cf6d5ddf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts.html +++ /dev/null @@ -1,7 +0,0 @@ -<!DOCTYPE html> -<title>Base URLs used in resolving specifiers in dynamic imports from importScripts()</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -fetch_tests_from_worker(new Worker("./worker-importScripts.sub.js")); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub.html deleted file mode 100644 index a12204281cc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<title>Base URLs used in resolving specifiers in dynamic imports from workers</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -fetch_tests_from_worker(new Worker( - "../beta/redirect.py?location=http://{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js")); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url.sub.html deleted file mode 100644 index f7d4927a104..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url.sub.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<title>Base URLs used in resolving specifiers in dynamic imports</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -self.testName = "same origin classic <script>"; -self.baseUrlSanitized = false; -</script> -<script src="../beta/redirect.py?location=http://{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js"></script> - -<script> -self.testName = "cross origin classic <script> without crossorigin attribute"; -self.baseUrlSanitized = true; -</script> -<script src="../beta/redirect.py?location=http://{{hosts[alt][]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js"></script> - -<script> -self.testName = "cross origin classic <script> with crossorigin attribute"; -self.baseUrlSanitized = false; -</script> -<script src="../beta/redirect.py?location=http://{{hosts[alt][]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js%3Fpipe=header(Access-Control-Allow-Origin,*)" crossorigin></script> - -<script> -self.testName = "cross origin module <script>"; -self.baseUrlSanitized = false; -</script> -<script src="../beta/redirect.py?location=http://{{hosts[alt][]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js%3Fpipe=header(Access-Control-Allow-Origin,*)" type="module"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/code-cache.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/code-cache.js deleted file mode 100644 index 8a8530c9b6d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/code-cache.js +++ /dev/null @@ -1,9 +0,0 @@ -promise_test(() => { - return (new Function('w', 'return import(w)'))("./import.js?Function") - .then(module => assert_equals(module.A.from, 'alpha/import.js')); -}, 'alpha - Function'); - -promise_test(() => { - return eval('import("./import.js?eval")') - .then(module => assert_equals(module.A.from, 'alpha/import.js')); -}, 'alpha - eval'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/import.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/import.js deleted file mode 100644 index b2ac52df2a1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/import.js +++ /dev/null @@ -1 +0,0 @@ -export const A = { "from": "alpha/import.js" }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/worker-importScripts.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/worker-importScripts.sub.js deleted file mode 100644 index 904d32f9bfd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/worker-importScripts.sub.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -importScripts("/resources/testharness.js"); - -// CORS-same-origin -self.testName = "same-origin importScripts()"; -self.baseUrlSanitized = false; -importScripts("../beta/redirect.py?location=http://{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js"); - -// CORS-cross-origin -self.testName = "cross-origin importScripts()"; -self.baseUrlSanitized = true; -importScripts("../beta/redirect.py?location=http://{{hosts[alt][]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js"); - -done(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/code-cache.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/code-cache.js deleted file mode 100644 index 1c2a2b636a4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/code-cache.js +++ /dev/null @@ -1,9 +0,0 @@ -promise_test(() => { - return (new Function('w', 'return import(w)'))("./import.js?Function") - .then(module => assert_equals(module.A.from, 'beta/import.js')); -}, 'beta - Function'); - -promise_test(() => { - return eval('import("./import.js?eval")') - .then(module => assert_equals(module.A.from, 'beta/import.js')); -}, 'beta - eval'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/import.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/import.js deleted file mode 100644 index 7de1c681825..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/import.js +++ /dev/null @@ -1 +0,0 @@ -export const A = { "from": "beta/import.js" }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/redirect.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/redirect.py deleted file mode 100644 index f2fd1ebd51d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/beta/redirect.py +++ /dev/null @@ -1,19 +0,0 @@ -def main(request, response): - """Simple handler that causes redirection. - - The request should typically have two query parameters: - status - The status to use for the redirection. Defaults to 302. - location - The resource to redirect to. - """ - status = 302 - if b"status" in request.GET: - try: - status = int(request.GET.first(b"status")) - except ValueError: - pass - - response.status = status - - location = request.GET.first(b"location") - - response.headers.set(b"Location", location) diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url-workers.window.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url-workers.window.js deleted file mode 100644 index 70cb20fa57a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url-workers.window.js +++ /dev/null @@ -1,60 +0,0 @@ -function objectUrlFromModule(module) { - const blob = new Blob([module], { type: "text/javascript" }); - return URL.createObjectURL(blob); -} - -const moduleText = `export const foo = "bar";`; - -async_test((t) => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - t.add_cleanup(() => URL.revokeObjectURL(moduleBlobUrl)); - - const worker = new Worker("./resources/blob-url-worker.js"); - worker.postMessage(moduleBlobUrl); - - worker.addEventListener( - "message", - t.step_func_done((evt) => { - assert_true(evt.data.importSucceeded); - assert_equals(evt.data.module.foo, "bar"); - }) - ); -}, "A blob URL created in a window agent can be imported from a worker"); - -async_test((t) => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - URL.revokeObjectURL(moduleBlobUrl); - - const worker = new Worker("./resources/blob-url-worker.js"); - worker.postMessage(moduleBlobUrl); - - worker.addEventListener( - "message", - t.step_func_done((evt) => { - assert_false(evt.data.importSucceeded); - assert_equals(evt.data.errorName, "TypeError"); - }) - ); -}, "A blob URL revoked in a window agent will not resolve in a worker"); - -promise_test(async (t) => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - - await import(moduleBlobUrl); - - URL.revokeObjectURL(moduleBlobUrl); - - const worker = new Worker("./resources/blob-url-worker.js"); - worker.postMessage(moduleBlobUrl); - - await new Promise((resolve) => { - worker.addEventListener( - "message", - t.step_func((evt) => { - assert_false(evt.data.importSucceeded); - assert_equals(evt.data.errorName, "TypeError"); - resolve(); - }) - ); - }); -}, "A revoked blob URL will not resolve in a worker even if it's in the window's module graph"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.js deleted file mode 100644 index 0719a18bf16..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.js +++ /dev/null @@ -1,66 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker,dedicatedworker-module,sharedworker-module - -function objectUrlFromModule(module) { - const blob = new Blob([module], { type: "text/javascript" }); - return URL.createObjectURL(blob); -} - -const moduleText = `export const foo = "bar";`; - -promise_test(async (t) => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - t.add_cleanup(() => URL.revokeObjectURL(moduleBlobUrl)); - - const module = await import(moduleBlobUrl); - assert_equals(module.foo, "bar"); -}, "Blob URLs are supported in dynamic imports"); - -promise_test(async (t) => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - t.add_cleanup(() => URL.revokeObjectURL(moduleBlobUrl)); - - const module1 = await import(moduleBlobUrl); - const module2 = await import(moduleBlobUrl); - assert_equals(module1, module2); -}, "Identical blob URLs resolve to the same module"); - -promise_test(async (t) => { - const moduleBlob = new Blob([moduleText], { type: "text/javascript" }); - const moduleBlobUrl1 = URL.createObjectURL(moduleBlob); - const moduleBlobUrl2 = URL.createObjectURL(moduleBlob); - t.add_cleanup(() => { - URL.revokeObjectURL(moduleBlobUrl1); - URL.revokeObjectURL(moduleBlobUrl2); - }); - - const module1 = await import(moduleBlobUrl1); - const module2 = await import(moduleBlobUrl2); - assert_not_equals(module1, module2); -}, "Different blob URLs pointing to the same blob resolve to different modules"); - -promise_test(async (t) => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - URL.revokeObjectURL(moduleBlobUrl); - - await promise_rejects_js(t, TypeError, import(moduleBlobUrl)); -}, "A revoked blob URL will not resolve"); - -promise_test(async () => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - const module1 = await import(moduleBlobUrl); - - URL.revokeObjectURL(moduleBlobUrl); - - const module2 = await import(moduleBlobUrl); - assert_equals(module1, module2); -}, "A revoked blob URL will resolve if it's already in the module graph"); - -promise_test(async () => { - const moduleBlobUrl = objectUrlFromModule(moduleText); - - const importPromise = import(moduleBlobUrl); - URL.revokeObjectURL(moduleBlobUrl); - - const module = await importPromise; - assert_equals(module.foo, "bar"); -}, "Revoking a blob URL immediately after calling import will not fail"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/code-cache-base-url.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/code-cache-base-url.html deleted file mode 100644 index 688a6193a58..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/code-cache-base-url.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<!-- -Regression test for https://crbug.com/990810: -Functions with the same source code shouldn't be cached if their referencing -scripts and host defined options are different. - -Each Function in the following three scripts should have different base URLs -respectively, but in https://crbug.com/990810 the Function in -`gamma/code-cache.js` reuses the Function in `beta/code-cache.js`, resulting in -wrong base URL. ---> - -<script src="alpha/code-cache.js"></script> -<script src="beta/code-cache.js"></script> -<script src="gamma/code-cache.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/code-cache-nonce.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/code-cache-nonce.html deleted file mode 100644 index bd920f8107d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/code-cache-nonce.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<script> -// Regression test for https://crbug.com/979351: -// This test loads a same script file (`resources/code-cache-nonce.js`) -// with three different nonces (i.e. different host defined options). -// Dynamic imports from the script therefore should have different nonces, -// but when code caching ignores the difference in nonces, the first nonce -// ('abc') is reused incorrectly for subsequent dynamic imports, causing -// CSP violation (and thus dynamic import rejection). - -function runTest(nonce, description) { - // Perform a dynamic import with nonce=`nonce` - // from a page (`iframe`) with a matching CSP script-src 'nonce-`nonce`'. - // This should be successful. - promise_test(t => { - return new Promise((resolve, reject) => { - const iframe = document.createElement('iframe'); - iframe.src = 'resources/code-cache-nonce-iframe.sub.html?nonce=' + nonce; - iframe.onload = () => { - // `globalThis.promise` is set by `resources/code-cache-nonce.js`. - // `t.step_timeout()` is workaround for https://crbug.com/1247801. - globalThis.promise.then( - v => t.step_timeout(() => resolve(v), 0), - v => t.step_timeout(() => reject(v), 0) - ); - }; - document.body.appendChild(iframe); - t.add_cleanup(() => iframe.remove()); - }); - }, description); -} - -// As `promise_test` are serialized, each iframe is created after previous -// iframes and scripts are completely loaded. -runTest('abc', 'First dynamic import should use nonce=abc'); -runTest('def', 'Second dynamic import should use nonce=def'); -runTest('ghi', 'Third dynamic import should use nonce=ghi'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/delay-load-event.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/delay-load-event.html deleted file mode 100644 index 5ec6433e65b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/delay-load-event.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<title>Dynamic imports don't delay the load event</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -// Dynamic imports don't #delay-the-load-event. -// Therefore, Window load event would be fired -// just after the dynamic import() below starts. -window.loaded = []; -window.addEventListener('load', () => loaded.push('Window load event')); -promise_test(t => { - loaded.push('import start'); - // This 'loading' log is added to detect the previous Chromium behavior - // where the Window load event is delayed until just before script - // element's load event. - t.step_timeout(() => loaded.push('loading'), 1000); - return import("../resources/slow-module.js?pipe=trickle(d2)") - .then(() => { - assert_array_equals( - loaded, - ['import start', 'Window load event', 'loading', 'slow'], - "Window load event shouldn't be delayed by dynamic imports"); - }); -}, "Dynamic imports don't delay the load event."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub.html deleted file mode 100644 index 189aa819fa5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/dynamic-import-credentials-helper.sub.js"></script> - -<script type="text/javascript"> -runTestsFromIframe('../resources/dynamic-import-credentials-setTimeout-iframe.sub.html'); -</script> -<body> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub.html deleted file mode 100644 index 910644531c2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/dynamic-import-credentials-helper.sub.js"></script> - -<script type="text/javascript"> -runTestsFromIframe('../resources/dynamic-import-credentials-iframe.sub.html'); -</script> -<body> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub.html deleted file mode 100644 index 12738c7b973..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub.html +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE html> -<title>import(): error cases occuring during fetching</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/common/utils.js"></script> -<script type="module"> -const cases = [ - ["wrong MIME type", "../errorhandling-wrongMimetype.js?pipe=header(Content-Type,text/plain)"], - ["wrong MIME type of a dependency", "../errorhandling-wrongMimetype-import.js"], - ["404", "../resources/404-but-js.asis"], - ["404 of a dependency", "../resources/imports-404-but-js.js"], - ["500", "../resources/500-but-js.asis"], - ["500 of a dependency", "../resources/imports-500-but-js.js"], - ["cross-origin module (without CORS)", "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/imports-a.js"], - ["cross-origin module dependency (without CORS)", "../resources/imports-b-cross-origin.sub.js"] -]; - -for (const [label, specifier] of cases) { - promise_test(t => { - return promise_rejects_js(t, TypeError, import(specifier)); - }, "import() must reject when there is a " + label); - - promise_test(async t => { - // The use of ?x is used to separate tests so they don't interfere with each other. - // (However, it shouldn't matter anyway, in a spec-compliant implementation.) - const suffix = (specifier.includes("?") ? "&" : "?") + "x"; - const promise1 = import(specifier + suffix); - const promise2 = import(specifier + suffix); - - await promise_rejects_js(t, TypeError, promise1, "It must reject the first time"); - await promise_rejects_js(t, TypeError, promise2, "It must reject the second time"); - - const error1 = await promise1.catch(e => e); - const error2 = await promise2.catch(e => e); - - assert_not_equals(error1, error2, "The error objects must be different"); - }, "import() must reject with a different error object for each import when there is a " + label); -} - -promise_test(async t => { - const id = token(); - const url = `./resources/status-changing-script.py?id=${id}`; - - // Serve HTTP 404 for the first import(). - await fetch(url + '&newStatus=404'); - const promise1 = import(url); - await promise_rejects_js(t, TypeError, promise1, - "First import() must be rejected due to 404"); - - // Serve HTTP 200 after the first import() completes. - await fetch(url + '&newStatus=200'); - const r = await fetch(url, { cache: 'no-cache' }); - assert_equals(r.status, 200); - - const promise2 = import(url); - await promise_rejects_js(t, TypeError, promise2, - "Second import() must be rejected, because the result of " + - "the first import() is cached in the module map"); -}, "import() fetch errors must be cached"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html deleted file mode 100644 index e9b10e3bab8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html +++ /dev/null @@ -1,53 +0,0 @@ -<!DOCTYPE html> -<title>import(): error cases caused by the imported module script</title> -<link rel="author" title="Kouhei Ueno" href="mailto:kouhei@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script type="module"> -const cases = [ - ["parse error", "../syntaxerror.js", SyntaxError], - ["bad module specifier", "does-not-start-with-dot.js", TypeError, { differentErrorObjects: true }], - ["bad module specifier in a dependency", "../bad-module-specifier.js", TypeError], - ["instantiation error", "../instantiation-error-1.js", SyntaxError, { differentErrorObjects: true }], - ["evaluation error", "../throw-error.js", Error] -]; - -for (const [label, specifier, error, { differentErrorObjects } = {}] of cases) { - promise_test(t => { - return promise_rejects_js(t, error, import(specifier)); - }, "import() must reject when there is a " + label); - - const errorObjectsLabel = differentErrorObjects ? "different error objects" : "the same error object"; - promise_test(async t => { - // The use of ?x is used to separate tests so they don't interfere with each other. - // (However, it shouldn't matter anyway, in a spec-compliant implementation.) - const promise1 = import(specifier + "?x"); - const promise2 = import(specifier + "?x"); - - await promise_rejects_js(t, error, promise1, "It must reject the first time"); - await promise_rejects_js(t, error, promise2, "It must reject the second time"); - - const error1 = await promise1.catch(e => e); - const error2 = await promise2.catch(e => e); - - if (differentErrorObjects) { - assert_not_equals(error1, error2, "The error objects must be different"); - } else { - assert_equals(error1, error2, "The error objects must be equal"); - } - }, `import() must reject with ${errorObjectsLabel} for each import when there is a ${label}`); -} - -promise_test(t => { - delete window.before_throwing_error; - delete window.after_throwing_error; - - return promise_rejects_js(t, Error, import("../throw-error.js?y")).then(() => { - assert_true(window.before_throwing_error, - "the module script should run to a point where it throws exception"); - assert_equals(window.after_throwing_error, undefined, - "the module script should not run after it throws exception"); - }); -}, "import()ing a module with an evaluation error must stop evaluation"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports.html deleted file mode 100644 index 9807e21b0d1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html> -<title>Basic dynamic imports</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module"> -promise_test(t => { - return import("./../imports-a.js").then(module => { - assert_true(window.evaluated_imports_a); - assert_equals(module.A["from"], "imports-a.js"); - }); -}, "Dynamic imports should resolve module."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js deleted file mode 100644 index ec7784983d1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/base-url.sub.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -// This script triggers import(), and thus the base URL of this script -// (either loaded by `<script>` or `importScripts()`) is used as the base URL -// of resolving relative URL-like specifiers in `import()`. - -// The following fields should be set by the callers of this script -// (unless loaded as the worker top-level script): -// - self.testName (string) -// - self.baseUrlSanitized (boolean) - -// When this script is loaded as the worker top-level script: -if ('DedicatedWorkerGlobalScope' in self && - self instanceof DedicatedWorkerGlobalScope && - !self.testName) { - importScripts("/resources/testharness.js"); - self.testName = 'worker top-level script'; - // Worker top-level scripts are always same-origin. - self.baseUrlSanitized = false; -} - -{ - // This could change by the time the test is executed, so we save it now. - // As this script is loaded multiple times, savedBaseUrlSanitized is scoped. - const savedBaseUrlSanitized = self.baseUrlSanitized; - - promise_test(() => { - const promise = import("./import.js?pipe=header(Access-Control-Allow-Origin,*)&label=relative-" + self.testName); - if (savedBaseUrlSanitized) { - // The base URL is "about:blank" and thus import() here should fail. - return promise.then(module => { - // This code should be unreached, but assert_equals() is used here - // to log `module.A["from"]` in case of unexpected resolution. - assert_equals(module.A["from"], "(unreached)", - "Relative URL-like specifier resolution should fail"); - assert_unreached(); - }, - () => {}); - } else { - // The base URL is the response URL of this script, i.e. - // `.../gamma/base-url.sub.js`. - return promise.then(module => { - assert_equals(module.A["from"], "gamma/import.js"); - }); - } - }, - "Relative URL-like from " + self.testName); -} - -promise_test(() => { - return import("http://{{hosts[alt][]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js?pipe=header(Access-Control-Allow-Origin,*)&label=absolute-" + self.testName) - .then(module => { - assert_equals(module.A["from"], "gamma/import.js"); - }) - }, - "Absolute URL-like from " + self.testName); - -done(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/code-cache.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/code-cache.js deleted file mode 100644 index b470bc8ae56..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/code-cache.js +++ /dev/null @@ -1,9 +0,0 @@ -promise_test(() => { - return (new Function('w', 'return import(w)'))("./import.js?Function") - .then(module => assert_equals(module.A.from, 'gamma/import.js')); -}, 'gamma - Function'); - -promise_test(() => { - return eval('import("./import.js?eval")') - .then(module => assert_equals(module.A.from, 'gamma/import.js')); -}, 'gamma - eval'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js deleted file mode 100644 index 435c1369be2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js +++ /dev/null @@ -1 +0,0 @@ -export const A = { "from": "gamma/import.js" }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/inline-event-handler.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/inline-event-handler.html deleted file mode 100644 index 13cc8b66246..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/inline-event-handler.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id='div' onmousedown='import("./../imports-a.js").then(window.continueTest);'></div> -<script> -const div = document.getElementById('div'); - -promise_test(t => { - const promise = new Promise(resolve => window.continueTest = resolve); - - const event = new MouseEvent('mousedown', {'button': 1}); - div.dispatchEvent(event); - - return promise.then(() => { - assert_true(window.evaluated_imports_a); - div.parentNode.removeChild(div); - }); -}, "dynamic import should work when triggered from inline event handlers"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/basic.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/basic.any.js deleted file mode 100644 index 82cb3b215db..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/basic.any.js +++ /dev/null @@ -1,32 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker -// META: script=ticker.js - -promise_test(async t => { - const getCount = ticker(1000); - - const importP = import("<invalid>"); - await promise_rejects_js(t, TypeError, importP, 'import() should reject'); - - assert_less_than(getCount(), 1000); -}, "import() should not drain the microtask queue if it fails during specifier resolution"); - -promise_test(async t => { - // Use Date.now() to ensure that the module is not in the module map - const specifier = "./empty-module.js?" + Date.now(); - - await import(specifier); - - const getCount = ticker(1000); - await import(specifier); - assert_less_than(getCount(), 1000); -}, "import() should not drain the microtask queue when loading an already loaded module"); - -promise_test(async t => { - // Use Date.now() to ensure that the module is not in the module map - const specifier = "./empty-module.js?" + Date.now(); - - const getCount = ticker(1e7); - await import(specifier); - assert_equals(getCount(), 1e7); -}, "import() should drain the microtask queue when fetching a new module"); - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/css-import-in-worker.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/css-import-in-worker.any.js deleted file mode 100644 index bd6f5d092f3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/css-import-in-worker.any.js +++ /dev/null @@ -1,14 +0,0 @@ -// META: global=dedicatedworker,sharedworker -// META: script=ticker.js - -promise_test(async t => { - // Use Date.now() to ensure that the module is not in the module map - const specifier = "./empty-module.css?" + Date.now(); - - const getCount = ticker(1000); - - const importP = import(specifier, { assert: { type: "css" } }); - await promise_rejects_js(t, TypeError, importP, 'import() should reject'); - - assert_less_than(getCount(), 1000); -}, "import() should not drain the microtask queue if it fails because of the 'type: css' assertion in a worker"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/empty-module.css b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/empty-module.css deleted file mode 100644 index 108e7649bdd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/empty-module.css +++ /dev/null @@ -1,4 +0,0 @@ -/* -This file is empty, because all it matters is if the -dynamic import that loads it fails or succedes. -*/ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/empty-module.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/empty-module.js deleted file mode 100644 index 108e7649bdd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/empty-module.js +++ /dev/null @@ -1,4 +0,0 @@ -/* -This file is empty, because all it matters is if the -dynamic import that loads it fails or succedes. -*/ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/serviceworker.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/serviceworker.any.js deleted file mode 100644 index 4c75cab1b65..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/serviceworker.any.js +++ /dev/null @@ -1,14 +0,0 @@ -// META: global=serviceworker -// META: script=ticker.js - -promise_test(async t => { - // Use Date.now() to ensure that the module is not in the module map - const specifier = "./empty-module.js?" + Date.now(); - - const getCount = ticker(1000); - - const importP = import(specifier); - await promise_rejects_js(t, TypeError, importP, 'import() should reject'); - - assert_less_than(getCount(), 1000); -}, "import() should not drain the microtask queue if it fails because it's used in a ServiceWorker"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/ticker.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/ticker.js deleted file mode 100644 index 42619b6e700..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/ticker.js +++ /dev/null @@ -1,13 +0,0 @@ -globalThis.ticker = function ticker(max) { - let i = 0; - let stop = false; - Promise.resolve().then(function loop() { - if (stop || i >= max) return; - i++; - Promise.resolve().then(loop); - }); - return () => { - stop = true; - return i; - }; -}; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/with-import-assertions.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/with-import-assertions.any.js deleted file mode 100644 index f67ba9a1ae4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/with-import-assertions.any.js +++ /dev/null @@ -1,15 +0,0 @@ -// META: global=window,dedicatedworker,sharedworker -// META: script=ticker.js - -promise_test(async t => { - // Use Date.now() to ensure that the module is not in the module map - const specifier = "./empty-module.js?" + Date.now(); - - const getCount = ticker(1000); - - const importP = import(specifier, { assert: { type: "<invalid>" } }); - await promise_rejects_js(t, TypeError, importP, 'import() should reject'); - - assert_less_than(getCount(), 1000); -}, "import() should not drain the microtask queue if it fails while validating the 'type' assertion"); - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/worklet-ref.https.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/worklet-ref.https.html deleted file mode 100644 index 6c598aee393..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/worklet-ref.https.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<canvas id ="output" width="100" height="100" style="background: blue;"></canvas> -<script> -"use strict"; -const canvas = document.getElementById('output'); -const ctx = canvas.getContext('2d'); - -ctx.fillStyle = 'green'; -ctx.fillRect(0, 0, 100, 100); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/worklet.https.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/worklet.https.html deleted file mode 100644 index 5cd59f86dc7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/worklet.https.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html class="reftest-wait"> -<link rel="help" href="https://html.spec.whatwg.org/#hostimportmoduledynamically(referencingscriptormodule,-specifier,-promisecapability)"> -<link rel="match" href="worklet-ref.https.html"> -<style> -#output { - width: 100px; - height: 100px; - background-image: paint(rects); - background-color: blue; -} -</style> -<script src="/common/reftest-wait.js"></script> -<script src="/common/worklet-reftest.js"></script> -<body> -<div id="output"></div> - -<script id="code" type="text/worklet"> -registerPaint('rects', class { - async paint(ctx, geom) { - ctx.fillStyle = 'red'; - - const getCount = ticker(1000); - - try { - // Use Date.now() to ensure that the module is not in the module map - await import("./empty-module.js?" + Date.now()); - } catch (e) { - if (getCount() < 1000) { - ctx.fillStyle = 'green'; - } - } - ctx.fillRect(0, 0, geom.width, geom.height); - } -}); -</script> - -<script> -"use strict"; -CSS.paintWorklet.addModule("./ticker.js").then(() => - importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent) -); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-classic-manual.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-classic-manual.html deleted file mode 100644 index b01f595c03e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-classic-manual.html +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Dynamic import when there is no active script</title> -<link rel="help" href="https://github.com/whatwg/html/pull/4181"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<p>Click these buttons in sequence:</p> - -<button id="button1">Click me 1</button> - -<button id="button2">Click me 2</button> - -<p>The result will be pass/fail per the testharness.js results</p> - -<!-- We set the attributes from a separate script to specifically make - sure that it's not that script's base URL that gets used, but instead this page's. --> -<script src="scripts/no-active-script.js"></script> - -<script> -"use strict"; -setup({ explicit_timeout: true }); - -promise_test(t => { - t.add_cleanup(() => { - delete window.evaluated_imports_a; - }); - - const promise = new Promise((resolve, reject) => { - window.continueTest1 = resolve; - window.errorTest1 = reject; - }); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); -}, "onclick that directly imports should successfully import, using page's base URL"); - -promise_test(t => { - t.add_cleanup(() => { - delete window.evaluated_imports_a; - }); - - const promise = new Promise((resolve, reject) => { - window.continueTest2 = resolve; - window.errorTest2 = reject; - }); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); -}, "onclick that indirectly imports after a task should successfully import, using page's base URL"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-module-manual.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-module-manual.html deleted file mode 100644 index 359b71d821c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-module-manual.html +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Dynamic import when there is no active script</title> -<link rel="help" href="https://github.com/whatwg/html/pull/4181"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<p>Click these buttons in sequence:</p> - -<button id="button1">Click me 1</button> - -<button id="button2">Click me 2</button> - -<p>The result will be pass/fail per the testharness.js results</p> - -<!-- We set the attributes from a separate script to specifically make - sure that it's not that script's base URL that gets used, but instead this page's. --> -<script src="scripts/no-active-script.js" type="module"></script> - -<script type="module"> -"use strict"; -setup({ explicit_timeout: true }); - -promise_test(t => { - t.add_cleanup(() => { - delete window.evaluated_imports_a; - }); - - const promise = new Promise((resolve, reject) => { - window.continueTest1 = resolve; - window.errorTest1 = reject; - }); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); -}, "onclick that directly imports should successfully import, using page's base URL"); - -promise_test(t => { - t.add_cleanup(() => { - delete window.evaluated_imports_a; - }); - - const promise = new Promise((resolve, reject) => { - window.continueTest2 = resolve; - window.errorTest2 = reject; - }); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); -}, "onclick that indirectly imports after a task should successfully import, using page's base URL"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-classic.html deleted file mode 100644 index 0958cfbeba2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-classic.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta http-equiv="content-security-policy" content="script-src 'nonce-correct'"> -<script nonce="correct" src="/resources/testharness.js"></script> -<script nonce="correct" src="/resources/testharnessreport.js"></script> -<script nonce="correct" src="./propagate-nonce-external.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-module.html deleted file mode 100644 index 47c422e59c9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-module.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta http-equiv="content-security-policy" content="script-src 'nonce-correct'"> -<script nonce="correct" src="/resources/testharness.js"></script> -<script nonce="correct" src="/resources/testharnessreport.js"></script> -<script type="module" nonce="correct" src="./propagate-nonce-external.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external.js deleted file mode 100644 index 3b97d2f40e9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external.js +++ /dev/null @@ -1,7 +0,0 @@ -// This file is loaded both as a module and as a classic script. -promise_test(t => { - return import("../imports-a.js").then(module => { - assert_true(window.evaluated_imports_a); - assert_equals(module.A["from"], "imports-a.js"); - }); -}, "Dynamically imported module should eval when imported from script w/ a valid nonce."); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-classic.html deleted file mode 100644 index 754110cb5ea..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-classic.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html> -<meta http-equiv="content-security-policy" content="script-src 'nonce-correct'"> -<script nonce="correct" src="/resources/testharness.js"></script> -<script nonce="correct" src="/resources/testharnessreport.js"></script> -<script nonce="correct"> -promise_test(t => { - return import("./../imports-a.js").then(module => { - assert_true(window.evaluated_imports_a); - assert_equals(module.A["from"], "imports-a.js"); - }); -}, "Dynamically imported module should eval when imported from script w/ a valid nonce."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-module.html deleted file mode 100644 index f3322773a42..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-module.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html> -<meta http-equiv="content-security-policy" content="script-src 'nonce-correct'"> -<script nonce="correct" src="/resources/testharness.js"></script> -<script nonce="correct" src="/resources/testharnessreport.js"></script> -<script type="module" nonce="correct"> -promise_test(t => { - return import("./../imports-a.js").then(module => { - assert_true(window.evaluated_imports_a); - assert_equals(module.A["from"], "imports-a.js"); - }); -}, "Dynamically imported module should eval when imported from script w/ a valid nonce."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/blob-url-worker.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/blob-url-worker.js deleted file mode 100644 index 07071e05ced..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/blob-url-worker.js +++ /dev/null @@ -1,11 +0,0 @@ -self.addEventListener("message", (evt) => { - const importModule = import(evt.data); - importModule.then( - (module) => { - self.postMessage({ importSucceeded: true, module: { ...module } }); - }, - (error) => { - self.postMessage({ importSucceeded: false, errorName: error.name }); - } - ); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/code-cache-nonce-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/code-cache-nonce-iframe.sub.html deleted file mode 100644 index 56f915aac13..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/code-cache-nonce-iframe.sub.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta http-equiv="content-security-policy" - content="script-src 'unsafe-eval' 'nonce-{{GET[nonce]}}'"> -<script src="code-cache-nonce.js" nonce="{{GET[nonce]}}"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/code-cache-nonce.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/code-cache-nonce.js deleted file mode 100644 index e9983fb6cd9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/code-cache-nonce.js +++ /dev/null @@ -1,4 +0,0 @@ -// Note that the function source text is intentionally different from e.g. -// ../alpha/code-cache.js to avoid caching Functions between different sets -// of tests. -parent.promise = (new Function('x', 'return import(x)'))('../../imports-a.js'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/empty-iframe.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/empty-iframe.html deleted file mode 100644 index ad5ab30eda1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/empty-iframe.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - </head> - <body> - <div id="dummy"></div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/status-changing-script.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/status-changing-script.py deleted file mode 100644 index a44d3dd3eb0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/status-changing-script.py +++ /dev/null @@ -1,18 +0,0 @@ -def main(request, response): - headers = [(b"Content-Type", b"text/javascript"), - (b"Cache-Control", b"private, no-store")] - - id = request.GET.first(b"id") - - with request.server.stash.lock: - status = request.server.stash.take(id) - if status is None: - status = 200 - - new_status = request.GET.first(b"newStatus", None) - if new_status is not None: - status = int(new_status) - - request.server.stash.put(id, status) - - return status, headers, b"" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/v8-code-cache-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/v8-code-cache-iframe.sub.html deleted file mode 100644 index c3a870b3f1e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/v8-code-cache-iframe.sub.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<meta http-equiv="content-security-policy" - content="script-src 'nonce-{{GET[nonce]}}'"> -<!-- -base element to make the base URLs of the Document and the script different ---> -<base href="../"> -<script src="resources/v8-code-cache.js?pipe=header(Cache-Control,max-age=1000)" - nonce="{{GET[nonce]}}" type="{{GET[type]}}"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/v8-code-cache.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/v8-code-cache.js deleted file mode 100644 index 1d3e88a51d4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/v8-code-cache.js +++ /dev/null @@ -1,74 +0,0 @@ -parent.promise = import('../../imports-a.js'); - -// Padding for triggering V8 Code Cache on Chromium. -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ -// ============================================================================ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js deleted file mode 100644 index 447e5060b14..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js +++ /dev/null @@ -1,2 +0,0 @@ -// import()s in a dynamically created function are resolved relative to the script. -Function(`import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`)(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js deleted file mode 100644 index 100602733a8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js +++ /dev/null @@ -1,2 +0,0 @@ -// import()s in eval are resolved relative to the script. -eval(`import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js deleted file mode 100644 index 3202ce47b92..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js +++ /dev/null @@ -1,3 +0,0 @@ -// import()s in an event handler are resolved relative to the document base. -window.dummyDiv.setAttribute("onclick", `import('./imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); -window.dummyDiv.click(); // different from **on**click() diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/no-active-script.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/no-active-script.js deleted file mode 100644 index 85d8ac29ece..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/no-active-script.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -document.querySelector("#button1").setAttribute("onclick", "import('../imports-a.js?label=button1').then(window.continueTest1, window.errorTest1)"); - -document.querySelector("#button2").setAttribute("onclick", "Promise.resolve(`import('../imports-a.js?label=button2')`).then(eval).then(window.continueTest2, window.errorTest2);"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js deleted file mode 100644 index 923eb7d8b61..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js +++ /dev/null @@ -1,3 +0,0 @@ -// import()s in an event handler are resolved relative to the document base. -window.dummyDiv.setAttribute("onclick", `import('./imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); -window.dummyDiv.onclick(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js deleted file mode 100644 index 342b342e8ef..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js +++ /dev/null @@ -1,2 +0,0 @@ -// import()s in a timeout handler are resolved relative to the script. -setTimeout(`import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`, 0); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-classic.html deleted file mode 100644 index 855705e5859..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-classic.html +++ /dev/null @@ -1,63 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings uses the script base URL inside a classic script that is loaded from a file</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="dummy"></div> - -<base href="scripts/foo/"> -<script> -// Tweak the base URL of the document here to distinguish: -// - document URL -// - document base URL = ../ -// - External scripts' base URL = ./scripts/eval.js etc. -// - This inline script's base URL = ./scripts/foo/ -document.querySelector("base").remove(); -const base = document.createElement("base"); -base.setAttribute("href", "../"); -document.body.appendChild(base); - -function load(scriptSrc) { - const el = document.createElement("script"); - el.src = scriptSrc; - document.body.appendChild(el); -} - -function createTestPromise() { - return new Promise((resolve, reject) => { - window.dummyDiv.removeAttribute("onclick"); - delete window.evaluated_imports_a; - delete window.label; - - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -window.dummyDiv = document.querySelector("#dummy"); - -const evaluators = [ - "setTimeout", - "eval", - "Function", - "reflected-inline-event-handlers", - "inline-event-handlers-UA-code" -]; - -for (const label of evaluators) { - promise_test(() => { - const promise = createTestPromise(); - - window.label = label; - load(`dynamic-import/scripts/${label}.js`); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); -}; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-module.html deleted file mode 100644 index d90af9c96ab..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-module.html +++ /dev/null @@ -1,64 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings uses the script base URL inside a module script that is loaded from a file</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="dummy"></div> - -<base href="scripts/foo/"> -<script type="module"> -// Tweak the base URL of the document here to distinguish: -// - document URL -// - document base URL = ../ -// - External scripts' base URL = ./scripts/eval.js etc. -// - This inline script's base URL = ./scripts/foo/ -document.querySelector("base").remove(); -const base = document.createElement("base"); -base.setAttribute("href", "../"); -document.body.appendChild(base); - -function load(scriptSrc) { - const el = document.createElement("script"); - el.type = "module"; - el.src = scriptSrc; - document.body.appendChild(el); -} - -function createTestPromise() { - return new Promise((resolve, reject) => { - window.dummyDiv.removeAttribute("onclick"); - delete window.evaluated_imports_a; - delete window.label; - - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -window.dummyDiv = document.querySelector("#dummy"); - -const evaluators = [ - "setTimeout", - "eval", - "Function", - "reflected-inline-event-handlers", - "inline-event-handlers-UA-code" -]; - -for (const label of evaluators) { - promise_test(() => { - const promise = createTestPromise(); - - window.label = label; - load(`dynamic-import/scripts/${label}.js`); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); -}; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-inline-classic.html deleted file mode 100644 index 2fe1f755358..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-inline-classic.html +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings uses the script base URL (= document base URL) inside an inline classic script</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<div id="dummy"></div> - -<base href="scripts/foo/"> -<script> -// Tweak the base URL of the document here to distinguish: -// - document URL -// - document base URL = ../ -// - This inline script's base URL = ./scripts/foo/ -document.querySelector("base").remove(); -const base = document.createElement("base"); -base.setAttribute("href", "../"); -document.body.appendChild(base); - -function createTestPromise() { - return new Promise((resolve, reject) => { - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -const dummyDiv = document.querySelector("#dummy"); - -function doTest(label, evaluator, path) { - promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - delete window.evaluated_imports_a; - }); - - const promise = createTestPromise(); - - evaluator(`import('${path}/imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); -} - -// Inline script's base URL should be used. -doTest("setTimeout", setTimeout, "../../.."); -doTest("eval", eval, "../../.."); -doTest("the Function constructor", - (x) => { - Function(x)(); - }, - "../../.."); - -// Document's base URL should be used, as there are no active scripts. -doTest("reflected inline event handlers", - (x) => { - dummyDiv.setAttribute("onclick", x); - dummyDiv.onclick(); - }, - "."); - -doTest("inline event handlers triggered via UA code", - (x) => { - dummyDiv.setAttribute("onclick", x); - dummyDiv.click(); // different from .**on**click() - }, - "."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-inline-module.html deleted file mode 100644 index 1691550ecb1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-inline-module.html +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings uses the script base URL (= document base URL) inside an inline module script</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<div id="dummy"></div> - -<base href="scripts/foo/"> -<script type="module"> -// Tweak the base URL of the document here to distinguish: -// - document URL -// - document base URL = ../ -// - This inline script's base URL = ./scripts/foo/ -document.querySelector("base").remove(); -const base = document.createElement("base"); -base.setAttribute("href", "../"); -document.body.appendChild(base); - -function createTestPromise() { - return new Promise((resolve, reject) => { - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -const dummyDiv = document.querySelector("#dummy"); - -function doTest(label, evaluator, path) { - promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - delete window.evaluated_imports_a; - }); - - const promise = createTestPromise(); - - evaluator(`import('${path}/imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); -} - -// Inline script's base URL should be used. -doTest("setTimeout", setTimeout, "../../.."); -doTest("eval", eval, "../../.."); -doTest("the Function constructor", - (x) => { - Function(x)(); - }, - "../../.."); - -// Document's base URL should be used, as there are no active scripts. -doTest("reflected inline event handlers", - (x) => { - dummyDiv.setAttribute("onclick", x); - dummyDiv.onclick(); - }, - "."); - -doTest("inline event handlers triggered via UA code", - (x) => { - dummyDiv.setAttribute("onclick", x); - dummyDiv.click(); // different from .**on**click() - }, - "."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-classic.html deleted file mode 100644 index 34ea00abc83..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-classic.html +++ /dev/null @@ -1,54 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings inside a classic script</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="dummy"></div> - -<script> -function createTestPromise() { - return new Promise((resolve, reject) => { - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -const dummyDiv = document.querySelector("#dummy"); - -const evaluators = { - eval, - setTimeout, - "the Function constructor"(x) { - Function(x)(); - }, - "reflected inline event handlers"(x) { - dummyDiv.setAttribute("onclick", x); - dummyDiv.onclick(); - }, - "inline event handlers triggered via UA code"(x) { - dummyDiv.setAttribute("onclick", x); - dummyDiv.click(); // different from .**on**click() - } -}; - -for (const [label, evaluator] of Object.entries(evaluators)) { - promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - delete window.evaluated_imports_a; - }); - - const promise = createTestPromise(); - - evaluator(`import('../imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); -}; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-module.html deleted file mode 100644 index b85d446d8da..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-module.html +++ /dev/null @@ -1,54 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings inside a module script</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="dummy"></div> - -<script type="module"> -function createTestPromise() { - return new Promise((resolve, reject) => { - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -const dummyDiv = document.querySelector("#dummy"); - -const evaluators = { - eval, - setTimeout, - "the Function constructor"(x) { - Function(x)(); - }, - "reflected inline event handlers"(x) { - dummyDiv.setAttribute("onclick", x); - dummyDiv.onclick(); - }, - "inline event handlers triggered via UA code"(x) { - dummyDiv.setAttribute("onclick", x); - dummyDiv.click(); // different from .**on**click() - } -}; - -for (const [label, evaluator] of Object.entries(evaluators)) { - promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - delete window.evaluated_imports_a; - }); - - const promise = createTestPromise(); - - evaluator(`import('../imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); - - return promise.then(module => { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); -}; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html deleted file mode 100644 index b582eba8b03..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html +++ /dev/null @@ -1,104 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings uses the appropriate nonce inside a classic script</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<meta http-equiv="content-security-policy" content="script-src 'nonce-correct' 'unsafe-eval' 'unsafe-hashes' 'sha256-cAMzxBL19bKt4KwKGbxy/ZOFIIjH5AmRjlVbsD5pvNw=' 'sha256-3VjoJYNK/9HJMS8rrZHlqSZgUssDY+GPyc7AU8lNM3k='"> - -<script nonce="correct" src="/resources/testharness.js"></script> -<script nonce="correct" src="/resources/testharnessreport.js"></script> - -<div id="dummy"></div> - -<script nonce="correct"> -"use strict"; -const dummyDiv = document.querySelector("#dummy"); - -function createTestPromise(t) { - t.add_cleanup(() => { - delete window.evaluated_imports_a; - delete window.unreached; - delete window.continueTest; - delete window.errorTest; - }); - - return new Promise((resolve, reject) => { - window.unreached = t.unreached_func("Must not reach this"); - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -function assertSuccessful(module) { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); -} - -promise_test(t => { - const promise = createTestPromise(t); - - setTimeout(`import('../imports-a.js?label=setTimeout').then(window.continueTest, window.errorTest)`, 0); - - return promise.then(assertSuccessful); -}, "setTimeout must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - const promise = createTestPromise(t); - - eval(`import('../imports-a.js?label=direct eval').then(window.continueTest, window.errorTest)`); - - return promise.then(assertSuccessful); -}, "direct eval must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - const promise = createTestPromise(t); - - const evalAlias = eval; - evalAlias(`import('../imports-a.js?label=indirect eval').then(window.continueTest, window.errorTest)`); - - return promise.then(assertSuccessful); -}, "indirect eval must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - const promise = createTestPromise(t); - - Function(`import('../imports-a.js?label=the Function constructor').then(window.continueTest, window.errorTest)`)(); - - return promise.then(assertSuccessful); -}, "the Function constructor must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - }); - - const promise = createTestPromise(t); - - // This only works because of the 'unsafe-hashes' and the hash in the CSP policy - dummyDiv.setAttribute( - "onclick", - `import('../imports-a.js?label=reflected inline event handlers').then(window.continueTest, window.errorTest)` - ); - dummyDiv.onclick(); - - return promise_rejects_js(t, TypeError, promise); -}, "reflected inline event handlers must not inherit the nonce from the triggering script, thus fail"); - -promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - }); - - const promise = createTestPromise(t); - - // This only works because of the 'unsafe-hashes' and the hash in the CSP policy - dummyDiv.setAttribute( - "onclick", - `import('../imports-a.js?label=inline event handlers triggered via UA code').then(window.continueTest, window.errorTest)` - ); - assert_equals(typeof dummyDiv.onclick, "function", "the browser must be able to parse a string containing the import() syntax into a function"); - dummyDiv.click(); // different from **on**click() - - return promise_rejects_js(t, TypeError, promise); -}, "inline event handlers triggered via UA code must not inherit the nonce from the triggering script, thus fail"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html deleted file mode 100644 index 4fa1cc58771..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html +++ /dev/null @@ -1,103 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings uses the appropriate nonce inside a module script</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<meta http-equiv="content-security-policy" content="script-src 'nonce-correct' 'unsafe-eval' 'unsafe-hashes' 'sha256-cAMzxBL19bKt4KwKGbxy/ZOFIIjH5AmRjlVbsD5pvNw=' 'sha256-3VjoJYNK/9HJMS8rrZHlqSZgUssDY+GPyc7AU8lNM3k='"> - -<script nonce="correct" src="/resources/testharness.js"></script> -<script nonce="correct" src="/resources/testharnessreport.js"></script> - -<div id="dummy"></div> - -<script type="module" nonce="correct"> -const dummyDiv = document.querySelector("#dummy"); - -function createTestPromise(t) { - t.add_cleanup(() => { - delete window.evaluated_imports_a; - delete window.unreached; - delete window.continueTest; - delete window.errorTest; - }); - - return new Promise((resolve, reject) => { - window.unreached = t.unreached_func("Must not reach this"); - window.continueTest = resolve; - window.errorTest = reject; - }); -} - -function assertSuccessful(module) { - assert_true(window.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); -} - -promise_test(t => { - const promise = createTestPromise(t); - - setTimeout(`import('../imports-a.js?label=setTimeout').then(window.continueTest, window.errorTest)`, 0); - - return promise.then(assertSuccessful); -}, "setTimeout must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - const promise = createTestPromise(t); - - eval(`import('../imports-a.js?label=direct eval').then(window.continueTest, window.errorTest)`); - - return promise.then(assertSuccessful); -}, "direct eval must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - const promise = createTestPromise(t); - - const evalAlias = eval; - evalAlias(`import('../imports-a.js?label=indirect eval').then(window.continueTest, window.errorTest)`); - - return promise.then(assertSuccessful); -}, "indirect eval must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - const promise = createTestPromise(t); - - Function(`import('../imports-a.js?label=the Function constructor').then(window.continueTest, window.errorTest)`)(); - - return promise.then(assertSuccessful); -}, "the Function constructor must inherit the nonce from the triggering script, thus execute"); - -promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - }); - - const promise = createTestPromise(t); - - // This only works because of the 'unsafe-hashes' and the hash in the CSP policy - dummyDiv.setAttribute( - "onclick", - `import('../imports-a.js?label=reflected inline event handlers').then(window.continueTest, window.errorTest)` - ); - dummyDiv.onclick(); - - return promise_rejects_js(t, TypeError, promise); -}, "reflected inline event handlers must not inherit the nonce from the triggering script, thus fail"); - -promise_test(t => { - t.add_cleanup(() => { - dummyDiv.removeAttribute("onclick"); - }); - - const promise = createTestPromise(t); - - // This only works because of the 'unsafe-hashes' and the hash in the CSP policy - dummyDiv.setAttribute( - "onclick", - `import('../imports-a.js?label=inline event handlers triggered via UA code').then(window.continueTest, window.errorTest)` - ); - assert_equals(typeof dummyDiv.onclick, 'function', "the browser must be able to parse a string containing the import() syntax into a function"); - dummyDiv.click(); // different from **on**click() - - return promise_rejects_js(t, TypeError, promise); -}, "inline event handlers triggered via UA code must not inherit the nonce from the triggering script, thus fail"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-of-promise-result.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-of-promise-result.html deleted file mode 100644 index 5514049c78d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-of-promise-result.html +++ /dev/null @@ -1,83 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>import() inside compiled strings inside a classic script</title> -<link rel="help" href="https://github.com/whatwg/html/pull/3163"> -<link rel="help" href="https://github.com/tc39/ecma262/issues/871#issuecomment-292493142"> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<base href="scripts/foo/"> -<script> -"use strict"; - -// This test is based on the current specification, but all browser -// implementations aren't conformant. See -// https://bugs.chromium.org/p/chromium/issues/detail?id=1245063 -// https://github.com/heycam/webidl/pull/902 - -// Tweak the base URL of the document here to distinguish: -// - document URL -// - document base URL = ../ -// - This inline script's base URL = ./scripts/foo/ -document.querySelector("base").remove(); -const base = document.createElement("base"); -base.setAttribute("href", "../"); -document.body.appendChild(base); - -self.ran = false; - -// The active script for the dynamic import is this inline script -// (see https://html.spec.whatwg.org/C/#hostmakejobcallback). -promise_test(t => { - t.add_cleanup(() => { - self.ran = false; - }) - - return Promise.resolve(`import("../../../imports-a.js?1").then(() => { self.ran = true; })`) - .then(eval) - .then(() => { - assert_true(self.ran); - }); -}, "Evaled the script via eval, successful import"); - -promise_test(t => { - t.add_cleanup(() => { - self.ran = false; - }) - - return Promise.resolve(`import("bad-specifier?1").catch(() => { self.ran = true; })`) - .then(eval) - .then(() => { - assert_true(self.ran); - }); -}, "Evaled the script via eval, failed import"); - -promise_test(t => { - t.add_cleanup(() => { - self.ran = false; - }) - - return Promise.resolve(`return import("../../../imports-a.js?2").then(() => { self.ran = true; })`) - .then(Function) - .then(Function.prototype.call.bind(Function.prototype.call)) - .then(() => { - assert_true(self.ran); - }); -}, "Evaled the script via Function, successful import"); - -promise_test(t => { - t.add_cleanup(() => { - self.ran = false; - }) - - return Promise.resolve(`return import("bad-specifier?2").catch(() => { self.ran = true; })`) - .then(Function) - .then(Function.prototype.call.bind(Function.prototype.call)) - .then(() => { - assert_true(self.ran); - }); -}, "Evaled the script via Function, failed import"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html deleted file mode 100644 index 3b1d98f6b11..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html +++ /dev/null @@ -1,79 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Check import() works when active script is in another document</title> -<link rel="author" title="Jon Coppeard" href="mailto:jcoppeard@mozilla.com"> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> - -<iframe id="frame" src="resources/empty-iframe.html"></iframe> - -<script> - -function startTest() { - const otherWindow = document.getElementById("frame").contentWindow; - const otherDiv = otherWindow.document.getElementById("dummy"); - - function createTestPromise() { - return new Promise((resolve, reject) => { - otherWindow.continueTest = resolve; - otherWindow.errorTest = reject; - }); - } - - const evaluators = { - eval: otherWindow.eval, - setTimeout: otherWindow.setTimeout, - "the Function constructor"(x) { - otherWindow.Function(x)(); - }, - }; - - for (const [label, evaluator] of Object.entries(evaluators)) { - promise_test(t => { - t.add_cleanup(() => { - otherDiv.removeAttribute("onclick"); - delete otherWindow.evaluated_imports_a; - }); - - const promise = createTestPromise(); - - evaluator(`import('../imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); - - return promise.then(module => { - assert_true(otherWindow.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); - }; - - const eventHandlerEvaluators = { - "reflected inline event handlers"(x) { - otherDiv.setAttribute("onclick", x); - otherDiv.onclick(); - }, - "inline event handlers triggered by JS"(x) { - otherDiv.setAttribute("onclick", x); - otherDiv.click(); // different from .**on**click() - } - }; - - for (const [label, evaluator] of Object.entries(eventHandlerEvaluators)) { - promise_test(t => { - t.add_cleanup(() => { - otherDiv.removeAttribute("onclick"); - delete otherWindow.evaluated_imports_a; - }); - - const promise = createTestPromise(); - - evaluator(`import('../../imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); - - return promise.then(module => { - assert_true(otherWindow.evaluated_imports_a, "The module must have been evaluated"); - assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); - }); - }, label + " should successfully import"); - }; -} -</script> -<body onLoad="startTest()"></body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/v8-code-cache.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/v8-code-cache.html deleted file mode 100644 index 77de19e74bc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/v8-code-cache.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<script> -// Regression test for https://crbug.com/1244145: -// This test loads a same script file (`resources/v8-code-cache.js`) -// multiple times to trigger V8 Code Cache. -// Host defined options (including base URLs and nonces) are lost when the -// script is compiled using the cached metadata, and thus causing -// dynamic import failures due to wrong base URLs and wrong nonces. - -function runTest(type, nonce, description) { - promise_test(t => { - return new Promise((resolve, reject) => { - const iframe = document.createElement('iframe'); - iframe.src = 'resources/v8-code-cache-iframe.sub.html?nonce=' + nonce + '&type=' + type; - iframe.onload = () => { - // `window.promise` is set by `resources/v8-code-cache.js`. - window.promise.then(resolve, reject); - }; - document.body.appendChild(iframe); - t.add_cleanup(() => iframe.remove()); - }); - }, type + ': ' + description); -} - -// As `promise_test` are serialized, each iframe is created after previous -// iframes and scripts are completely loaded. -for (const type of ['text/javascript', 'module']) { - // Cache the script in V8 Code Cache by running multiple times. - runTest(type, 'abc', 'Run #1'); - runTest(type, 'abc', 'Run #2'); - runTest(type, 'abc', 'Run #3'); - runTest(type, 'abc', 'Run #4'); - // Changing the nonce seems to disable compilation cache, trigger compilation - // using V8 Code Cache and thus expose the bug. - runTest(type, 'def', 'Run #5'); -} -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html deleted file mode 100644 index f336276f3fc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<title>Module importing syntax error script and slow script should not crash UA</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module"> -setup({allow_uncaught_exception: true}); -window.log = []; -window.loaded = false; -</script> -<script type="module"> -import "./syntaxerror.js"; -import "./resources/delayed-modulescript.py"; - -window.loaded = true; -</script> -<script type="module"> -test(() => { - assert_false(loaded); - }, "module graph with a syntax error should not evaulate but should not crash UA."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-1.html deleted file mode 100644 index 2480a60d6d4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-1.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<title>Handling of different types of errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "network error has higher priority than parse error"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 3); - - // A parse error is reported for the first top-level - // <script> element for syntaxerror.js. - assert_equals(log[0].constructor, SyntaxError); - assert_equals(log[1], 1); - - // onerror is called (with no errors reported) due to a network error - // for the second top-level <script>. - assert_equals(log[2], 2); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./syntaxerror.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./error-type-1.js" - onerror="log.push(2)" onload="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-1.js deleted file mode 100644 index 4882d3f2a56..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-1.js +++ /dev/null @@ -1,2 +0,0 @@ -import './syntaxerror.js'; -import './404.js'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-2.html deleted file mode 100644 index 673bf28ca20..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-2.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<title>Handling of different types of errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "parse error has higher priority than instantiation error"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 4); - - // An instantiation error is reported for the first top-level - // <script> element for instantiation-error-1.js. - assert_equals(log[0].constructor, SyntaxError); - assert_equals(log[1], 1); - - // A parse error is reported for the second top-level <script>. - assert_equals(log[2].constructor, SyntaxError); - assert_equals(log[3], 2); - assert_not_equals(log[0], log[2]); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./instantiation-error-1.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./error-type-2.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-2.js deleted file mode 100644 index 6b113973009..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-2.js +++ /dev/null @@ -1,2 +0,0 @@ -import './instantiation-error-1.js'; -import './syntaxerror.js'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3.html deleted file mode 100644 index 8a16266f4cd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<title>Handling of different types of errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "instantiation error has higher priority than evaluation error"); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 5); - - // An evaluation error is reported for the first top-level - // <script> element for throw.js. - assert_equals(log[0], 'throw'); - assert_true(log[1].foo); - assert_equals(log[2], 1); - - // An instantiation error is reported for the second top-level <script>. - assert_equals(log[3].constructor, SyntaxError); - assert_equals(log[4], 2); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./throw.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./error-type-3.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3.js deleted file mode 100644 index 542be52846a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3.js +++ /dev/null @@ -1,2 +0,0 @@ -import './throw.js'; -import './instantiation-error-1.js'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-common.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-common.js deleted file mode 100644 index 4eb5597a582..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-common.js +++ /dev/null @@ -1,10 +0,0 @@ -function errorHandler(ev) -{ - document._errorReported.push("error"); -} - -document._errorReported = []; -window.addEventListener("error", errorHandler); -window.addEventListener("load", function () { - document._errorReported = document._errorReported.join(","); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.html deleted file mode 100644 index 3a00f62f00f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.html +++ /dev/null @@ -1,16 +0,0 @@ -<!doctype html> -<html> -<head> - <title>html-script-module-errorHandling-parseError-Dependent</title> - <script src="errorhandling-parseerror-common.js"></script> -</head> -<body> - <script type="module" onerror="errorHandler(event);"> - - // No parse errors in the root module, just in the dependent module - import test from "./errorhandling-parseerror-dependent.js"; - document._errorReported = "shouldn't have run dependent module"; - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.js deleted file mode 100644 index 71872c47cfe..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.js +++ /dev/null @@ -1,2 +0,0 @@ -// Parse error in a dependent module -1A diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.html deleted file mode 100644 index 7775aeabb49..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.html +++ /dev/null @@ -1,24 +0,0 @@ -<!doctype html> -<html> -<head> - <title>html-script-module-errorHandling-parseError-DependentMultiple</title> - <script src="errorhandling-parseerror-common.js"></script> -</head> -<body> - <script type="module" onerror="errorHandler(event)"> - - // No parse errors in the root module, just in the dependent module - import test from "./errorhandling-parseerror-dependentmultiple.js"; - document._errorReported = "shouldn't have run dependent module"; - - </script> - <script type="module" onerror="errorHandler(event)"> - - // With the broken dependent module already acquired, try to import it - // again from another root. This root should be unwound appropriately. - import test from "./errorhandling-parseerror-dependentmultiple.js"; - document._errorReported = "really shouldn't have run dependent module"; - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.js deleted file mode 100644 index 71872c47cfe..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.js +++ /dev/null @@ -1,2 +0,0 @@ -// Parse error in a dependent module -1A diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-root.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-root.html deleted file mode 100644 index 012f3e9b8c0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-root.html +++ /dev/null @@ -1,15 +0,0 @@ -<!doctype html> -<html> -<head> - <title>html-script-module-errorHandling-parseError-Root</title> - <script src="errorhandling-parseerror-common.js"></script> -</head> -<body> - <script type="module"> - - // Parse error in a root module - 1A - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype-import.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype-import.js deleted file mode 100644 index 286e1a42298..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype-import.js +++ /dev/null @@ -1,8 +0,0 @@ -import foo from "./errorhandling-wrongMimetype.js?pipe=header(Content-Type,text/plain)"; - -// We don't expect this code to run, the import above should fail! -// If we do run though, don't trigger an error that the testharness -// might misinterpret as the import itself failing to load. - -var A = null; -export { A }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype.js deleted file mode 100644 index 373a5324455..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype.js +++ /dev/null @@ -1,7 +0,0 @@ -// This is a plain JavaScript file, but since it will only be accessed with -// a Content-Type of text/plain and nosniff, it will be seen as invalid. -// The file itself will have no errors/effects, so if it does actually run, -// no error will be detected, and the test will fail. - -var foo = null; -export foo;
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling.html deleted file mode 100644 index cf47465b494..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling.html +++ /dev/null @@ -1,60 +0,0 @@ -<!doctype html> -<html> -<head> - <title>html-script-module-errorHandling</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <style> - - iframe - { display: none; } - - </style> -</head> -<body> - <h1>html-script-module-errorHandling</h1> - <iframe id="iframe_parseError_Root" src="errorhandling-parseerror-root.html"></iframe> - <iframe id="iframe_parseError_Dependent" src="errorhandling-parseerror-dependent.html"></iframe> - <iframe id="iframe_parseError_DependentMultiple" src="errorhandling-parseerror-dependentmultiple.html"></iframe> - <script> - - var tests = [ - { "id": "iframe_parseError_Root", "expected": "error" }, - { "id": "iframe_parseError_Dependent", "expected": "error" }, - { "id": "iframe_parseError_DependentMultiple", "expected": "error,error" }, - ]; - tests.forEach(function (testObj) { - var testHandle = async_test("IFrame test: '" + testObj.id + "'"); - var testTarget = document.getElementById(testObj.id); - testTarget.addEventListener("load", testHandle.step_func(function () { - assert_equals(testTarget.contentDocument._errorReported, testObj.expected, "Unexpected _errorReported value"); - testHandle.done(); - })); - }); - - var test_wrongMimetype_root = async_test("External root module with non-script mimetype"); - var script_wrongMimetype_root = document.createElement("script"); - script_wrongMimetype_root.type = "module"; - script_wrongMimetype_root.src = "errorhandling-wrongMimetype.js?pipe=header(Content-Type,text/plain)"; - script_wrongMimetype_root.addEventListener("error", test_wrongMimetype_root.step_func(function () { - test_wrongMimetype_root.done(); - })); - script_wrongMimetype_root.addEventListener("load", test_wrongMimetype_root.step_func(function () { - assert_unreached("This script should not have loaded!"); - })); - document.body.appendChild(script_wrongMimetype_root); - - var test_wrongMimetype_import = async_test("Module with imported non-script mimetype"); - var script_wrongMimetype_import = document.createElement("script"); - script_wrongMimetype_import.type = "module"; - script_wrongMimetype_import.src = "errorhandling-wrongMimetype-import.js"; - script_wrongMimetype_import.addEventListener("error", test_wrongMimetype_import.step_func(function () { - test_wrongMimetype_import.done(); - })); - script_wrongMimetype_import.addEventListener("load", test_wrongMimetype_import.step_func(function () { - assert_unreached("This script should not have loaded!"); - })); - document.body.appendChild(script_wrongMimetype_import); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html deleted file mode 100644 index 3f2bb35f4e2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<title>Handling of evaluation errors, 1</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Test that exceptions during evaluation lead to error events on " + - "window, and that exceptions are remembered.\n"); - window.addEventListener("load", test_load.step_func_done(ev => { - const exn = log[1]; - assert_array_equals(log, - ["throw", exn, "load", exn, "load", exn, "load", exn, "load"]); - assert_true(exn.foo); - })); - - function logLoad() { log.push("load") } - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="throw.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="throw.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="throw.js" async onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="throw.js" nomodule onerror="unreachable()" - onload="logLoad()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html deleted file mode 100644 index 4f2b3c5a745..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<title>Handling of evaluation errors, 2</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Test that ill-founded cyclic dependencies cause ReferenceError " + - "during evaluation, which leads to error events on window, and that " + - "exceptions are remembered.\n"); - window.addEventListener("load", test_load.step_func_done(ev => { - const exn = log[1]; - assert_array_equals(log, - ["cycle-tdz-access-a", exn, "load", exn, "load", exn, "load"]); - assert_equals(exn.constructor, ReferenceError); - })); - - function logLoad() { log.push("load"); } - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="cycle-tdz-access.js" async onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="cycle-tdz-access.js" nomodule onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="cycle-tdz-access.js" onerror="unreachable()" - onload="logLoad()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html deleted file mode 100644 index 9bfb5df2cf0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<title>Handling of evaluation errors, 3</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Test that exceptions during evaluation lead to error events on " + - "window, and that exceptions are remembered.\n"); - window.addEventListener("load", test_load.step_func_done(ev => { - const exn = log[1]; - assert_array_equals(log, - ["throw", exn, "load", exn, "load", exn, "load", exn, "load", - exn, "load"]); - assert_true(exn.foo); - })); - - function logLoad() { log.push("load"); } - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./throw.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw-nested.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw-nested.js" onerror="unreachable()" - onload="logLoad()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html deleted file mode 100644 index 0b4b7d16622..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<title>Handling of evaluation errors, 4</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - window.addEventListener("onunhandledrejection", unreachable); - - const test_load = async_test( - "Test that exceptions during evaluation lead to error events on " + - "window, and that exceptions are remembered.\n"); - window.addEventListener("load", test_load.step_func_done(ev => { - const exn = log[1]; - assert_array_equals(log, - ["throw", exn, "load", exn, "load", exn, "load", exn, "load", - exn, "load"]); - assert_true(exn.foo); - })); - - function logLoad() { log.push("load"); } - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./throw-nested.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw-nested.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw-nested.js" onerror="unreachable()" - onload="logLoad()"></script> -<script type="module" src="./throw.js" onerror="unreachable()" - onload="logLoad()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered2.js deleted file mode 100644 index d7115a2ac62..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered2.js +++ /dev/null @@ -1,3 +0,0 @@ -test_dynamicOrdered.step(function() { - assert_execCount(1, 2, "External script element (#1) should have fired second"); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered3.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered3.js deleted file mode 100644 index c04e101bb80..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered3.js +++ /dev/null @@ -1,3 +0,0 @@ -test_dynamicOrdered.step(function() { - assert_execCount(1, 3, "External script element (#2) should have fired third"); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered4.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered4.js deleted file mode 100644 index 958736a3d86..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered4.js +++ /dev/null @@ -1,3 +0,0 @@ -test_dynamicOrdered.step(function() { - assert_execCount(1, 4, "External script element (#3) should have fired fourth"); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered1.js deleted file mode 100644 index a54cb7a3032..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered1.js +++ /dev/null @@ -1,3 +0,0 @@ -test_dynamicUnordered1.step(function() { - test_dynamicUnordered1.done(); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered2.js deleted file mode 100644 index df0cd85421d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered2.js +++ /dev/null @@ -1,3 +0,0 @@ -test_dynamicUnordered2.step(function() { - test_dynamicUnordered2.done(); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered2.js deleted file mode 100644 index fca73bd9dbd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered2.js +++ /dev/null @@ -1,3 +0,0 @@ -test_parsedOrdered.step(function() { - assert_execCount(0, 2, "External deferred (#1) script element should have fired second"); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered4.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered4.js deleted file mode 100644 index 6435333bb96..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered4.js +++ /dev/null @@ -1,3 +0,0 @@ -test_parsedOrdered.step(function() { - assert_execCount(0, 4, "External deferred (#2) script element should have fired fourth"); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered1.js deleted file mode 100644 index ea0bb1b4863..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered1.js +++ /dev/null @@ -1,3 +0,0 @@ -test_parsedUnordered1.step(function() { - test_parsedUnordered1.done(); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered2.js deleted file mode 100644 index ce219ee0ea5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered2.js +++ /dev/null @@ -1,3 +0,0 @@ -test_parsedUnordered2.step(function() { - test_parsedUnordered2.done(); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder.html deleted file mode 100644 index 6a7513dc136..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder.html +++ /dev/null @@ -1,106 +0,0 @@ -<!doctype html> -<html> -<head> - <title>html-script-module-execOrder</title> - <meta name=timeout content=long> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script> - - var execCounts = [ - 0, // test_parsedOrdered - 0, // test_dynamicOrdered - ]; - function assert_execCount(set, expected, description) - { - if (!execCounts[set]) - { - execCounts[set] = 0; - } - assert_equals(++execCounts[set], expected, description); - } - - function create_script(src, opts) - { - var element = document.createElement("script"); - element.src = src; - element.async = (opts.asyncOrdered ? false : true); - element.type = (opts.module ? "module" : "text/javascript"); - document.body.appendChild(element); - } - - </script> -</head> -<body> - <h1>html-script-module-execOrder</h1> - <script> - - ///// - // Start test_parsedUnordered* - ///// - var test_parsedUnordered1 = async_test("Unordered module script execution (parsed, unordered #1)"); - var test_parsedUnordered2 = async_test("Unordered module script execution (parsed, unordered #2)"); - </script> - <script type="module" src="execorder-parsedunordered1.js"></script> - <script type="module" src="execorder-parsedunordered2.js"></script> - <script> - ///// - // End test_parsedUnordered* - ///// - - ///// - // Start test_dynamicUnordered* - ///// - var test_dynamicUnordered1 = async_test("Unordered module script execution (dynamic, unordered #1)"); - var test_dynamicUnordered2 = async_test("Unordered module script execution (dynamic, unordered #2)"); - create_script("execorder-dynamicunordered1.js", { module: true }); - create_script("execorder-dynamicunordered2.js", { module: true }); - ///// - // End test_dynamicUnordered* - ///// - - ///// - // Begin test_parsedOrdered - ///// - var test_parsedOrdered = async_test("Interlaced module/non-module script execution (parsed, async-ordered)"); - window.addEventListener("load", test_parsedOrdered.step_func(function() { - assert_execCount(0, 5, "onload should have fired fifth"); - test_parsedOrdered.done(); - })); - </script> - <script src="execorder-parsedordered2.js" defer></script> - <script type="module"> - test_parsedOrdered.step(function() { - assert_execCount(0, 3, "Inline module-typed script element should have fired third"); - }); - </script> - <script src="execorder-parsedordered4.js" defer></script> - <script> - test_parsedOrdered.step(function() { - assert_execCount(0, 1, "Inline untyped script element should have fired first"); - }); - ///// - // End test_parsedOrdered - ///// - - ///// - // Start test_dynamicOrdered - ///// - var test_dynamicOrdered = async_test("Interlaced module/non-module script execution (dynamic, async-ordered)"); - window.addEventListener("load", test_dynamicOrdered.step_func(function() { - assert_execCount(1, 5, "onload should have fired fifth (last)"); - test_dynamicOrdered.done(); - })); - create_script("execorder-dynamicordered2.js", { asyncOrdered: true, module: false }); - create_script("execorder-dynamicordered3.js", { asyncOrdered: true, module: true }); - create_script("execorder-dynamicordered4.js", { asyncOrdered: true, module: false }); - test_dynamicOrdered.step(function() { - assert_execCount(1, 1, "Inline untyped script element should have fired first"); - }); - ///// - // End test_dynamicOrdered - ///// - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-default.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-default.js deleted file mode 100644 index 283830ab280..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-default.js +++ /dev/null @@ -1,2 +0,0 @@ -log.push("export-default"); -export default "fox"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something-nested.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something-nested.js deleted file mode 100644 index ca806eb8b1b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something-nested.js +++ /dev/null @@ -1,2 +0,0 @@ -log.push("export-something-nested"); -export * from "./export-something.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something.js deleted file mode 100644 index cf2c3a99feb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something.js +++ /dev/null @@ -1,3 +0,0 @@ -log.push("export-something"); -export let foo = 42; -export function set_foo(x) { foo = x }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-1.html deleted file mode 100644 index 170bb665ff8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-1.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<title>Handling of fetch errors, 1</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that failure to fetch root leads to error event on script."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, ["script"]); - })); -</script> -<script type="module" src="./no-such-file.js" onerror="log.push('script')"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.html deleted file mode 100644 index 9386ce603a9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<title>Handling of fetch errors, 2</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that failure to fetch dependency leads to error event on script."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, ["script"]); - })); -</script> -<script type="module" src="./fetch-error-2.js" onerror="log.push('script')"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.js deleted file mode 100644 index 20c0ea6402f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./no-such-file.js" -import "./this.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js deleted file mode 100644 index cfaeabc47e1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js +++ /dev/null @@ -1 +0,0 @@ -export let importMetaOnDependentModule = import.meta; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-object.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-object.any.js deleted file mode 100644 index 494e1681023..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-object.any.js +++ /dev/null @@ -1,20 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module,serviceworker-module - -test(() => { - assert_equals(typeof import.meta, "object"); - assert_not_equals(import.meta, null); -}, "import.meta is an object"); - -test(() => { - import.meta.newProperty = 1; - assert_true(Object.isExtensible(import.meta)); -}, "import.meta is extensible"); - -test(() => { - for (const name of Reflect.ownKeys(import.meta)) { - const desc = Object.getOwnPropertyDescriptor(import.meta, name); - assert_equals(desc.writable, true); - assert_equals(desc.enumerable, true); - assert_equals(desc.configurable, true); - } -}, "import.meta's properties are writable, configurable, and enumerable"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve-importmap.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve-importmap.html deleted file mode 100644 index 214b9bb59c3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve-importmap.html +++ /dev/null @@ -1,57 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<!-- - More extensive tests of import maps and import.meta.resolve() will be - located in the import maps test suite. This contains some basic tests plus - tests some tricky parts of the import.meta.resolve() algorithm around string - conversion which are only testable with import maps. ---> - -<script type="importmap"> -{ - "imports": { - "bare": "https://example.com/", - "https://example.com/rewrite": "https://example.com/rewritten", - - "1": "https://example.com/PASS-1", - "null": "https://example.com/PASS-null", - "undefined": "https://example.com/PASS-undefined", - "[object Object]": "https://example.com/PASS-object", - - "./start": "./resources/export-1.mjs", - "./resources/export-1.mjs": "./resources/export-2.mjs" - } -} -</script> - -<script type="module"> -test(() => { - assert_equals(import.meta.resolve("bare"), "https://example.com/"); -}, "import.meta.resolve() given an import mapped bare specifier"); - -test(() => { - assert_equals(import.meta.resolve("https://example.com/rewrite"), "https://example.com/rewritten"); -}, "import.meta.resolve() given an import mapped URL-like specifier"); - -test(() => { - assert_equals(import.meta.resolve(), "https://example.com/PASS-undefined", "no-arg case"); - - assert_equals(import.meta.resolve(1), "https://example.com/PASS-1"); - assert_equals(import.meta.resolve(null), "https://example.com/PASS-null"); - assert_equals(import.meta.resolve(undefined), "https://example.com/PASS-undefined"); - - // Only toString() methods are consulted by ToString, not valueOf() ones. - // So this becomes "[object Object]". - assert_equals(import.meta.resolve({ valueOf() { return "./x"; } }), "https://example.com/PASS-object"); -}, "Testing the ToString() step of import.meta.resolve() via import maps"); - -promise_test(async () => { - const one = (await import("./start")).default; - assert_equals(one, 1); - - const two = (await import(import.meta.resolve("./start"))).default; - assert_equals(two, 2); -}, "import(import.meta.resolve(x)) can be different from import(x)"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve-multiple-scripts.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve-multiple-scripts.html deleted file mode 100644 index d2e0f185e0b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve-multiple-scripts.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<iframe src="resources/store-import-meta.html"></iframe> - -<script type="module"> -import * as otherImportMeta from "./resources/export-import-meta.mjs"; -setup({ explicit_done: true }); - -window.onload = () => { - test(() => { - assert_not_equals(frames[0].importMetaURL, import.meta.url, - "Precondition check: we've set things up so that the other script has a different import.meta.url"); - - const expected = (new URL("resources/x", location.href)).href; - assert_equals(frames[0].importMetaResolve("./x"), expected); - }, "import.meta.resolve resolves URLs relative to the import.meta.url, not relative to the active script when it is called: another global's inline script"); - - test(() => { - const otherFrameImportMetaResolve = frames[0].importMetaResolve; - - document.querySelector("iframe").remove(); - - const expected = (new URL("resources/x", location.href)).href; - assert_equals(otherFrameImportMetaResolve("./x"), expected); - }, "import.meta.resolve still works if its global has been destroyed (by detaching the iframe)"); - - test(() => { - assert_not_equals(otherImportMeta.url, import.meta.url, - "Precondition check: we've set things up so that the other script has a different import.meta.url"); - - const expected = (new URL("resources/x", location.href)).href; - assert_equals(otherImportMeta.resolve("./x"), expected); - }, "import.meta.resolve resolves URLs relative to the import.meta.url, not relative to the active script when it is called: another module script"); - - done(); -}; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve.any.js deleted file mode 100644 index 5b8a84efaf9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-resolve.any.js +++ /dev/null @@ -1,77 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module,serviceworker-module - -import { importMetaOnRootModule, importMetaOnDependentModule } - from "./import-meta-root.js"; - -test(() => { - assert_equals(typeof import.meta.resolve, "function"); - assert_equals(import.meta.resolve.name, "resolve"); - assert_equals(import.meta.resolve.length, 1); - assert_equals(Object.getPrototypeOf(import.meta.resolve), Function.prototype); -}, "import.meta.resolve is a function with the right properties"); - -test(() => { - assert_false(isConstructor(import.meta.resolve)); - - assert_throws_js(TypeError, () => new import.meta.resolve("./x")); -}, "import.meta.resolve is not a constructor"); - -test(() => { - // See also tests in ./import-meta-resolve-importmap.html. - - assert_equals(import.meta.resolve({ toString() { return "./x"; } }), resolveURL("x")); - assert_throws_js(TypeError, () => import.meta.resolve(Symbol("./x")), - "symbol"); - assert_throws_js(TypeError, () => import.meta.resolve(), - "no argument (which is treated like \"undefined\")"); -}, "import.meta.resolve ToString()s its argument"); - -test(() => { - assert_equals(import.meta.resolve("./x"), resolveURL("x"), - "current module import.meta"); - assert_equals(importMetaOnRootModule.resolve("./x"), resolveURL("x"), - "sibling module import.meta"); - assert_equals(importMetaOnDependentModule.resolve("./x"), resolveURL("x"), - "dependency module import.meta"); -}, "Relative URL-like specifier resolution"); - -test(() => { - assert_equals(import.meta.resolve("https://example.com/"), "https://example.com/", - "current module import.meta"); - assert_equals(importMetaOnRootModule.resolve("https://example.com/"), "https://example.com/", - "sibling module import.meta"); - assert_equals(importMetaOnDependentModule.resolve("https://example.com/"), "https://example.com/", - "dependency module import.meta"); -}, "Absolute URL-like specifier resolution"); - -test(() => { - const invalidSpecifiers = [ - "https://eggplant:b/c", - "pumpkins.js", - ".tomato", - "..zuccini.mjs", - ".\\yam.es" - ]; - - for (const specifier of invalidSpecifiers) { - assert_throws_js(TypeError, () => import.meta.resolve(specifier), specifier); - } -}, "Invalid module specifiers"); - -test(() => { - const { resolve } = import.meta; - assert_equals(resolve("https://example.com/"), "https://example.com/", "current module import.meta"); -}, "Works fine with no this value"); - -function resolveURL(urlRelativeToThisTest) { - return (new URL(urlRelativeToThisTest, location.href)).href; -} - -function isConstructor(o) { - try { - new (new Proxy(o, { construct: () => ({}) })); - return true; - } catch { - return false; - } -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js deleted file mode 100644 index 62ec082a8ef..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js +++ /dev/null @@ -1,2 +0,0 @@ -export let importMetaOnRootModule = import.meta; -export { importMetaOnDependentModule } from "./import-meta-dependent.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.any.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.any.js deleted file mode 100644 index 61d96f35af3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.any.js +++ /dev/null @@ -1,38 +0,0 @@ -// META: global=dedicatedworker-module,sharedworker-module,serviceworker-module - -import { importMetaOnRootModule, importMetaOnDependentModule } - from "./import-meta-root.js"; - -const base = location.href.slice(0, location.href.lastIndexOf('/')); - -test(() => { - assert_equals(importMetaOnRootModule.url, - base + "/import-meta-root.js"); -}, "import.meta.url in a root external script"); - -test(() => { - assert_equals(importMetaOnDependentModule.url, - base + "/import-meta-dependent.js"); -}, "import.meta.url in a dependent external script"); - - -import { importMetaOnRootModule as hashedImportMetaOnRootModule1, - importMetaOnDependentModule as hashedImportMetaOnDependentModule1 } - from "./import-meta-root.js#1"; - -import { importMetaOnRootModule as hashedImportMetaOnRootModule2, - importMetaOnDependentModule as hashedImportMetaOnDependentModule2 } - from "./import-meta-root.js#2"; - -test(() => { - assert_equals(hashedImportMetaOnRootModule1.url, - base + "/import-meta-root.js#1"); - assert_equals(hashedImportMetaOnRootModule2.url, - base + "/import-meta-root.js#2"); - - // Must not be affected - assert_equals(hashedImportMetaOnDependentModule1.url, - base + "/import-meta-dependent.js"); - assert_equals(hashedImportMetaOnDependentModule2.url, - base + "/import-meta-dependent.js"); -}, "import.meta.url when importing the module with different fragments"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html deleted file mode 100644 index 284a15f2b23..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module" src="import-meta-url.any.js"></script> - -<script type="module"> -const base = location.href.slice(0, location.href.lastIndexOf('/')); - -test(() => { - assert_equals(import.meta.url, location.href); -}, "import.meta.url in a root inline script"); - -for (const workerType of ['DedicatedWorker', 'SharedWorker']) { - promise_test(async t => { - const worker_request_url = - new URL(`postmessage-worker.js?${workerType}`, location); - let w; - let port; - if (workerType === 'DedicatedWorker') { - w = new Worker(worker_request_url.href, {type: 'module'}); - port = w; - } else { - w = new SharedWorker(worker_request_url.href, {type: 'module'}); - port = w.port; - w.port.start(); - } - w.onerror = t.unreached_func('Worker error'); - const url = await new Promise(resolve => { - port.onmessage = evt => resolve(evt.data); - }); - assert_equals(url, worker_request_url.href); - }, `import.meta.url at top-level module ${workerType}`); -} -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/postmessage-worker.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/postmessage-worker.js deleted file mode 100644 index 3618137aef9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/postmessage-worker.js +++ /dev/null @@ -1,12 +0,0 @@ -if ('DedicatedWorkerGlobalScope' in self && - self instanceof DedicatedWorkerGlobalScope) { - postMessage(import.meta.url); -} else if ( - 'SharedWorkerGlobalScope' in self && - self instanceof SharedWorkerGlobalScope) { - self.onconnect = function(e) { - const port = e.ports[0]; - port.start(); - port.postMessage(import.meta.url); - }; -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-1.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-1.mjs deleted file mode 100644 index aef22247d75..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-1.mjs +++ /dev/null @@ -1 +0,0 @@ -export default 1; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-2.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-2.mjs deleted file mode 100644 index 842e368a0a2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-2.mjs +++ /dev/null @@ -1 +0,0 @@ -export default 2; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-import-meta.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-import-meta.mjs deleted file mode 100644 index 488ca74c935..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/export-import-meta.mjs +++ /dev/null @@ -1,2 +0,0 @@ -export const url = import.meta.url; -export const resolve = import.meta.resolve; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/store-import-meta.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/store-import-meta.html deleted file mode 100644 index c9751da408b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/resources/store-import-meta.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<script type="module"> -window.importMetaURL = import.meta.url; -window.importMetaResolve = import.meta.resolve; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-something-namespace.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-something-namespace.js deleted file mode 100644 index 32d90287d77..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-something-namespace.js +++ /dev/null @@ -1,5 +0,0 @@ -log.push("import-something-namespace"); -log.push(m.foo); -m.set_foo(43); -log.push(m.foo); -import * as m from "./export-something.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html deleted file mode 100644 index 4911a071a0f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module"> -import { delayedLoaded } from "./resources/delayed-modulescript.py"; -import { A } from "./404.js"; -window.loadSuccess = delayedLoaded; -</script> -<script type="module"> -test(function () { - assert_equals(window.loadSuccess, undefined, - "module tree w/ its sub graph 404 should fail to load without crashing"); -}, "Import a module graph w/ sub-graph 404."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-a.js deleted file mode 100644 index 44d1ac96c2c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-a.js +++ /dev/null @@ -1,3 +0,0 @@ -var A = { "from": "imports-a.js" }; -window.evaluated_imports_a = true; -export { A }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-b.js deleted file mode 100644 index ae194e4d8a4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-b.js +++ /dev/null @@ -1 +0,0 @@ -export var B = { "from": "imports-b.js" }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-a.js deleted file mode 100644 index 8bd8526f761..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-a.js +++ /dev/null @@ -1,2 +0,0 @@ -import { CycleB } from "./imports-cycle-b.js"; -export var CycleA = "CycleA"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-b.js deleted file mode 100644 index 218f350c391..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-b.js +++ /dev/null @@ -1,2 +0,0 @@ -import { CycleA } from "./imports-cycle-a.js"; -export var CycleB = "CycleB"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle.js deleted file mode 100644 index 88a77a4d67a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle.js +++ /dev/null @@ -1,6 +0,0 @@ -import { CycleA } from "./imports-cycle-a.js"; - -test_importCycle.step(function () { - assert_equals(CycleA, "CycleA"); - test_importCycle.done(); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-a.js deleted file mode 100644 index 8cb2298e8a0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-a.js +++ /dev/null @@ -1,2 +0,0 @@ -import { A } from "./imports-a.js"; -export { A as INC_A }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-ab.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-ab.js deleted file mode 100644 index b7d84005c58..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-ab.js +++ /dev/null @@ -1,5 +0,0 @@ -import { A } from "./imports-a.js"; -export { A as INC_AB_A }; - -import { B } from "./imports-b.js"; -export { B as INC_AB_B }; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-b.js deleted file mode 100644 index 243b84fdd09..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-b.js +++ /dev/null @@ -1,2 +0,0 @@ -import { B } from "./imports-b.js"; -export { B as INC_B };
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self-inner.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self-inner.js deleted file mode 100644 index 40eca1c8dfb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self-inner.js +++ /dev/null @@ -1,2 +0,0 @@ -import { SelfInner as SelfInnerA } from "./imports-self-inner.js"; -export var SelfInner = "SelfInner"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self.js deleted file mode 100644 index 05fa60e2dce..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self.js +++ /dev/null @@ -1,6 +0,0 @@ -import { SelfInner } from "./imports-self-inner.js"; - -test_importSelf.step(function () { - assert_equals(SelfInner, "SelfInner"); - test_importSelf.done(); -}); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports.html deleted file mode 100644 index ca6900744dc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports.html +++ /dev/null @@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>html-script-module-imports</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <h1>html-script-module-imports</h1> - - <script type="module"> - - import { A } from "./imports-a.js"; - - test(function () { - assert_equals(A.from, "imports-a.js", "Unexpected A"); - }, "Import a simple module"); - - </script> - <script type="module"> - - import { B as B_RENAMED } from "./imports-b.js"; - - test(function () { - assert_equals(B_RENAMED.from, "imports-b.js", "Unexpected B_RENAMED"); - - try - { - B; - assert_unreached("Unexpectedly defined B"); - } - catch (ex) - {} - }, "Import a simple module, renamed"); - - </script> - <script type="module"> - - import { INC_A } from "./imports-inc-a.js"; - import { INC_B } from "./imports-inc-b.js"; - import { INC_AB_A, INC_AB_B } from "./imports-inc-ab.js"; - - test(function () { - assert_equals(INC_A.from, "imports-a.js", "Unexpected INC_A"); - assert_equals(INC_B.from, "imports-b.js", "Unexpected INC_A"); - assert_equals(INC_AB_A.from, "imports-a.js", "Unexpected INC_A"); - assert_equals(INC_AB_B.from, "imports-b.js", "Unexpected INC_A"); - assert_equals(INC_A, INC_AB_A, "INC_A and INC_AB_A should be the same"); - assert_equals(INC_B, INC_AB_B, "INC_B and INC_AB_B should be the same"); - }, "Import the same module multiple times"); - - </script> - - <script> - var test_importSelf = async_test("Import a module that validly imports itself"); - </script> - <script type="module" src="imports-self.js"></script> - - <script> - var test_importCycle = async_test("Import a module with a valid cyclical module dependency"); - </script> - <script type="module" src="imports-cycle.js"></script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/inactive-context-import.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/inactive-context-import.html deleted file mode 100644 index ce88c0a1528..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/inactive-context-import.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Dynamic import triggered from inactive context should not crash</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="container"> -<iframe></iframe> -</div> - -<script> -test(() => { - const iframe = document.querySelector('iframe'); - const otherWindow = iframe.contentWindow; - iframe.remove(); - - // Below should not crash - otherWindow.eval(`import('foobar');`); -}, 'dynamic import from inactive context should not crash'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html deleted file mode 100644 index db03612e82b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html +++ /dev/null @@ -1,29 +0,0 @@ -<html> - <head> - <title>Inline async module script execution order</title> - <meta name=timeout content=long> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <script> - let loaded = []; - let test = async_test("Inline async module script execution order"); - window.addEventListener("load", test.step_func(function() { - assert_array_equals(loaded, - ["fast", "fast", "fast", "slow", "slow", "slow"]); - test.done(); - })); - </script> - <script type="module" async src="resources/slow-module.js?pipe=trickle(d2)&unique=1"></script> - <script type="module" async> - import "./resources/slow-module.js?pipe=trickle(d2)&unique=2"; - loaded.push("slow"); - </script> - <script type="module" async src="resources/fast-module.js?unique=1"></script> - <script type="module" async> - import "./resources/fast-module.js?unique=2"; - loaded.push("fast"); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html deleted file mode 100644 index 57b40f5baaf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 1</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - const test_load = async_test( - "Test that missing exports lead to SyntaxError events on window and " + - "load events on script"); - - window.log = []; - window.addEventListener("error", ev => { - test_load.step(() => assert_equals(ev.error.constructor, SyntaxError)); - log.push(ev.message); - }); - - window.addEventListener("load", test_load.step_func_done(ev => { - const msg = log[0]; - assert_array_equals(log, [msg, 1, msg, 2, msg, 3, msg, 4, msg, 5]); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./missing-export.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./missing-export.js" - onerror="unreachable()" onload="log.push(2)"></script> -<script type="module" src="./missing-export-nested.js" - onerror="unreachable()" onload="log.push(3)"></script> -<script type="module" src="./missing-export.js" - onerror="unreachable()" onload="log.push(4)"></script> -<script type="module" src="./missing-export-nested.js" - onerror="unreachable()" onload="log.push(5)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.js deleted file mode 100644 index e317b01cc21..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.js +++ /dev/null @@ -1 +0,0 @@ -import something from "./instantiation-error-1.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html deleted file mode 100644 index 27ba006fc7a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 2</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - const test_load = async_test( - "Test that missing exports lead to SyntaxError events on window and " + - "load events on script"); - - window.log = []; - window.addEventListener("error", ev => { - test_load.step(() => assert_equals(ev.error.constructor, SyntaxError)); - log.push(ev.message); - }); - - window.addEventListener("load", test_load.step_func_done(ev => { - const msg = log[0]; - assert_array_equals(log, [msg, 1, msg, 2, msg, 3, msg, 4, msg, 5]); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./missing-export-nested.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./missing-export-nested.js" - onerror="unreachable()" onload="log.push(2)"></script> -<script type="module" src="./missing-export.js" - onerror="unreachable()" onload="log.push(3)"></script> -<script type="module" src="./missing-export-nested.js" - onerror="unreachable()" onload="log.push(4)"></script> -<script type="module" src="./missing-export.js" - onerror="unreachable()" onload="log.push(5)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html deleted file mode 100644 index 32f0a4a243e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 3</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - const test_load = async_test( - "Test that unresolvable cycles lead to SyntaxError events on window " + - "and load events on script"); - - window.log = []; - window.addEventListener("error", ev => { - test_load.step(() => assert_equals(ev.error.constructor, SyntaxError)); - log.push(ev.message); - }); - - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 6, 'Log length'); - assert_equals(log[1], 1); - assert_equals(log[3], 2); - assert_equals(log[5], 3); - assert_not_equals(log[0], log[2], - 'Instantiation error objects for different root scripts'); - assert_equals(log[0], log[4], - 'Instantiation error objects for the same root script'); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./cycle-unresolvable.js" - onerror="unreachable()" onload="log.push(1)" nomodule></script> -<script type="module" src="./cycle-unresolvable-a.js" - onerror="unreachable()" onload="log.push(2)"></script> -<script type="module" src="./cycle-unresolvable.js" - onerror="unreachable()" onload="log.push(3)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html deleted file mode 100644 index 8d3f23819a1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 4</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - const test_load = async_test( - "Test that loading a graph in which a module is already " + - "errored results in an error."); - - window.addEventListener("error", ev => { - test_load.step(() => assert_equals(ev.error.constructor, SyntaxError)); - log.push(ev.message); - }); - - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 4, 'Log length'); - assert_equals(log[1], 1); - assert_equals(log[3], 2); - assert_not_equals(log[0], log[2], - 'Instantiation error objects for different root scripts'); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./instantiation-error-4a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./instantiation-error-4d.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4a.js deleted file mode 100644 index 6fed27f1c7b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4a.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./instantiation-error-4b.js"; -log.push("instantiation-error-4a"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4b.js deleted file mode 100644 index 4b702cae676..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4b.js +++ /dev/null @@ -1,3 +0,0 @@ -import "./instantiation-error-4c.js"; -import "./instantiation-error-4d.js"; -log.push("instantiation-error-4b"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4c.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4c.js deleted file mode 100644 index ef699f6ca35..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4c.js +++ /dev/null @@ -1,2 +0,0 @@ -import {something} from "./instantiation-error-4c.js"; -log.push("instantiation-error-4c"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4d.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4d.js deleted file mode 100644 index ac04ccb9b34..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4d.js +++ /dev/null @@ -1,2 +0,0 @@ -import {something} from "./instantiation-error-4d.js"; -log.push("instantiation-error-4d"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html deleted file mode 100644 index 20df0bb5c96..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 5</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - const test_load = async_test( - "Test that loading a graph in which a module is already " + - "errored results an error."); - - window.log = []; - window.addEventListener("error", ev => { - test_load.step(() => assert_equals(ev.error.constructor, SyntaxError)); - log.push(ev.message); - }); - - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 4, 'Log length'); - assert_equals(log[1], 1); - assert_equals(log[3], 2); - assert_not_equals(log[0], log[2], - 'Instantiation error objects for different root scripts'); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./instantiation-error-5a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./instantiation-error-5d.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5a.js deleted file mode 100644 index b2e6b106b21..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5a.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./instantiation-error-5b.js"; -log.push("instantiation-error-5a"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5b.js deleted file mode 100644 index 2d37ae8fff5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5b.js +++ /dev/null @@ -1,3 +0,0 @@ -import "./instantiation-error-5c.js"; -import "./instantiation-error-5d.js"; -log.push("instantiation-error-5b"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5c.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5c.js deleted file mode 100644 index ba221b6fc03..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5c.js +++ /dev/null @@ -1,2 +0,0 @@ -import {something} from "./instantiation-error-5c.js"; -log.push("instantiation-error-5c"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5d.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5d.js deleted file mode 100644 index 9775e04f822..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5d.js +++ /dev/null @@ -1,3 +0,0 @@ -import "./instantiation-error-5e.js"; -import "./instantiation-error-5a.js"; -log.push("instantiation-error-5d"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5e.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5e.js deleted file mode 100644 index 8bd3b3c3bf2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5e.js +++ /dev/null @@ -1,2 +0,0 @@ -import {something} from "./instantiation-error-5e.js"; -log.push("instantiation-error-5e"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6.html deleted file mode 100644 index 8d3ce121eea..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6.html +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 6</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that ambiguous star exports lead to an instantiation error " + - "and that the correct module is blamed."); - // Concretely, instantiation-error-6a.js fails to instantiate because it - // requests a name from instantion-error-6b.js that is ambiguous there. - // instantiation-error-6b.js itself, however, is fine, and it instantiates - // and evaluates successfully. - window.addEventListener("load", test_load.step_func_done(ev => { - const exn = log[0]; - assert_array_equals(log, [ - exn, 1, - "instantiation-error-6c", - "instantiation-error-6d", - "instantiation-error-6b", 2 - ]); - assert_equals(exn.constructor, SyntaxError); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./instantiation-error-6a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./instantiation-error-6b.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6a.js deleted file mode 100644 index 4db49c6c46b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6a.js +++ /dev/null @@ -1,2 +0,0 @@ -import {foo} from "./instantiation-error-6b.js"; -log.push("instantiation-error-6a"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6b.js deleted file mode 100644 index 35272fe550f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6b.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./instantiation-error-6c.js"; -export * from "./instantiation-error-6d.js"; -log.push("instantiation-error-6b"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6c.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6c.js deleted file mode 100644 index 69d616b4bab..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6c.js +++ /dev/null @@ -1,2 +0,0 @@ -export let foo = "c"; -log.push("instantiation-error-6c"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6d.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6d.js deleted file mode 100644 index d1336a57a24..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6d.js +++ /dev/null @@ -1,2 +0,0 @@ -export let foo = "d"; -log.push("instantiation-error-6d"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7.html deleted file mode 100644 index 57f1f872161..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 7</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that ambiguous star exports lead to an instantiation error, " + - "even when discovered through a star export, and that the correct " + - "module is blamed."); - // This is a variation of instantiation-error-6.html (see the explanation - // there). - window.addEventListener("load", test_load.step_func_done(ev => { - const exn = log[0]; - assert_array_equals(log, [ - exn, 1, - "instantiation-error-7d", - "instantiation-error-7e", - "instantiation-error-7c", - "instantiation-error-7f", - "instantiation-error-7b", 2 - ]); - assert_equals(exn.constructor, SyntaxError); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./instantiation-error-7a.js" - onerror="unreachable()" onload="log.push(1)"></script> -<script type="module" src="./instantiation-error-7b.js" - onerror="unreachable()" onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7a.js deleted file mode 100644 index d27a44865cf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7a.js +++ /dev/null @@ -1,2 +0,0 @@ -import {foo} from "./instantiation-error-7b.js"; -log.push("instantiation-error-7a"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7b.js deleted file mode 100644 index 8c05d3b7274..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7b.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./instantiation-error-7c.js"; -export * from "./instantiation-error-7f.js"; -log.push("instantiation-error-7b"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7c.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7c.js deleted file mode 100644 index fff1368034b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7c.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./instantiation-error-7d.js"; -export * from "./instantiation-error-7e.js"; -log.push("instantiation-error-7c"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7d.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7d.js deleted file mode 100644 index fa5e7651f4f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7d.js +++ /dev/null @@ -1,2 +0,0 @@ -export let foo = "d"; -log.push("instantiation-error-7d"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7e.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7e.js deleted file mode 100644 index 6547c3fe6a2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7e.js +++ /dev/null @@ -1,2 +0,0 @@ -export let foo = "e"; -log.push("instantiation-error-7e"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7f.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7f.js deleted file mode 100644 index 7f9ec5d12ec..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7f.js +++ /dev/null @@ -1,2 +0,0 @@ -export let foo = "f"; -log.push("instantiation-error-7f"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html deleted file mode 100644 index 080b1702337..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<title>Handling of instantiation errors, 8</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<!-- The below module tree should fail to instantiate, since it references undefined identifier. --> -<script type="module" src="instantiation-error-1.js"></script> -<script> -setup({allow_uncaught_exception: true}); - -promise_test(t => { - return new Promise(resolve => { - window.addEventListener("error", e => { - assert_equals(e.error.constructor, SyntaxError); - resolve(); - }, { once: true }); - }).then(() => new Promise(resolve => { - window.addEventListener("error", e => { - assert_equals(e.error.constructor, SyntaxError); - resolve(); - }, { once: true }); - // Load another module tree w/ previously instantiate-failed tree as its sub-tree. - document.head.appendChild(Object.assign( - document.createElement('script'), - { type: 'module', innerText: 'import "./instantiation-error-1.js"'})); - })); -}, "Instantiate attempt on a tree w/ previously instantiate-failed tree as a sub-tree shouldn't crash."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches-inner.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches-inner.js deleted file mode 100644 index 369b3e7827d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches-inner.js +++ /dev/null @@ -1 +0,0 @@ -window.matchesLog.push("integrity-matches-inner"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches.js deleted file mode 100644 index d8c4219e90b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./integrity-matches-inner.js"; -window.matchesLog.push("integrity-matches"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches-inner.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches-inner.js deleted file mode 100644 index 8182d4de162..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches-inner.js +++ /dev/null @@ -1 +0,0 @@ -window.mismatchesLog.push("integrity-mismatches-inner"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches.js deleted file mode 100644 index 2d47344a5ac..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./integrity-mismatches-inner.js"; -window.mismatchesLog.push("integrity-mismatches"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity.html deleted file mode 100644 index c79843624fa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity.html +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title><script> integrity=""</title> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -window.inlineRan = false; - -window.matchesLog = []; -window.matchesEvents = []; - -window.mismatchesLog = []; -window.mismatchesEvents = []; -</script> - -<script type="module" integrity="sha384-garbage"> -window.inlineRan = true; -</script> - -<script type="module" src="integrity-matches.js" integrity="sha384-1/XwTy38IAlmvk1O674Efus1/REqfuX6x0V/B2/GX5R3lNbRjhrIwlWyEDPyOwpN" onload="window.matchesEvents.push('load');" onerror="window.matchesEvents.push('error')"></script> -<script type="module" src="integrity-mismatches.js" integrity="sha384-doesnotmatch" onload="window.mismatchesEvents.push('load');" onerror="window.mismatchesEvents.push('error')"></script> - -<script type="module"> -test(() => { - assert_true(window.inlineRan); -}, "The integrity attribute must have no affect on inline module scripts"); - -test(() => { - assert_array_equals(window.matchesLog, ["integrity-matches-inner", "integrity-matches"], "The module and its dependency must have executed"); - assert_array_equals(window.matchesEvents, ["load"], "The load event must have fired"); -}, "The integrity attribute must be verified on the top-level of a module and allow it to execute when it matches"); - -test(() => { - assert_array_equals(window.mismatchesLog, [], "The module and its dependency must not have executed"); - assert_array_equals(window.mismatchesEvents, ["error"], "The error event must have fired"); -}, "The integrity attribute must be verified on the top-level of a module and not allow it to execute when there's a mismatch"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-namespace-request.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-namespace-request.html deleted file mode 100644 index 00269efdf93..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-namespace-request.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<title>Late namespace request</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test the situation where a module is instantiated without the " + - "need for a namespace object, but later on a different module " + - "requests the namespace."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, - ["export-something", - "import-something-namespace", 42, 43]); - })); -</script> -<script type="module" src="export-something.js"></script> -<script type="module" src="import-something-namespace.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-star-export-request.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-star-export-request.html deleted file mode 100644 index d40bb0aca79..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-star-export-request.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<title>Late star-export request</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test the situation where a module is instantiated without a use of " + - "its star-exports, but later on a different module requests them."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, [ - "export-something", "export-something-nested", - "import-something-namespace", 42, 43]); - })); -</script> -<script type="module" src="export-something-nested.js"></script> -<script type="module"> - log.push("import-something-namespace"); - log.push(foo); - set_foo(43); - log.push(foo); - import {foo, set_foo} from "./export-something-nested.js"; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events-inline.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events-inline.html deleted file mode 100644 index 58397dd07d4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events-inline.html +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for inline module scripts</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -</head> -<script> -"use strict"; - -var test1_load = event_test('src, 200, parser-inserted, defer, no async', false, false); -var test4_load = event_test('src, 200, parser-inserted, no defer, async', false, false); - -var test3_dynamic_load = event_test('src, 200, not parser-inserted, no defer, no async, no non-blocking', false, false); -var test4_dynamic_load = event_test('src, 200, not parser-inserted, no defer, async', false, false); - -var test1_error = event_test('src, 404, parser-inserted, defer, no async', false, true); -var test4_error = event_test('src, 404, parser-inserted, no defer, async', false, true); - -var test3_dynamic_error = event_test('src, 404, not parser-inserted, no defer, no async, no non-blocking', false, true); -var test4_dynamic_error = event_test('src, 404, not parser-inserted, no defer, async', false, true); - -var script3_dynamic_load = document.createElement('script'); -script3_dynamic_load.setAttribute('type', 'module'); -script3_dynamic_load.onload = () => onLoad(test3_dynamic_load); -script3_dynamic_load.onerror = () => onError(test3_dynamic_load); -script3_dynamic_load.async = false; -script3_dynamic_load.appendChild(document.createTextNode('onExecute(test3_dynamic_load);')); -document.head.appendChild(script3_dynamic_load); - -var script3_dynamic_error = document.createElement('script'); -script3_dynamic_error.setAttribute('type', 'module'); -script3_dynamic_error.onload = () => onLoad(test3_dynamic_error); -script3_dynamic_error.onerror = () => onError(test3_dynamic_error); -script3_dynamic_error.async = false; -script3_dynamic_error.appendChild(document.createTextNode('import "./not_found.js";')); -document.head.appendChild(script3_dynamic_error); - -var script4_dynamic_load = document.createElement('script'); -script4_dynamic_load.setAttribute('type', 'module'); -script4_dynamic_load.onload = () => onLoad(test4_dynamic_load); -script4_dynamic_load.onerror = () => onError(test4_dynamic_load); -script4_dynamic_load.async = true; -script4_dynamic_load.appendChild(document.createTextNode('onExecute(test4_dynamic_load);')); -document.head.appendChild(script4_dynamic_load); - -var script4_dynamic_error = document.createElement('script'); -script4_dynamic_error.setAttribute('type', 'module'); -script4_dynamic_error.onload = () => onLoad(test4_dynamic_error); -script4_dynamic_error.onerror = () => onError(test4_dynamic_error); -script4_dynamic_error.async = true; -script4_dynamic_error.appendChild(document.createTextNode('import "./not_found.js";')); -document.head.appendChild(script4_dynamic_error); -</script> - -<script onload="onLoad(test1_load);" onerror="onError(test1_load);" type="module">"use strict";onExecute(test1_load);</script> -<script onload="onLoad(test4_load);" onerror="onError(test4_load);" type="module" async>"use strict";onExecute(test4_load);</script> -<script onload="onLoad(test1_error);" onerror="onError(test1_error);" type="module">"use strict";import "./not_found.js";</script> -<script onload="onLoad(test4_error);" onerror="onError(test4_error);" type="module" async>"use strict";import "./not_found.js";</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events.html deleted file mode 100644 index d9bf05226c7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events.html +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<head> -<title>load/error events for external module scripts</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/load-error-events-helpers.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -</head> -<script> -"use strict"; - -var test1_load = event_test('src, 200, parser-inserted, defer, no async', true, false); -var test4_load = event_test('src, 200, parser-inserted, no defer, async', true, false); - -var test3_dynamic_load = event_test('src, 200, not parser-inserted, no defer, no async, no non-blocking', true, false); -var test4_dynamic_load = event_test('src, 200, not parser-inserted, no defer, async', true, false); - -var test1_error = event_test('src, 404, parser-inserted, defer, no async', false, true); -var test4_error = event_test('src, 404, parser-inserted, no defer, async', false, true); - -var test3_dynamic_error = event_test('src, 404, not parser-inserted, no defer, no async, no non-blocking', false, true); -var test4_dynamic_error = event_test('src, 404, not parser-inserted, no defer, async', false, true); - -var script3_dynamic_load = document.createElement('script'); -script3_dynamic_load.setAttribute('type', 'module'); -script3_dynamic_load.onload = () => onLoad(test3_dynamic_load); -script3_dynamic_load.onerror = () => onError(test3_dynamic_load); -script3_dynamic_load.async = false; -script3_dynamic_load.src = "../resources/load-error-events.py?test=test3_dynamic_load"; -document.head.appendChild(script3_dynamic_load); - -var script3_dynamic_error = document.createElement('script'); -script3_dynamic_error.setAttribute('type', 'module'); -script3_dynamic_error.onload = () => onLoad(test3_dynamic_error); -script3_dynamic_error.onerror = () => onError(test3_dynamic_error); -script3_dynamic_error.async = false; -script3_dynamic_error.src = "../resources/load-error-events.py?test=test3_dynamic_error"; -document.head.appendChild(script3_dynamic_error); - -var script4_dynamic_load = document.createElement('script'); -script4_dynamic_load.setAttribute('type', 'module'); -script4_dynamic_load.onload = () => onLoad(test4_dynamic_load); -script4_dynamic_load.onerror = () => onError(test4_dynamic_load); -script4_dynamic_load.async = true; -script4_dynamic_load.src = "../resources/load-error-events.py?test=test4_dynamic_load"; -document.head.appendChild(script4_dynamic_load); - -var script4_dynamic_error = document.createElement('script'); -script4_dynamic_error.setAttribute('type', 'module'); -script4_dynamic_error.onload = () => onLoad(test4_dynamic_error); -script4_dynamic_error.onerror = () => onError(test4_dynamic_error); -script4_dynamic_error.async = true; -script4_dynamic_error.src = "../resources/load-error-events.py?test=test4_dynamic_error"; -document.head.appendChild(script4_dynamic_error); -</script> - -<script src="../resources/load-error-events.py?test=test1_load" onload="onLoad(test1_load);" onerror="onError(test1_load);" type="module"></script> -<script src="../resources/load-error-events.py?test=test4_load" onload="onLoad(test4_load);" onerror="onError(test4_load);" type="module" async></script> -<script src="../resources/load-error-events.py?test=test1_error" onload="onLoad(test1_error);" onerror="onError(test1_error);" type="module"></script> -<script src="../resources/load-error-events.py?test=test4_error" onload="onLoad(test4_error);" onerror="onError(test4_error);" type="module" async></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export-nested.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export-nested.js deleted file mode 100644 index 860d2bf3417..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export-nested.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./missing-export.js"; -log.push("nested-missing-export"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export.js deleted file mode 100644 index e6f5746eb74..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export.js +++ /dev/null @@ -1,2 +0,0 @@ -import something from "./missing-export.js"; -log.push("missing-export"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml deleted file mode 100644 index 1655e61a7c5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" -"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> -window.evaluated_module_script = true; -</script> -<script> - var test = async_test("module script in XHTML documents should be evaluated."); - window.addEventListener("load", () => { - test.step(() => { assert_true(window.evaluated_module_script); }); - test.done(); - }); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html deleted file mode 100644 index ae82e1348aa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<title>Once as module script, once as classic script</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that evaluating something as classic script does not prevent " + - "it from being evaluated as module script."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, [window, undefined]); - })); -</script> -<script type="module" src="this.js"></script> -<script src="this.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html deleted file mode 100644 index fb512b4b30b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<title>Once as classic script, once as module script</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that evaluating something as classic script does not prevent " + - "it from being evaluated as module script."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, [window, undefined]); - })); -</script> -<script src="this.js"></script> -<script type="module" src="this.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-a.js deleted file mode 100644 index a127aeb559a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-a.js +++ /dev/null @@ -1 +0,0 @@ -import { b } from "./nested-imports-b.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-b.js deleted file mode 100644 index 18a5af40cc0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-b.js +++ /dev/null @@ -1,2 +0,0 @@ -import { c } from "./nested-imports-c.js"; -export const b = "b"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-c.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-c.js deleted file mode 100644 index ec44596aeae..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-c.js +++ /dev/null @@ -1,2 +0,0 @@ -import { d } from "./nested-imports-d.js"; -export const c = "c"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-d.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-d.js deleted file mode 100644 index cee87849c62..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-d.js +++ /dev/null @@ -1,3 +0,0 @@ -import { e } from "./nested-imports-e.js"; -import "./resources/delayed-modulescript.py"; -export const d = "d"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-e.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-e.js deleted file mode 100644 index ec6f0360a60..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-e.js +++ /dev/null @@ -1,2 +0,0 @@ -import { f } from "./nested-imports-f.js"; -export const e = "e"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-f.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-f.js deleted file mode 100644 index 0591e0b3166..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-f.js +++ /dev/null @@ -1,2 +0,0 @@ -import { g } from "./nested-imports-g.js"; -export const f = "f"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-g.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-g.js deleted file mode 100644 index 86cbe7d3f8e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-g.js +++ /dev/null @@ -1,2 +0,0 @@ -import { h } from "./nested-imports-h.js"; -export const g = "g"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-h.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-h.js deleted file mode 100644 index a1612912599..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports-h.js +++ /dev/null @@ -1,2 +0,0 @@ -import { c } from "./nested-imports-c.js"; -export const h = "h"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports.html deleted file mode 100644 index 23bb595d0eb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-imports.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<title>Test imports under more than 3 levels in different modules</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({ allow_uncaught_exception: true }); - - window.log = []; - - const test_load = async_test("should load all modules successfully"); - window.addEventListener( - "load", - test_load.step_func_done((ev) => { - assert_equals(log.length, 2); - - assert_equals(log[0], 1); - assert_equals(log[1], 2); - }) - ); - - function unreachable() { - log.push("unexpected"); - } -</script> -<script type="module" src="./nested-imports-a.js" onerror="unreachable()" - onload="log.push(1)"></script> -<script type="module" src="./nested-imports-e.js" onerror="unreachable()" - onload="log.push(2)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-missing-export.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-missing-export.js deleted file mode 100644 index 3801ae847af..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-missing-export.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./missing-export.js"; -log.push("missing-export-nested"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html deleted file mode 100644 index 656c99b292a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<title>The 'nomodule' attribute</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that 'nomodule' has the desired effect on classic scripts, but " + - "no effect on module scripts."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, [undefined]); - })); - -</script> -<script type="module" src="this.js" nomodule></script> -<script src="this.js" nomodule></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-no-referrer.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-no-referrer.sub.html deleted file mode 100644 index b8866f95118..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-no-referrer.sub.html +++ /dev/null @@ -1,68 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrer with the no-referrer policy</title> -<meta name="referrer" content="no-referrer"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - -// "name" parameter is necessary for bypassing the module map. - -import { referrer as referrerSame } from "./resources/referrer-checker.py?name=same"; - -import { referrer as referrerRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name=remote"; - -import { referrer as referrerSameSame } from "./resources/import-referrer-checker.sub.js?name=same_same"; - -import { referrer as referrerSameRemote } from "./resources/import-remote-origin-referrer-checker.sub.js?name=same_remote"; - -import { referrer as referrerRemoteRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js?name=remote_remote"; - -import { referrer as referrerRemoteSame } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js?name=remote_same"; - -test(t => { - assert_equals( - referrerSame, "", - "Referrer should not be sent for the same-origin top-level script."); -}, "Importing a same-origin top-level script with the no-referrer policy."); - -test(t => { - assert_equals( - referrerRemote, "", - "Referrer should not be sent for the remote-origin top-level script."); -}, "Importing a remote-origin top-level script with the no-referrer policy."); - -test(t => { - assert_equals( - referrerSameSame, "", - "Referrer should not be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a same-origin top-level " + - "script with the no-referrer policy."); - -test(t => { - assert_equals( - referrerSameRemote, "", - "Referrer should not be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a same-origin top-level " + - "script with the no-referrer policy."); - -test(t => { - assert_equals( - referrerRemoteRemote, "", - "Referrer should not be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a remote-origin " + - "top-level script with the no-referrer policy."); - -test(t => { - assert_equals( - referrerRemoteSame, "", - "Referrer should not be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a remote-origin " + - "top-level script with the no-referrer policy."); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-origin-when-cross-origin.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-origin-when-cross-origin.sub.html deleted file mode 100644 index fd4c1ea4964..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-origin-when-cross-origin.sub.html +++ /dev/null @@ -1,82 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrer with the origin-when-cross-origin policy</title> -<meta name="referrer" content="origin-when-cross-origin"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - -// "name" parameter is necessary for bypassing the module map. - -import { referrer as referrerSame } from "./resources/referrer-checker.py?name=same"; - -import { referrer as referrerRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name=remote"; - -import { referrer as referrerSameSame } from "./resources/import-referrer-checker.sub.js?name=same_same"; - -import { referrer as referrerSameRemote } from "./resources/import-remote-origin-referrer-checker.sub.js?name=same_remote"; - -import { referrer as referrerRemoteRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js?name=remote_remote"; - -import { referrer as referrerRemoteSame } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js?name=remote_same"; - -const origin = (new URL(location.href)).origin + "/"; -const remoteOrigin = new URL("http://{{domains[www1]}}:{{ports[http][0]}}/").origin + "/"; - -test(t => { - assert_equals( - referrerSame, location.href, - "Full referrer should be sent for the same-origin top-level script."); -}, "Importing a same-origin top-level script with the " + - "origin-when-cross-origin policy."); - -test(t => { - assert_equals( - referrerRemote, origin, - "Referrer should be stripped to the origin when importing " + - "remote-origin top-level script."); -}, "Importing a remote-origin top-level script with the " + - "origin-when-cross-origin policy."); - -test(t => { - const scriptURL = - new URL("resources/import-referrer-checker.sub.js", location.href) - assert_equals( - referrerSameSame, scriptURL + "?name=same_same", - "Full referrer should be sent for same-origin descendant script" + - "imported by same-origin top-level script."); -}, "Importing a same-origin descendant script from a same-origin top-level " + - "script with the origin-when-cross-origin policy."); - -test(t => { - assert_equals( - referrerSameRemote, origin, - "Referrer should be stripped to the origin for the remote-origin " + - "descendant script imported from same-origin top-level script."); -}, "Importing a remote-origin descendant script from a same-origin top-level " + - "script with the origin-when-cross-origin policy."); - -test(t => { - const scriptURL = new URL( - "html/semantics/scripting-1/the-script-element/module/resources/" + - "import-referrer-checker.sub.js", - remoteOrigin); - assert_equals(referrerRemoteRemote, scriptURL + "?name=remote_remote", - "Full referrer should be sent for the remote-origin descendant script " + - "imported from a remote-origin top-level script."); -}, "Importing a remote-origin descendant script from a remote-origin " + - "top-level script with the origin-when-cross-origin policy."); - -test(t => { - assert_equals(referrerRemoteSame, remoteOrigin, - "Referrer should be stripped to the origin for the same-origin " + - "descendant script imported by remote-origin top-level script."); -}, "Importing a same-origin descendant script from a remote-origin " + - "top-level script with the origin-when-cross-origin policy."); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-origin.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-origin.sub.html deleted file mode 100644 index a554fb4b0c4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-origin.sub.html +++ /dev/null @@ -1,71 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrer with the origin policy</title> -<meta name="referrer" content="origin"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - -// "name" parameter is necessary for bypassing the module map. - -import { referrer as referrerSame } from "./resources/referrer-checker.py?name=same"; - -import { referrer as referrerRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name=remote"; - -import { referrer as referrerSameSame } from "./resources/import-referrer-checker.sub.js?name=same_same"; - -import { referrer as referrerSameRemote } from "./resources/import-remote-origin-referrer-checker.sub.js?name=same_remote"; - -import { referrer as referrerRemoteRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js?name=remote_remote"; - -import { referrer as referrerRemoteSame } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js?name=remote_same"; - -const origin = (new URL(location.href)).origin + "/"; -const remoteOrigin = "http://{{domains[www1]}}:{{ports[http][0]}}/"; - -test(t => { - assert_equals( - referrerSame, origin, - "Referrer should be sent for the same-origin top-level script."); -}, "Importing a same-origin top-level script with the origin policy."); - -test(t => { - assert_equals( - referrerRemote, origin, - "Referrer should be sent for the remote-origin top-level script."); -}, "Importing a remote-origin top-level script with the origin policy."); - -test(t => { - assert_equals( - referrerSameSame, origin, - "Referrer should be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a same-origin top-level " + - "script with the origin policy."); - -test(t => { - assert_equals( - referrerSameRemote, origin, - "Referrer should be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a same-origin top-level " + - "script with the origin policy."); - -test(t => { - assert_equals( - referrerRemoteRemote, remoteOrigin, - "Referrer should be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a remote-origin " + - "top-level script with the origin policy."); - -test(t => { - assert_equals( - referrerRemoteSame, remoteOrigin, - "Referrer should be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a remote-origin " + - "top-level script with the origin policy."); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-same-origin.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-same-origin.sub.html deleted file mode 100644 index 7d6d515a477..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-same-origin.sub.html +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrer with the same-origin policy</title> -<meta name="referrer" content="same-origin"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - -// "name" parameter is necessary for bypassing the module map. - -import { referrer as referrerSame } from "./resources/referrer-checker.py?name=same"; - -import { referrer as referrerRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name=remote"; - -import { referrer as referrerSameSame } from "./resources/import-referrer-checker.sub.js?name=same_same"; - -import { referrer as referrerSameRemote } from "./resources/import-remote-origin-referrer-checker.sub.js?name=same_remote"; - -import { referrer as referrerRemoteRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js?name=remote_remote"; - -import { referrer as referrerRemoteSame } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js?name=remote_same"; - -const remoteOrigin = "http://{{domains[www1]}}:{{ports[http][0]}}/"; - -test(t => { - assert_equals( - referrerSame, location.href, - "Referrer should be sent for the same-origin top-level script."); -}, "Importing a same-origin top-level script with the same-origin policy."); - -test(t => { - assert_equals( - referrerRemote, "", - "Referrer should not be sent for the remote-origin top-level script."); -}, "Importing a remote-origin top-level script with the same-origin policy."); - -test(t => { - const path = - new URL("resources/import-referrer-checker.sub.js", location.href); - assert_equals( - referrerSameSame, path + `?name=same_same`, - "Referrer should be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a same-origin top-level " + - "script with the same-origin policy."); - -test(t => { - assert_equals( - referrerSameRemote, "", - "Referrer should not be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a same-origin top-level " + - "script with the same-origin policy."); - -test(t => { - const scriptURL = new URL( - "html/semantics/scripting-1/the-script-element/module/resources/" + - "import-referrer-checker.sub.js", remoteOrigin); - assert_equals( - referrerRemoteRemote, scriptURL + "?name=remote_remote", - "Referrer should be sent for the remote-origin descendant script " + - "when it is imported from a top-level script in the same remote-origin."); -}, "Importing a remote-origin descendant script from a remote-origin " + - "top-level script with the same-origin policy."); - -test(t => { - assert_equals( - referrerRemoteSame, "", - "Referrer should not be sent for the same-origin descendant script " + - "when it is imported from a top-level remote-origin script."); -}, "Importing a same-origin descendant script from a remote-origin " + - "top-level script with the same-origin policy."); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-strict-policies.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-strict-policies.sub.html deleted file mode 100644 index 1984d875b36..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-strict-policies.sub.html +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrer with the strict-origin referrer policy</title> -<meta name="referrer" content="strict-origin"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - -// "name" parameter is necessary for bypassing the module map in descendant import. - -import { referrer as insecureImport } from "./resources/import-referrer-checker-insecure.sub.js?name=insecure_import"; -import { referrer as secureImport } from "https://{{domains[www]}}:{{ports[https][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js?name=secure_import"; - -const origin = (new URL(location.href)).origin + "/"; - -test(t => { - assert_equals( - insecureImport, origin, - "A document with the strict-origin referrer policy served over HTTP, " + - "imports an module script over HTTP, that imports a descendant script " + - "over HTTP. The request for the descendant script is sent with a " + - "`Referer` header with the page's origin"); - - assert_equals( - secureImport, "", - "A document with the strict-origin referrer policy served over HTTP, " + - "imports an module script over HTTPS, that imports a descendant script " + - "over HTTP. The request for the descendant script is sent with no " + - "`Referer` header"); -}, "The strict-* referrer policies compare the trustworthiness of a " + - "request's referrer string against its URL"); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-unsafe-url.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-unsafe-url.sub.html deleted file mode 100644 index 443731c1b81..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/referrer-unsafe-url.sub.html +++ /dev/null @@ -1,81 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Referrer with the unsafe-url policy</title> -<meta name="referrer" content="unsafe-url"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script type="module"> - -// "name" parameter is necessary for bypassing the module map. - -import { referrer as referrerSame } from "./resources/referrer-checker.py?name=same"; - -import { referrer as referrerRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name=remote"; - -import { referrer as referrerSameSame } from "./resources/import-referrer-checker.sub.js?name=same_same"; - -import { referrer as referrerSameRemote } from "./resources/import-remote-origin-referrer-checker.sub.js?name=same_remote"; - -import { referrer as referrerRemoteRemote } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js?name=remote_remote"; - -import { referrer as referrerRemoteSame } from "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js?name=remote_same"; - -test(t => { - assert_equals( - referrerSame, location.href, - "Referrer should be sent for the same-origin top-level script."); -}, "Importing a same-origin top-level script with the unsafe-url policy."); - -test(t => { - assert_equals( - referrerRemote, location.href, - "Referrer should be sent for the remote-origin top-level script."); -}, "Importing a remote-origin top-level script with the unsafe-url policy."); - -test(t => { - const scriptURL = - new URL("resources/import-referrer-checker.sub.js", location.href) - assert_equals( - referrerSameSame, scriptURL + "?name=same_same", - "Referrer should be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a same-origin top-level " + - "script with the unsafe-url policy."); - -test(t => { - const scriptURL = - new URL("resources/import-remote-origin-referrer-checker.sub.js", - location.href) - assert_equals( - referrerSameRemote, scriptURL + "?name=same_remote", - "Referrer should be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a same-origin top-level " + - "script with the unsafe-url policy."); - -test(t => { - const scriptURL = - "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/" + - "scripting-1/the-script-element/module/resources/" + - "import-referrer-checker.sub.js"; - assert_equals( - referrerRemoteRemote, scriptURL + "?name=remote_remote", - "Referrer should be sent for the remote-origin descendant script."); -}, "Importing a remote-origin descendant script from a remote-origin " + - "top-level script with the unsafe-url policy."); - -test(t => { - const scriptURL = - "http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/" + - "scripting-1/the-script-element/module/resources/" + - "import-same-origin-referrer-checker-from-remote-origin.sub.js"; - assert_equals( - referrerRemoteSame, scriptURL + "?name=remote_same", - "Referrer should be sent for the same-origin descendant script."); -}, "Importing a same-origin descendant script from a remote-origin " + - "top-level script with the unsafe-url policy."); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/404-but-js.asis b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/404-but-js.asis deleted file mode 100644 index 0fe1379e569..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/404-but-js.asis +++ /dev/null @@ -1,4 +0,0 @@ -HTTP/1.1 404 Not Found -Content-Type: text/javascript - -window.ran404 = true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/500-but-js.asis b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/500-but-js.asis deleted file mode 100644 index c81202f7ef0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/500-but-js.asis +++ /dev/null @@ -1,4 +0,0 @@ -HTTP/1.1 500 Not Found -Content-Type: text/javascript - -window.ran500 = true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py deleted file mode 100644 index 90551e92c33..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py +++ /dev/null @@ -1,20 +0,0 @@ -def main(request, response): - headers = [ - (b"Content-Type", b"text/javascript"), - (b"Access-Control-Allow-Origin", request.GET.first(b"origin")), - (b"Access-Control-Allow-Credentials", b"true") - ] - identifier = request.GET.first(b"id") - cookie_name = request.GET.first(b"cookieName") - cookie = request.cookies.first(cookie_name, None) - if identifier is None or cookie_name is None: - return headers, b"" - - if cookie is None: - result = b"not found" - elif cookie.value == b"1": - result = b"found" - else: - result = b"different value: " + cookie.value - - return headers, b"window." + identifier + b" = '" + result + b"';" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html deleted file mode 100644 index dbc14dffec5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html +++ /dev/null @@ -1,50 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> - -<script type="module" - src="check-cookie.py?id=sameOriginNone&cookieName=same&origin=http://{{host}}:{{ports[http][0]}}"> -</script> -<script type="module" - src="check-cookie.py?id=sameOriginAnonymous&cookieName=same&origin=http://{{host}}:{{ports[http][0]}}" - crossOrigin="anonymous"> -</script> -<script type="module" - src="check-cookie.py?id=sameOriginUseCredentials&cookieName=same&origin=http://{{host}}:{{ports[http][0]}}" - crossOrigin="use-credentials"> -</script> -<script type="module" - src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginNone&cookieName=cross&origin=http://{{host}}:{{ports[http][0]}}"> -</script> -<script type="module" - src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginAnonymous&cookieName=cross&origin=http://{{host}}:{{ports[http][0]}}" - crossOrigin="anonymous"> -</script> -<script type="module" - src="http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginUseCredentials&cookieName=cross&origin=http://{{host}}:{{ports[http][0]}}" - crossOrigin="use-credentials"> -</script> - -<script type="module"> -import "./check-cookie.py?id=sameOriginNoneDescendant&cookieName=same&origin=http://{{host}}:{{ports[http][0]}}"; -</script> -<script type="module" crossOrigin="anonymous"> -import "./check-cookie.py?id=sameOriginAnonymousDescendant&cookieName=same&origin=http://{{host}}:{{ports[http][0]}}"; -</script> -<script type="module" crossOrigin="use-credentials"> -import "./check-cookie.py?id=sameOriginUseCredentialsDescendant&cookieName=same&origin=http://{{host}}:{{ports[http][0]}}"; -</script> -<script type="module"> -import "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginNoneDescendant&cookieName=cross&origin=http://{{host}}:{{ports[http][0]}}"; -</script> -<script type="module" crossOrigin="anonymous"> -import "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginAnonymousDescendant&cookieName=cross&origin=http://{{host}}:{{ports[http][0]}}"; -</script> -<script type="module" crossOrigin="use-credentials"> -import "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py?id=crossOriginUseCredentialsDescendant&cookieName=cross&origin=http://{{host}}:{{ports[http][0]}}"; -</script> - -<script type="text/javascript"> -window.addEventListener('load', event => { - window.parent.postMessage({}, '*'); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py deleted file mode 100644 index 52dbfba445e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py +++ /dev/null @@ -1,7 +0,0 @@ -import time - -def main(request, response): - delay = float(request.GET.first(b"ms", 500)) - time.sleep(delay / 1E3) - - return [(b"Content-type", b"text/javascript")], u"export let delayedLoaded = true;" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-helper.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-helper.sub.js deleted file mode 100644 index 7d9b024e752..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-helper.sub.js +++ /dev/null @@ -1,67 +0,0 @@ -// runTestsFromIframe() is used in the top-level HTML to set cookies and then -// start actual tests in iframe. -function runTestsFromIframe(iframe_url) { - const setSameOriginCookiePromise = fetch( - '/cookies/resources/set-cookie.py?name=same&path=/html/semantics/scripting-1/the-script-element/module/', - { - mode: 'no-cors', - credentials: 'include', - }); - const setCrossOriginCookiePromise = fetch( - 'http://{{domains[www2]}}:{{ports[http][0]}}/cookies/resources/set-cookie.py?name=cross&path=/html/semantics/scripting-1/the-script-element/module/', - { - mode: 'no-cors', - credentials: 'include', - }); - const windowLoadPromise = new Promise(resolve => { - window.addEventListener('load', () => { - resolve(); - }); - }); - - const iframe = document.createElement('iframe'); - Promise.all([setSameOriginCookiePromise, - setCrossOriginCookiePromise, - windowLoadPromise]).then(() => { - iframe.src = iframe_url; - document.body.appendChild(iframe); - fetch_tests_from_window(iframe.contentWindow); - }); -} - -// The functions below are used from tests within the iframe. - -let testNumber = 0; - -// importFunc and setTimeoutFunc is used to make the active script at the time -// of import() to be the script elements that call `runTest()`, -// NOT this script defining runTest(). - -function runTest(importFunc, origin, expected, source) { - let url; - let description; - if (origin === 'same') { - url = "./check-cookie.py"; - description = "Same-origin dynamic import from " + source; - } else { - url = "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py"; - description = "Cross-origin dynamic import from " + source; - } - promise_test(() => { - const id = "test" + testNumber; - testNumber += 1; - return importFunc(url + "?id=" + id + "&cookieName=" + origin + "&origin=" + location.origin) - .then(() => { - assert_equals(window[id], expected, "cookie"); - }); - }, description); -} - -function setTimeoutWrapper(setTimeoutFunc) { - return url => { - return new Promise(resolve => { - window.resolve = resolve; - setTimeoutFunc(`import("${url}").then(window.resolve)`); - }); - }; -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-iframe.sub.html deleted file mode 100644 index 88204ef00b7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-iframe.sub.html +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="dynamic-import-credentials-helper.sub.js"></script> - -<!-- -The active script at the time of import() is the script elements below, and -thus the credentials mode of the fetch options of the script elements below -are used for dynamic import requests. ---> - -<script> -runTest(url => import(url), - "same", "found", "classic script (crossOrigin not specified)"); -runTest(url => import(url), - "cross", "not found", "classic script (crossOrigin not specified)"); -</script> - -<script crossOrigin="anonymous"> -runTest(url => import(url), "same", "found", - "classic script (crossOrigin=anonymous)"); -runTest(url => import(url), "cross", "not found", - "classic script (crossOrigin=anonymous)"); -</script> - -<script crossOrigin="use-credentials"> -runTest(url => import(url), - "same", "found", "classic script (crossOrigin=use-credentials)"); -runTest(url => import(url), - "cross", "found", "classic script (crossOrigin=use-credentials)"); -</script> - -<script type="module"> -runTest(url => import(url), - "same", "found", "module script (crossOrigin not specified)"); -runTest(url => import(url), - "cross", "not found", "module script (crossOrigin not specified)"); -</script> - -<script type="module" crossOrigin="anonymous"> -runTest(url => import(url), "same", "found", - "module script (crossOrigin=anonymous)"); -runTest(url => import(url), "cross", "not found", - "module script (crossOrigin=anonymous)"); -</script> - -<script type="module" crossOrigin="use-credentials"> -runTest(url => import(url), - "same", "found", "module script (crossOrigin=use-credentials)"); -runTest(url => import(url), - "cross", "found", "module script (crossOrigin=use-credentials)"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-setTimeout-iframe.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-setTimeout-iframe.sub.html deleted file mode 100644 index ffba1415270..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/dynamic-import-credentials-setTimeout-iframe.sub.html +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="dynamic-import-credentials-helper.sub.js"></script> - -<!-- -The active script at the time of import() is the classic script created by -https://html.spec.whatwg.org/multipage/C/#timer-initialisation-steps -and the active script at the time of setTimeout() is the script elements below, -thus the credentials mode of the fetch options of the script elements below -are used for dynamic import requests. - -setTimeout() calls below can't be wrapped (e.g. by step_timeout()) -because wrapping setTimeout() would set active scripts differently. ---> - -<script> -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "same", "found", "setTimeout(string) from classic script (crossOrigin not specified)"); -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "cross", "not found", "setTimeout(string) from classic script (crossOrigin not specified)"); -</script> - -<script crossOrigin="anonymous"> -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "same", "found", "setTimeout(string) from classic script (crossOrigin=anonymous)"); -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "cross", "not found", "setTimeout(string) from classic script (crossOrigin=anonymous)"); -</script> - -<script crossOrigin="use-credentials"> -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "same", "found", "setTimeout(string) from classic script (crossOrigin=use-credentials)"); -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "cross", "found", "setTimeout(string) from classic script (crossOrigin=use-credentials)"); -</script> - -<script type="module"> -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "same", "found", "setTimeout(string) from module script (crossOrigin not specified)"); -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "cross", "not found", "setTimeout(string) from module script (crossOrigin not specified)"); -</script> - -<script type="module" crossOrigin="anonymous"> -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "same", "found", "setTimeout(string) from module script (crossOrigin=anonymous)"); -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "cross", "not found", "setTimeout(string) from module script (crossOrigin=anonymous)"); -</script> - -<script type="module" crossOrigin="use-credentials"> -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "same", "found", "setTimeout(string) from module script (crossOrigin=use-credentials)"); -runTest(setTimeoutWrapper(x => setTimeout(x, 0)), - "cross", "found", "setTimeout(string) from module script (crossOrigin=use-credentials)"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/fast-module.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/fast-module.js deleted file mode 100644 index 3a76cf71f6c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/fast-module.js +++ /dev/null @@ -1 +0,0 @@ -loaded.push("fast"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8-with-charset-header.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8-with-charset-header.js deleted file mode 100644 index 6fc4ad395ca..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8-with-charset-header.js +++ /dev/null @@ -1 +0,0 @@ -import "../../serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript%3Bcharset=windows-1250&dummy=6"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8.js deleted file mode 100644 index 3ae805d78d9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8.js +++ /dev/null @@ -1 +0,0 @@ -import "../../serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript&dummy=5"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js deleted file mode 100644 index 2d6fd967120..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js +++ /dev/null @@ -1 +0,0 @@ -export { referrer } from 'http://{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name={{GET[name]}}'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js.headers b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js.headers deleted file mode 100644 index cb762eff806..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker-insecure.sub.js.headers +++ /dev/null @@ -1 +0,0 @@ -Access-Control-Allow-Origin: * diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js deleted file mode 100644 index 2c7dce9dffa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js +++ /dev/null @@ -1,2 +0,0 @@ -import { referrer as referrerImport } from './referrer-checker.py?name={{GET[name]}}'; -export const referrer = referrerImport; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js.headers b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js.headers deleted file mode 100644 index cb762eff806..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-referrer-checker.sub.js.headers +++ /dev/null @@ -1 +0,0 @@ -Access-Control-Allow-Origin: * diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-remote-origin-referrer-checker.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-remote-origin-referrer-checker.sub.js deleted file mode 100644 index 45a2520b68c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-remote-origin-referrer-checker.sub.js +++ /dev/null @@ -1,2 +0,0 @@ -import { referrer as referrerImport } from 'http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name={{GET[name]}}'; -export const referrer = referrerImport; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js deleted file mode 100644 index 5a53bcd4d5e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js +++ /dev/null @@ -1,2 +0,0 @@ -import { referrer as referrerImport } from 'http://{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py?name={{GET[name]}}'; -export const referrer = referrerImport; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js.headers b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js.headers deleted file mode 100644 index cb762eff806..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-same-origin-referrer-checker-from-remote-origin.sub.js.headers +++ /dev/null @@ -1 +0,0 @@ -Access-Control-Allow-Origin: * diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8-with-charset-header.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8-with-charset-header.js deleted file mode 100644 index c2ccab7c621..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8-with-charset-header.js +++ /dev/null @@ -1 +0,0 @@ -import "../../serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript%3Bcharset=windows-1250&dummy=6"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8.js deleted file mode 100644 index 5708a26e079..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8.js +++ /dev/null @@ -1 +0,0 @@ -import "../../serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript&dummy=5"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-404-but-js.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-404-but-js.js deleted file mode 100644 index d62e4f05bec..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-404-but-js.js +++ /dev/null @@ -1 +0,0 @@ -import "./404-but-js.asis"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-500-but-js.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-500-but-js.js deleted file mode 100644 index d62e4f05bec..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-500-but-js.js +++ /dev/null @@ -1 +0,0 @@ -import "./404-but-js.asis"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-b-cross-origin.sub.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-b-cross-origin.sub.js deleted file mode 100644 index 6db57b5017d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-b-cross-origin.sub.js +++ /dev/null @@ -1 +0,0 @@ -import "http://{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/module/imports-b.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py deleted file mode 100644 index 413f48d381a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py +++ /dev/null @@ -1,6 +0,0 @@ -def main(request, response): - referrer = request.headers.get(b"referer", b"") - response_headers = [(b"Content-Type", b"text/javascript"), - (b"Access-Control-Allow-Origin", b"*")] - return (200, response_headers, - b"export const referrer = '" + referrer + b"';") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/slow-module.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/slow-module.js deleted file mode 100644 index 4623ef73604..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/slow-module.js +++ /dev/null @@ -1,3 +0,0 @@ -// This module is imported with pipe=trickle(d2) to make it load more slowly -// than fast-module.js -loaded.push("slow"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/script-for-event.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/script-for-event.html deleted file mode 100644 index e3b8e15b414..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/script-for-event.html +++ /dev/null @@ -1,93 +0,0 @@ -<!DOCTYPE html> -<title>Module scripts with for and event attributes</title> -<link rel="author" title="Matheus Kerschbaum" href="mailto:matjk7@gmail.com"> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id="log"></div> -<script> -var expected = [ - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, -]; -var run = expected.map(function() { return false }); -</script> -<script for="wİndow" event="onload" type="module"> -run[0] = true; -</script> -<script for="window" event="onload x" type="module"> -run[1] = true; -</script> -<script for="window" event="onload(x" type="module"> -run[2] = true; -</script> -<script for="window" event="onload(x)" type="module"> -run[3] = true; -</script> -<script for="window" event="onclick" type="module"> -run[4] = true; -</script> -<script for="" event="onload" type="module"> -run[5] = true; -</script> -<script for="window" event="" type="module"> -run[6] = true; -</script> -<script for="" event="" type="module"> -run[7] = true; -</script> -<script for=" window" event="onload" type="module"> -run[8] = true; -</script> -<script for="window " event="onload" type="module"> -run[9] = true; -</script> -<script for="window" event=" onload" type="module"> -run[10] = true; -</script> -<script for="window" event="onload " type="module"> -run[11] = true; -</script> -<script for=" window " event=" onload " type="module"> -run[12] = true; -</script> -<script for=" window " event=" onload() " type="module"> -run[13] = true; -</script> -<script for="object" event="handler" type="module"> -run[14] = true; -</script> -<script event="handler" type="module"> -run[15] = true; -</script> -<script for="object" type="module"> -run[16] = true; -</script> -<script type="module"> -test(function() { - for (var i = 0; i < run.length; ++i) { - test(function() { - var script = document.querySelectorAll("script[for], script[event]")[i]; - assert_equals(run[i], expected[i], - "script for=" + format_value(script.getAttribute("for")) + - " event=" + format_value(script.getAttribute("event"))); - }, "Script " + i); - } -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/set-currentScript-on-window.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/set-currentScript-on-window.js deleted file mode 100644 index 6863075bd90..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/set-currentScript-on-window.js +++ /dev/null @@ -1 +0,0 @@ -window.currentScriptRecorded = document.currentScript; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html deleted file mode 100644 index cc4e2d69b7e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<title>Single evaluation, 1</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that a module is evaluated only once, and that 'this' is " + - "undefined (because of strict mode)."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, [undefined, "this-nested"]); - })); -</script> -<script type="module" src="this.js"></script> -<script type="module" src="this.js"></script> -<script type="module" src="this-nested.js"></script> -<script type="module" src="this.js"></script> -<script type="module" src="this-nested.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html deleted file mode 100644 index 790e2fa9c6a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<title>Single evaluation, 2</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - window.log = []; - - const test_load = async_test( - "Test that a module is evaluated only once, and that 'this' is " + - "undefined (because of strict mode)."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_array_equals(log, [undefined, "this-nested"]); - })); -</script> -<script type="module" src="this-nested.js"></script> -<script type="module" src="this-nested.js"></script> -<script type="module" src="this.js"></script> -<script type="module" src="this-nested.js"></script> -<script type="module" src="this.js"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-cycle.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-cycle.html deleted file mode 100644 index 3a42cf9e306..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-cycle.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<title>Cyclic graph with slow imports</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script type="module"> -import { loaded } from "./slow-module-graph-a.js"; - -test(() => { - assert_true(loaded); -}, "module graph with cycles load even if part of the graph loads slow"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-a.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-a.js deleted file mode 100644 index 48701aa1d03..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-a.js +++ /dev/null @@ -1,3 +0,0 @@ -import "./slow-module-graph-b.js"; -import "./resources/delayed-modulescript.py" -export let loaded = true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-b.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-b.js deleted file mode 100644 index 53a8f2026e0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-b.js +++ /dev/null @@ -1 +0,0 @@ -import "./slow-module-graph-a.js"; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html deleted file mode 100644 index d07005caaa3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<title>Handling of invalid specifiers</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - setup({allow_uncaught_exception: true}); - - window.log = []; - - window.addEventListener("error", ev => log.push(ev.error)); - - const test_load = async_test( - "Test that invalid module specifier leads to TypeError on window."); - window.addEventListener("load", test_load.step_func_done(ev => { - assert_equals(log.length, 1); - assert_equals(log[0].constructor, TypeError); - })); - - function unreachable() { log.push("unexpected"); } -</script> -<script type="module" src="./bad-module-specifier.js" onerror="unreachable()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js deleted file mode 100644 index de1b053c5a9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./syntaxerror.js"; -log.push("nested-syntaxerror"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror.js deleted file mode 100644 index 31a9e2cbdf9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror.js +++ /dev/null @@ -1,2 +0,0 @@ -log.push("syntaxerror"); -%!#$@#$@#$@ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/this-nested.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/this-nested.js deleted file mode 100644 index f204812fd13..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/this-nested.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./this.js"; -log.push("this-nested"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/this.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/this.js deleted file mode 100644 index 996a439df0b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/this.js +++ /dev/null @@ -1 +0,0 @@ -log.push(this); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-error.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-error.js deleted file mode 100644 index 9769c84b233..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-error.js +++ /dev/null @@ -1,3 +0,0 @@ -window.before_throwing_error = true; -throw new Error; -window.after_throwing_error = true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-nested.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-nested.js deleted file mode 100644 index f1801ea366f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-nested.js +++ /dev/null @@ -1,2 +0,0 @@ -import "./throw.js"; -log.push("throw-nested"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw.js deleted file mode 100644 index cef7918216d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw.js +++ /dev/null @@ -1,2 +0,0 @@ -log.push("throw"); -throw {foo: true} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw2.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw2.js deleted file mode 100644 index 2931eec500d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw2.js +++ /dev/null @@ -1,2 +0,0 @@ -log.push("throw2"); -throw {bar: true} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/type.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/type.html deleted file mode 100644 index 5817ae4d435..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/type.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<title>Type attribute of module scripts</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -window.t1 = async_test('type="module"'); -window.t2 = async_test('type="MODULE"'); -window.t3 = async_test('type="Module"'); -window.t4 = async_test('type="module "'); -window.t5 = async_test('type=" module"'); -</script> -<script type="module">window.t1.done();</script> -<script type="MODULE">window.t2.done();</script> -<script type="Module">window.t3.done();</script> -<script type="module ">window.t4.unreached_func('Unexpectedly evaluated');</script> -<script type=" module">window.t5.unreached_func('Unexpectedly evaluated');</script> -<script type="module"> -window.t1.unreached_func('Unexpectedly not evaluated')(); -window.t2.unreached_func('Unexpectedly not evaluated')(); -window.t3.unreached_func('Unexpectedly not evaluated')(); -window.t4.done(); -window.t5.done(); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents-during-evaluation.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents-during-evaluation.html deleted file mode 100644 index e4cd887c614..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents-during-evaluation.html +++ /dev/null @@ -1,59 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Moving script elements between documents during evaluation</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<script id="outerScript"> -"use strict"; - -async_test(t => { - const outerScript = document.querySelector('#outerScript'); - assert_equals(document.currentScript, outerScript); - - const innerScript = document.createElement('script'); - window.innerScript = innerScript; - - window.innerScriptEvaluated = false; - window.anotherDocument = null; - - innerScript.innerText = ` - window.innerScriptEvaluated = true; - const innerScript = window.innerScript; - assert_equals(document.currentScript, innerScript, - '[1] Before move: currentScript of source Document'); - assert_equals(innerScript.ownerDocument, document, - '[1] Before move: ownerDocument'); - - window.anotherDocument = document.implementation.createHTMLDocument(); - window.anotherDocument.body.appendChild(innerScript); - - assert_equals(innerScript.ownerDocument, anotherDocument, - '[2] Just after move: ownerDocument'); - assert_equals(document.currentScript, innerScript, - '[2] Just after move: currentScript of source Document'); - assert_equals(anotherDocument.currentScript, null, - '[2] Just after move: currentScript of destination Document'); - `; - - document.body.appendChild(innerScript); - assert_true(window.innerScriptEvaluated, - 'Inner script should be evaluated synchronously'); - - assert_equals(document.currentScript, outerScript, - '[3] After inner script: currentScript of source Document'); - assert_equals(window.anotherDocument.currentScript, null, - '[3] After inner script: currentScript of destination Document'); - - t.step_timeout(() => { - assert_equals(document.currentScript, null, - '[4] After outer script: currentScript of source Document'); - assert_equals(anotherDocument.currentScript, null, - '[4] After outer script: currentScript of destination Document'); - t.done(); - }, 0); -}, 'Script moved between documents during evaluation'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/README.md b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/README.md deleted file mode 100644 index f95e0a63a32..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/README.md +++ /dev/null @@ -1,16 +0,0 @@ -The tests in this directory are for script elements moved between documents. - -Use - -``` -$ tools/generate.py -``` - -to generate test HTML files (except for tests in subdirectories). - -Background: - -- https://www.w3.org/Bugs/Public/show_bug.cgi?id=11323 -- https://github.com/whatwg/html/issues/2137 -- https://github.com/whatwg/html/issues/2469 -- https://github.com/whatwg/html/pull/2673 diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html deleted file mode 100644 index 2b84ae80882..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "createHTMLDocument", "fetch-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html deleted file mode 100644 index 09ee1490c1b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "createHTMLDocument", "fetch-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html deleted file mode 100644 index 477abd32cf6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "createHTMLDocument", "parse-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html deleted file mode 100644 index 9da22764086..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "createHTMLDocument", "parse-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html deleted file mode 100644 index bc4deb6f170..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "createHTMLDocument", "success", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html deleted file mode 100644 index ff76954f9df..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "createHTMLDocument", "success", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html deleted file mode 100644 index 768120e9d8f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "fetch-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html deleted file mode 100644 index 50dd80662dc..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "fetch-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html deleted file mode 100644 index 981a0682302..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "parse-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html deleted file mode 100644 index 6debb4189ec..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "parse-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html deleted file mode 100644 index 53389f20db5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "parse-error", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html deleted file mode 100644 index 9c4a12226a0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "success", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html deleted file mode 100644 index 0a0490cfc14..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "success", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html deleted file mode 100644 index 932825709f0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("after-prepare", "iframe", "success", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html deleted file mode 100644 index 444382ac209..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "fetch-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html deleted file mode 100644 index e1a1f7c08f3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "fetch-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html deleted file mode 100644 index 6bb5ebddbd2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "parse-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html deleted file mode 100644 index 10a6549f62d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "parse-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html deleted file mode 100644 index 28bd9359956..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "parse-error", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html deleted file mode 100644 index e665a75629a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "parse-error", "inline", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-classic.html deleted file mode 100644 index 8ee0dd1de19..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "success", "empty-src", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-module.html deleted file mode 100644 index 4791149c571..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "success", "empty-src", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html deleted file mode 100644 index 3a3aceaf26e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "success", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html deleted file mode 100644 index c15b4fc77fd..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "success", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html deleted file mode 100644 index 576f4d46845..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "success", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html deleted file mode 100644 index c84d61c89ad..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "createHTMLDocument", "success", "inline", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html deleted file mode 100644 index febf6fcc55a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "fetch-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html deleted file mode 100644 index f936260b8ce..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "fetch-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html deleted file mode 100644 index 870c900abf0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "parse-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html deleted file mode 100644 index fb44a89df10..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "parse-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html deleted file mode 100644 index 986e4fa3963..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "parse-error", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html deleted file mode 100644 index 3a3fc384794..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "parse-error", "inline", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-classic.html deleted file mode 100644 index 4f03a943581..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "success", "empty-src", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-module.html deleted file mode 100644 index a7bd42fd32f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "success", "empty-src", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html deleted file mode 100644 index 08a8ac4afae..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "success", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html deleted file mode 100644 index b8c3f79feae..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "success", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html deleted file mode 100644 index b639f6109d1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "success", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html deleted file mode 100644 index 616e46310f6..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("before-prepare", "iframe", "success", "inline", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html deleted file mode 100644 index 745c62d8983..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "createHTMLDocument", "fetch-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html deleted file mode 100644 index f6353a05fcb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "createHTMLDocument", "fetch-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html deleted file mode 100644 index 21099c3ff97..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "createHTMLDocument", "parse-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html deleted file mode 100644 index 2eb153acfe5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "createHTMLDocument", "parse-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html deleted file mode 100644 index 88821826edb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "createHTMLDocument", "success", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html deleted file mode 100644 index f2a9d957412..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "createHTMLDocument", "success", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html deleted file mode 100644 index d96bfe0d505..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "fetch-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html deleted file mode 100644 index 7e71bfbe158..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "fetch-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html deleted file mode 100644 index 757c879897e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "parse-error", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html deleted file mode 100644 index 6ec6c5970ef..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "parse-error", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html deleted file mode 100644 index c0b0f9d4047..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "parse-error", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html deleted file mode 100644 index 7955dbce627..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "success", "external", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html deleted file mode 100644 index af17eb01f75..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "success", "external", "module"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html deleted file mode 100644 index 8a44e2feaf1..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("move-back", "iframe", "success", "inline", "classic"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/README.md b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/README.md deleted file mode 100644 index dcf5597e2da..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/README.md +++ /dev/null @@ -1,6 +0,0 @@ -The tests in this directory checks side effects (other than script -evaluation/event firing, which is covered by the tests in the parent directory) -caused by scripts moved between Documents. - -The tests assume that script loading is not canceled when moved between -documents (which is not explicitly specified as of Jan 2022). diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-1.html deleted file mode 100644 index 5c8acd470eb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-1.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="helper.js"></script> -<body> -<script> -runDelayEventTest('Script elements (parser-blocking)'); -</script> -<script id="to-be-moved" src="../../resources/throw.js?pipe=trickle(d3)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-2.html deleted file mode 100644 index 3399a8c001f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-2.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="helper.js"></script> -<body> -<script> -runDelayEventTest('Script elements (async)'); - -const script = document.createElement('script'); -script.setAttribute('id', 'to-be-moved'); -script.setAttribute('src', '../../resources/throw.js?pipe=trickle(d3)'); -document.body.appendChild(script); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-iframe.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-iframe.html deleted file mode 100644 index 38a9a215419..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/delay-load-event-iframe.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<body onload="parent.onloadIframe()"> -<script src="../../resources/throw.js?pipe=trickle(d2)"></script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/helper.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/helper.js deleted file mode 100644 index 331cf79bf0b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/helper.js +++ /dev/null @@ -1,31 +0,0 @@ -function runDelayEventTest(description) { - const t = async_test(description + - ' still delay the load event in the original Document after move'); - const t_new = async_test(description + - ' does not delay the load event in the new Document after move'); - const start_time = performance.now(); - const iframe = document.createElement('iframe'); - iframe.setAttribute('src', 'delay-load-event-iframe.html'); - document.body.appendChild(iframe); - - window.onload = t.step_func_done(() => { - // The `#to-be-moved` script should delay the load event until it is loaded - // (i.e. 3 seconds), not just until it is moved out to another Document - // (i.e. 1 second). Here we expect the delay should be at least 2 seconds, - // as the latency can be slightly less than 3 seconds due to preloading. - assert_greater_than(performance.now() - start_time, 2000, - 'Load event should be delayed until script is loaded'); - }); - - window.onloadIframe = t_new.step_func_done(() => { - // The iframe's load event is fired after 2 seconds of its subresource - // loading, and shouldn't wait for the `#to-be-moved` script. - assert_less_than(performance.now() - start_time, 2500, - 'Load event should not be delayed until moved script is loaded'); - }); - - t.step_timeout(() => { - const script = document.querySelector('#to-be-moved'); - iframe.contentDocument.body.appendChild(script); - }, 1000); -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/in-order.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/in-order.html deleted file mode 100644 index 6a3e2b54a77..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/in-order.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<link rel="help" href="https://html.spec.whatwg.org/C/#list-of-scripts-that-will-execute-in-order-as-soon-as-possible"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="helper.js"></script> -<body> -<script> -const t = async_test('Script elements (in-order) still block subsequent in-order scripts in the original Document after moved to another Document'); -const start_time = performance.now(); -const iframe = document.createElement('iframe'); -document.body.appendChild(iframe); - -const onScript2Evaluated = t.step_func_done(() => { - // `script1` should remain the - // #list-of-scripts-that-will-execute-in-order-as-soon-as-possible of the - // original Document and thus blocks `script2` evaluation until it is loaded. - assert_greater_than(performance.now() - start_time, 2000, - 'In-order scripts should block subsequent in-order scripts'); -}); - -const script1 = document.createElement('script'); -script1.async = false; -script1.setAttribute('src', '../../resources/throw.js?pipe=trickle(d2)'); -document.body.appendChild(script1); - -const script2 = document.createElement('script'); -script2.async = false; -script2.setAttribute('src', 'data:text/javascript,onScript2Evaluated()'); -document.body.appendChild(script2); - -t.step_timeout(() => { - iframe.contentDocument.body.appendChild(script1); -}, 1000); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/parser-blocking.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/parser-blocking.html deleted file mode 100644 index 9edde137367..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/ordering/parser-blocking.html +++ /dev/null @@ -1,41 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<link rel="help" href="https://html.spec.whatwg.org/C/#pending-parsing-blocking-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="helper.js"></script> -<body> -<script> -const t = async_test('Script elements (parser-blocking) still block the parser in the original Document after moved to another Document'); -const start_time = performance.now(); -const iframe = document.createElement('iframe'); -document.body.appendChild(iframe); - -t.step_timeout(() => { - const script = document.querySelector('#to-be-moved'); - iframe.contentDocument.body.appendChild(script); -}, 1000); - -let syncScriptEvaluated = false; - -const onSyncScript = t.step_func(() => { - syncScriptEvaluated = true; - - // The `#to-be-moved` script should block the parser and thus the sync - // script after `#to-be-moved` should be delayed until `#to-be-moved` is - // loaded (i.e. 3 seconds). - // Here we expect the delay should be at least 2 seconds, - // as the latency can be slightly less than 3 seconds due to preloading. - assert_greater_than(performance.now() - start_time, 2000, - 'Parser should be blocked until script is loaded'); -}); - -document.addEventListener('DOMContentLoaded', t.step_func_done(() => { - assert_true(syncScriptEvaluated, - 'sync script should be evaluated before DOMContentLoaded'); - assert_greater_than(performance.now() - start_time, 2000, - 'DOMContentLoaded event should be delayed until script is loaded'); -})); -</script> -<script id="to-be-moved" src="../../resources/throw.js?pipe=trickle(d3)"></script> -<script src="data:text/javascript,onSyncScript()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js deleted file mode 100644 index de4af6ac10a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js +++ /dev/null @@ -1,214 +0,0 @@ -"use strict"; - -function createDocument(documentType, result, inlineOrExternal, type, hasBlockingStylesheet) { - return new Promise((resolve, reject) => { - const iframe = document.createElement("iframe"); - iframe.src = - "resources/moving-between-documents-iframe.py" + - "?result=" + result + - "&inlineOrExternal=" + inlineOrExternal + - "&type=" + type + - "&hasBlockingStylesheet=" + hasBlockingStylesheet + - "&cache=" + Math.random(); - // As blocking stylesheets delays Document load events, we use - // DOMContentLoaded here. - // After that point, we expect iframe.contentDocument exists - // while still waiting for blocking stylesheet loading. - document.body.appendChild(iframe); - - window.addEventListener('message', (event) => { - if (documentType === "iframe") { - resolve([iframe.contentWindow, iframe.contentDocument]); - } else if (documentType === "createHTMLDocument") { - resolve([ - iframe.contentWindow, - iframe.contentDocument.implementation.createHTMLDocument("")]); - } else { - reject(new Error("Invalid document type: " + documentType)); - } - }, {once: true}); - }); -} - -window.didExecute = undefined; - -// For a script, there are three associated Documents that can -// potentially different: -// -// [1] script's parser document -// https://html.spec.whatwg.org/C/#parser-document -// -// [2] script's preparation-time document -// https://html.spec.whatwg.org/C/#preparation-time-document -// == script's node document at the beginning of #prepare-a-script -// -// [3] script's node document at the beginning of -// #execute-the-script-block -// -// This helper is for tests where [1]/[2]/[3] are different. - -// In the spec, scripts are executed only if [1]/[2]/[3] are all the same -// (or [1] is null and [2]==[3]). -// -// A check for [1]==[2] is in #prepare-a-script and -// a check for [1]==[3] is in #execute-the-script-block, -// but these are under debate: https://github.com/whatwg/html/issues/2137 -// -// A check for [2]==[3] is in #execute-the-script-block, which is added by -// https://github.com/whatwg/html/pull/2673 - -// timing: -// "before-prepare": -// A <script> is moved during parsing before #prepare-a-script. -// [1] != [2] == [3] -// -// "after-prepare": -// A <script> is moved after parsing/#prepare-a-script but -// before #execute-the-script-block. -// [1] == [2] != [3] -// -// To move such scripts, #has-a-style-sheet-that-is-blocking-scripts -// is utilized to block inline scripts after #prepare-a-script. -// Note: this is a corner case in the spec which might be removed -// from the spec in the future, e.g. -// https://github.com/whatwg/html/issues/1349 -// https://github.com/chrishtr/rendering/blob/master/stylesheet-loading-proposal.md -// -// TODO(domfarolino): Remove the "parsing but moved back" tests, because if a -// <script> is moved before #prepare-a-script, per spec it should never make -// it to #execute-the-script-block. If an implementation does not implement -// the check in #prepare-a-script, then it will fail the "before-prepare" -// tests, so these are not necessary. -// "parsing but moved back" -// A <script> is moved before #prepare-a-script, but moved back again -// to the original Document after #prepare-a-script. -// [1] == [3] != [2] -// -// destType: "iframe" or "createHTMLDocument". -// result: "fetch-error", "parse-error", or "success". -// inlineOrExternal: "inline" or "external" or "empty-src". -// type: "classic" or "module". -async function runTest(timing, destType, result, inlineOrExternal, type) { - const description = - `Move ${result} ${inlineOrExternal} ${type} script ` + - `to ${destType} ${timing}`; - - const t = async_test("Eval: " + description); - const tScriptLoadEvent = async_test("<script> load: " + description); - const tScriptErrorEvent = async_test("<script> error: " + description); - const tWindowErrorEvent = async_test("window error: " + description); - - // If scripts should be moved after #prepare-a-script before - // #execute-the-script-block, we add a style sheet that is - // blocking scripts. - const hasBlockingStylesheet = - timing === "after-prepare" || timing === "move-back"; - - const [sourceWindow, sourceDocument] = await createDocument( - "iframe", result, inlineOrExternal, type, hasBlockingStylesheet); - - // Due to https://crbug.com/1034176, Chromium needs - // blocking stylesheets also in the destination Documents. - const [destWindow, destDocument] = await createDocument( - destType, null, null, null, hasBlockingStylesheet); - - const scriptOnLoad = - tScriptLoadEvent.unreached_func("Script load event fired unexpectedly"); - const scriptOnError = (event) => { - // For Firefox: Prevent window.onerror is fired due to propagation - // from <script>'s error event. - event.stopPropagation(); - - tScriptErrorEvent.unreached_func("Script error evennt fired unexpectedly")(); - }; - - sourceWindow.didExecute = false; - sourceWindow.t = t; - sourceWindow.scriptOnLoad = scriptOnLoad; - sourceWindow.scriptOnError = scriptOnError; - sourceWindow.onerror = tWindowErrorEvent.unreached_func( - "Window error event shouldn't fired on source window"); - sourceWindow.readyToEvaluate = false; - - destWindow.didExecute = false; - destWindow.t = t; - destWindow.scriptOnLoad = scriptOnLoad; - destWindow.scriptOnError = scriptOnError; - destWindow.onerror = tWindowErrorEvent.unreached_func( - "Window error event shouldn't fired on destination window"); - destWindow.readyToEvaluate = false; - - // t=0 sec: Move between documents before #prepare-a-script. - // At this time, the script element is not yet inserted to the DOM. - if (timing === "before-prepare" || timing === "move-back") { - destDocument.body.appendChild( - sourceDocument.querySelector("streaming-element")); - } - if (timing === "before-prepare") { - sourceWindow.readyToEvaluate = true; - destWindow.readyToEvaluate = true; - } - - // t=1 sec: the script element is inserted to the DOM, i.e. - // #prepare-a-script is triggered (see monving-between-documents-iframe.py). - // In the case of `before-prepare`, the script can be evaluated. - // In other cases, the script evaluation is blocked by a style sheet. - await new Promise(resolve => step_timeout(resolve, 2000)); - - // t=2 sec: Move between documents after #prepare-a-script. - if (timing === "after-prepare") { - // At this point, the script hasn't been moved yet, so we'll move it for the - // first time, after #prepare-a-script, but before #execute-the-script-block. - destDocument.body.appendChild( - sourceDocument.querySelector("streaming-element")); - } else if (timing === "move-back") { - // At this point the script has already been moved to the destination block - // before #prepare-a-script, so we'll move it back to the source document - // before #execute-the-script-block. - sourceDocument.body.appendChild( - destDocument.querySelector("streaming-element")); - } - sourceWindow.readyToEvaluate = true; - destWindow.readyToEvaluate = true; - - // t=3 or 5 sec: Blocking stylesheet and external script are loaded, - // and thus script evaulation is unblocked. - - // Note: scripts are expected to be loaded at t=3, because the fetch - // is started by #prepare-a-script at t=1, and the script's delay is - // 2 seconds. However in Chromium, due to preload scanner, the script - // loading might take 4 seconds, because the first request by preload - // scanner of the source Document takes 2 seconds (between t=1 and t=3) - // which blocks the second request by #prepare-a-script that takes - // another 2 seconds (between t=3 and t=5). - - // t=6 sec: After all possible script evaluation points, test whether - // the script/events were evaluated/fired or not. - // As we have concurrent tests, a single global step_timeout() is - // used instead of multiple `t.step_timeout()` etc., - // to avoid potential race conditions between `t.step_timeout()`s. - return new Promise(resolve => { - step_timeout(() => { - tWindowErrorEvent.done(); - tScriptLoadEvent.done(); - tScriptErrorEvent.done(); - - t.step_func_done(() => { - assert_false(sourceWindow.didExecute, - "The script must not have executed in source window"); - assert_false(destWindow.didExecute, - "The script must not have executed in destination window"); - })(); - resolve(); - }, 4000); - }); -} - -async_test(t => { - t.step_timeout(() => { - assert_equals(window.didExecute, undefined, - "The script must not have executed in the top-level window"); - t.done(); - }, - 4000); -}, "Sanity check around top-level Window"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py deleted file mode 100644 index dbcfe9b8d0d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py +++ /dev/null @@ -1,102 +0,0 @@ -import random -import time - -from wptserve.utils import isomorphic_decode - - -""" -This script serves -""" - -def main(request, response): - inlineOrExternal = request.GET.first(b"inlineOrExternal", b"null") - hasBlockingStylesheet = request.GET.first(b"hasBlockingStylesheet", b"true") == b"true" - result = request.GET.first(b"result", b"success") - type = u"text/javascript" if request.GET.first(b"type", b"classic") == b"classic" else u"module" - - response.headers.set(b"Content-Type", b"text/html; charset=utf-8") - response.headers.set(b"Transfer-Encoding", b"chunked") - response.write_status_headers() - - # Step 1: Start parsing. - body = u"""<!DOCTYPE html> - <head> - <script> - parent.postMessage("fox", "*"); - </script> - """ - - if hasBlockingStylesheet: - body += u""" - <link rel="stylesheet" href="slow-flag-setter.py?result=css&cache=%f"> - """ % random.random() - - body += u""" - </head> - <body> - """ - - if inlineOrExternal == b"inline" or inlineOrExternal == b"external" or inlineOrExternal == b"empty-src": - body += u""" - <streaming-element> - """ - - # Trigger DOM processing - body += u"A" * 100000 - - response.writer.write(u"%x\r\n" % len(body)) - response.writer.write(body) - response.writer.write(u"\r\n") - - body = u"" - - if inlineOrExternal == b"inline": - time.sleep(1) - body += u""" - <script id="s1" type="%s" - onload="scriptOnLoad()" - onerror="scriptOnError(event)"> - if (!window.readyToEvaluate) { - window.didExecute = "executed too early"; - } else { - window.didExecute = "executed"; - } - """ % type - if result == b"parse-error": - body += u"1=2 parse error\n" - - body += u""" - </script> - </streaming-element> - """ - elif inlineOrExternal == b"external": - time.sleep(1) - body += u""" - <script id="s1" type="%s" - src="slow-flag-setter.py?result=%s&cache=%s" - onload="scriptOnLoad()" - onerror="scriptOnError(event)"></script> - </streaming-element> - """ % (type, isomorphic_decode(result), random.random()) - elif inlineOrExternal == b"empty-src": - time.sleep(1) - body += u""" - <script id="s1" type="%s" - src="" - onload="scriptOnLoad()" - onerror="scriptOnError(event)"></script> - </streaming-element> - """ % (type,) - - # // if readyToEvaluate is false, the script is probably - # // wasn't blocked by stylesheets as expected. - - # Trigger DOM processing - body += u"B" * 100000 - - response.writer.write(u"%x\r\n" % len(body)) - response.writer.write(body) - response.writer.write(u"\r\n") - - response.writer.write(u"0\r\n") - response.writer.write(u"\r\n") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/slow-flag-setter.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/slow-flag-setter.py deleted file mode 100644 index 20d7ed4bd0d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/slow-flag-setter.py +++ /dev/null @@ -1,29 +0,0 @@ - -import time - -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - - result = request.GET.first(b"result", b"success") - if result == b"css": - time.sleep(3) - headers = [(b"Content-Type", b"text/css")] - body = u"" - else: - time.sleep(2) - - body = u""" - fetch('exec'); - console.log('exec'); - if (!window.readyToEvaluate) { - window.didExecute = "executed too early"; - } else { - window.didExecute = "executed"; - } - """ - if result == b"parse-error": - body = u"1=2 parse error;" - if result == b"fetch-error": - return 404, [(b'Content-Type', b'text/plain')], u"""window.didExecute = "fetch error";""" - - return headers, body diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py deleted file mode 100644 index 80a655e821b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py +++ /dev/null @@ -1,61 +0,0 @@ -template = '''<!DOCTYPE html> -<meta charset="utf-8"> -<meta name="timeout" content="long"> -<title>Moving script elements between documents</title> -<!-- This is generated by tools/generate.py. Do not manually edit. --> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#execute-the-script-block"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/moving-between-documents-helper.js"></script> - -<body> -<script> -runTest("%s", "%s", "%s", "%s", "%s"); -</script> -''' - -n = 0 -for timing in ["before-prepare", "after-prepare", "move-back"]: - for destType in ["iframe", "createHTMLDocument"]: - for inlineOrExternal in ["inline", "external", "empty-src"]: - for result in ["fetch-error", "parse-error", "success"]: - for type in ["classic", "module"]: - # The |inlineOrExternal| keyword creates a certain kind of script, - # and the |result| keyword can influence the generated script in - # different ways i.e., giving the script a parse-error, or creating - # a script that fails to load. When we're creating an inline script, - # it doesn't make sense to test the fetch-error case, so we ignore - # this combination, as the server will not react to it in any - # meaningful way. - if inlineOrExternal == "inline" and result == "fetch-error": - continue - - if inlineOrExternal == "empty-src": - # The "empty-src" tests aim to exercise #prepare-a-script step 26 - # substep 2, where the <script> has a src attribute that is empty: - # "If src is the empty string, queue a task to fire an event named - # error at the element, and return." - # Therefore, the server will generate a script that does not have a - # "parse-error" or "fetch-error", so we can ignore these combinations. - if result != "success": - continue - - # The "empty-src" tests check that the parser document <=> node document - # check is implemented correctly in #prepare-a-script. Therefore we're - # only interested in tests that move the <script> before #prepare-a-script. - if timing != "before-prepare": - continue - - # The current test helper uses - # #has-a-style-sheet-that-is-blocking-scripts to block script - # evaluation after #prepare-a-script, but in some cases this - # doesn't work: - # - inline scripts to createHTMLDocument - if timing != "before-prepare" and destType == "createHTMLDocument" and inlineOrExternal == "inline": - continue - # - module inline scripts https://github.com/whatwg/html/issues/3890 - if timing != "before-prepare" and inlineOrExternal == "inline" and type == "module": - continue - - with open('%s-%s-%s-%s-%s.html' % (timing, destType, result, inlineOrExternal, type), 'w') as f: - f.write(template % (timing, destType, result, inlineOrExternal, type)) diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors-iframe.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors-iframe.html deleted file mode 100644 index 255e79e191a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors-iframe.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<script src="cacheable-script-throw.py?iframe"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html deleted file mode 100644 index 61643c5f08c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html +++ /dev/null @@ -1,85 +0,0 @@ -<!DOCTYPE html> -<title>Muted Errors</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -// https://html.spec.whatwg.org/multipage/webappapis.html#report-the-error -// If script's muted errors is true, then set message to "Script error.", -// urlString to the empty string, line and col to 0, and errorValue to null. - setup({allow_uncaught_exception: true}); - - window.log = []; - window.addEventListener("error", ev => log.push(ev)); - - function check(shouldBeMuted) { - assert_equals(log.length, 1); - var ev = log[0]; - log = []; - if (shouldBeMuted) { - assert_equals(ev.message, "Script error."); - assert_equals(ev.error, null, 'error'); - assert_equals(ev.filename, "", 'filename'); - assert_equals(ev.lineno, 0, 'lineno'); - assert_equals(ev.colno, 0, 'colno'); - } else { - assert_not_equals(ev.message, "Script error."); - assert_not_equals(ev.error, null); - } - } - - var test1 = async_test("Errors for same-origin script shouldn't be muted"); - var check1 = test1.step_func_done(() => check(false)); - - var test2 = async_test("Errors for cross-origin script should be muted"); - var check2 = test2.step_func_done(() => check(true)); - - var test3 = async_test("Errors for cross-origin script should be muted " + - "even if the script is once loaded as same-origin"); - function step3() { - var script = document.createElement('script'); - script.setAttribute('src', "//{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py?iframe"); - script.onerror = test3.unreached_func(); - script.onload = test3.step_func_done(() => check(true)); - document.body.appendChild(script); - } - - var test4 = async_test("Errors for same-origin scripts redirected to a " + - "cross-origin url and redirected back to " + - "same-origin should be muted"); - var check4 = test4.step_func_done(() => check(true)); - - var test5 = async_test("Errors for cross-origin scripts redirected to a " + - "same-origin url should be muted"); - var check5 = test5.step_func_done(() => check(true)); - - const test6 = async_test("Non-synthetic errors for same-origin scripts redirected to a " + - "cross-origin URL and redirected back to same-origin should be " + - "muted"); - const check6 = test6.step_func_done(() => check(true)); - - const test7 = async_test("Syntax error for same-origin script redirected to a " + - "cross-origin URL and redirected back to same-origin should be " + - "muted"); - const check7 = test7.step_func_done(() => check(true)); - - function unreachable() { log.push("unexpected"); } -</script> -<script src="cacheable-script-throw.py" onerror="test1.unreached_func()()" onload="check1()"></script> -<script src="//{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py" - onerror="test2.unreached_func()()" onload="check2()"></script> -<iframe src="//{{domains[www2]}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/muted-errors-iframe.html" - onerror="test3.unreached_func()()" onload="step3()"></iframe> -<script src="/fetch/api/resources/redirect.py?location= -//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= -//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py?same-cross-same" -onerror="test4.unreached_func()()" onload="check4()"></script> -<script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= -//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py?cross-same" -onerror="test5.unreached_func()()" onload="check5()"></script> -<script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= -//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/resources/throw.js" -onerror="test6.unreached_func()()" onload="check6()"></script> -<script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= -//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/resources/syntax-error.js" -onerror="test7.unreached_func()()" onload="check7()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-reflect.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-reflect.html deleted file mode 100644 index d6a850f58fe..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-reflect.html +++ /dev/null @@ -1,75 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>noModule IDL attribute must reflect nomodule content attribute</title> -<link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> -<link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script id="classicWithoutNomodule"></script> -<script id="classicWithNomodule" nomodule></script> -<script id="moduleWithoutNomodule" type=module></script> -<script id="moduleWithNomodule" type=module nomodule></script> -<script> - -test(() => { - assert_false(document.getElementById('classicWithoutNomodule').noModule); -}, 'noModule IDL attribute on a parser created classic script element without nomodule content attribute'); - -test(() => { - assert_true(document.getElementById('classicWithNomodule').noModule); -}, 'noModule IDL attribute on a parser created classic script element with nomodule content attribute'); - -test(() => { - assert_false(document.getElementById('moduleWithoutNomodule').noModule); -}, 'noModule IDL attribute on a parser created module script element without nomodule content attribute'); - -test(() => { - assert_true(document.getElementById('moduleWithNomodule').noModule); -}, 'noModule IDL attribute on a parser created module script element with nomodule content attribute'); - - -test(() => { - const script = document.createElement('script'); - assert_false(script.noModule); -}, 'noModule IDL attribute on a dynamically created script element without nomodule content attribute'); - -test(() => { - const script = document.createElement('script'); - script.setAttribute('nomodule', 'nomodule'); - assert_true(script.noModule); -}, 'noModule IDL attribute on a dynamically created script element after nomodule content attribute is set to "nomodule"'); - -test(() => { - const script = document.createElement('script'); - script.setAttribute('nomodule', ''); - assert_true(script.noModule); -}, 'noModule IDL attribute on a dynamically created script element after nomodule content attribute is set to ""'); - -test(() => { - const script = document.createElement('script'); - script.setAttribute('nomodule', 'nomodule'); - assert_true(script.noModule); - script.removeAttribute('nomodule'); - assert_false(script.noModule); -}, 'noModule IDL attribute on a dynamically created script element after nomodule content attribute had been removed'); - -test(() => { - const script = document.createElement('script'); - assert_false(script.hasAttribute('nomodule')); - script.noModule = true; - assert_true(script.hasAttribute('nomodule')); -}, 'noModule IDL attribute must add nomodule content attribute on setting to true'); - -test(() => { - const script = document.createElement('script'); - script.setAttribute('nomodule', 'nomodule'); - script.noModule = false; - assert_false(script.hasAttribute('nomodule')); -}, 'noModule IDL attribute must remove nomodule content attribute on setting to false'); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-async-classic-script.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-async-classic-script.html deleted file mode 100644 index 25de7968304..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-async-classic-script.html +++ /dev/null @@ -1,63 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>External classic scripts with nomodule content attribute must not run</title> -<link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> -<link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<!-- Load this script synchronously to ensure test cases below can load it in 200ms --> -<script src="resources/set-script-executed.js"></script> -</head> -<body> -<script> -let supportsNoModule = "noModule" in document.getElementsByTagName("script")[0]; - -waitForLoadEvent = new Promise((resolve) => { - window.onload = resolve; -}); - -promise_test(() => { - window.executed = false; - let loaded = false; - let errored = false; - - let script = document.createElement('script'); - - script.src = './resources/set-script-executed.js'; - script.onload = () => loaded = true; - script.onerror = () => errored = true; - script.noModule = false; - document.body.appendChild(script); - - return waitForLoadEvent.then(() => { - assert_true(supportsNoModule); - assert_true(executed); - assert_true(loaded); - assert_false(errored); - }); -}, 'An asynchronously loaded classic script with noModule set to false must run'); - -promise_test(() => { - window.executed = false; - let loaded = false; - let errored = false; - - let script = document.createElement('script'); - script.src = './resources/set-script-executed.js'; - script.onload = () => loaded = true; - script.onerror = () => errored = true; - script.noModule = true; - document.body.appendChild(script); - - return waitForLoadEvent.then(() => { - assert_true(supportsNoModule); - assert_false(executed); - assert_false(loaded); - assert_false(errored); - }); -}, 'An asynchronously loaded classic script with noModule set to true must not run'); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-external-module-script.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-external-module-script.html deleted file mode 100644 index 138b33c9fa4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-external-module-script.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>An external module script with nomodule must run</title> -<link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> -<link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script nomodule type="module" src="./resources/exports-cocoa.js"></script> -<script> - -waitForLoadEvent = new Promise((resolve) => { - window.onload = resolve; -}); - -promise_test(() => { - return waitForLoadEvent.then(() => { - assert_equals(typeof cocoa, 'undefined'); - assert_equals(typeof exportedCocoa, 'object'); - assert_equals(exportedCocoa.taste(), 'awesome'); - }); -}, 'An external module script with nomodule content attribute must run'); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-classic-scripts.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-classic-scripts.html deleted file mode 100644 index 588d59975cb..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-classic-scripts.html +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>Inline classic scripts with nomodule content attribute must not run</title> -<link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> -<link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script> -window.executed = true; -</script> -<script> - -test(() => { - assert_true(executed); -}, 'An inline classic script without nomodule content attribute must run'); - - -window.executed = false; -</script> -<script nomodule> -window.executed = true; -</script> -<script> - -test(() => { - assert_false(executed); -}, 'An inline classic script with nomodule content attribute must not run'); - -</script> -<script> - -test(() => { - window.executed = false; - const element = document.createElement("script"); - element.noModule = false; - element.textContent = `window.executed = true`; - document.body.appendChild(element); - assert_true(window.executed); -}, 'An inline classic script element dynamically inserted after noModule was set to false must run.'); - -test(() => { - window.executed = false; - const element = document.createElement("script"); - element.noModule = true; - element.textContent = `window.executed = true`; - document.body.appendChild(element); - assert_false(window.executed); -}, 'An inline classic script element dynamically inserted after noModule was set to true must not run.'); - -window.executed = false; -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-module-script.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-module-script.html deleted file mode 100644 index b11c25932e9..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-module-script.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>An inline module script with nomodule must run</title> -<link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> -<link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script nomodule type="module"> -import Cocoa from "./resources/cocoa-module.js"; -var cocoa = new Cocoa(); -window.exportedCocoa = cocoa; -</script> -<script> - -waitForLoadEvent = new Promise((resolve) => { - window.onload = resolve; -}); - -promise_test(() => { - return waitForLoadEvent.then(() => { - assert_equals(typeof cocoa, 'undefined'); - assert_equals(typeof exportedCocoa, 'object'); - assert_equals(exportedCocoa.taste(), 'awesome'); - }); -}, 'An inline module script with nomodule content attribute must run'); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-synchronously-loaded-classic-scripts.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-synchronously-loaded-classic-scripts.html deleted file mode 100644 index 9f6207c9a5e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/nomodule-set-on-synchronously-loaded-classic-scripts.html +++ /dev/null @@ -1,41 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<title>External classic scripts with nomodule content attribute must not run</title> -<link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> -<link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<script> - -window.executed = false; -window.loaded = false; -window.errored = false; -</script> -<script src="./resources/set-script-executed.js" onload="loaded = true" onerror="errored = false"></script> -<script> - -test(() => { - assert_true(executed); - assert_true(loaded); - assert_false(errored); -}, 'A synchronously loaded external classic script without nomodule content attribute must run'); - -window.executed = false; -window.loaded = false; -window.errored = false; -</script> -<script nomodule src="./resources/set-script-executed.js" onload="loaded = true" onerror="errored = false"></script> -<script> - -test(() => { - assert_false(executed); - assert_false(loaded); - assert_false(errored); -}, 'A synchronously loaded external classic script with nomodule content attribute must not run'); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/promise-reject-and-remove.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/promise-reject-and-remove.html deleted file mode 100644 index a3b2730e569..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/promise-reject-and-remove.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -async_test(t => { - window.onload = t.step_func_done(); -}, 'Removing iframe in promise reject handler should not crash'); -</script> -<iframe src="resources/promise-reject-and-remove-iframe.html"></iframe> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-16be.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-16be.js Binary files differdeleted file mode 100644 index 8a529e10b13..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-16be.js +++ /dev/null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-16le.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-16le.js Binary files differdeleted file mode 100644 index 578f7f19519..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-16le.js +++ /dev/null diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-8.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-8.js deleted file mode 100644 index fb88bdda2af..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/bom-utf-8.js +++ /dev/null @@ -1,2 +0,0 @@ -// JavaScript file with UTF-8 BOM. -window.executed_utf8_bom = '三村かな子'; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cocoa-module.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cocoa-module.js deleted file mode 100644 index 24360a7bfe7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cocoa-module.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Cocoa { - taste() { - return "awesome"; - } -}; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cross-origin.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cross-origin.py deleted file mode 100644 index abac1901b7d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cross-origin.py +++ /dev/null @@ -1,20 +0,0 @@ -def main(request, response): - origin = request.headers.get(b"origin") - - if origin is not None: - response.headers.set(b"Access-Control-Allow-Origin", origin) - response.headers.set(b"Access-Control-Allow-Methods", b"GET") - response.headers.set(b"Access-Control-Allow-Credentials", b"true") - - if request.method == u"OPTIONS": - return u"" - - headers = [(b"Content-Type", b"text/javascript")] - milk = request.cookies.first(b"milk", None) - - if milk is None: - return headers, u"var included = false;" - elif milk.value == b"yes": - return headers, u"var included = true;" - - return headers, u"var included = false;" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/exports-cocoa.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/exports-cocoa.js deleted file mode 100644 index 02967bc6319..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/exports-cocoa.js +++ /dev/null @@ -1,3 +0,0 @@ -import Cocoa from "./cocoa-module.js"; -var cocoa = new Cocoa(); -window.exportedCocoa = cocoa; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/flag-setter.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/flag-setter.js deleted file mode 100644 index 3274e5bfeb2..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/flag-setter.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -window.didExecute = true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/load-error-events-helpers.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/load-error-events-helpers.js deleted file mode 100644 index bbd6b09c6cf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/load-error-events-helpers.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -// Helper functions to be used from load-error-events*.html tests. - -function event_test(name, load_to_be_fired, error_to_be_fired) { - return { - test: async_test(name), - executed: false, - load_event_to_be_fired: load_to_be_fired, - error_event_to_be_fired: error_to_be_fired - }; -} - -// Should be used as load/error event handlers of script tags, -// with |t| = the object returned by event_test(). -function onLoad(t) { - t.test.step(function() { - if (t.load_event_to_be_fired) { - assert_true(t.executed, - 'Load event should be fired after script execution'); - // Delay done() a little so that if an error event happens - // the assert_unreached is reached and fails the test. - t.test.step_timeout(() => t.test.done(), 100); - } else { - assert_unreached('Load event should not be fired.'); - } - }); -}; -function onError(t) { - t.test.step(function() { - if (t.error_event_to_be_fired) { - assert_false(t.executed); - // Delay done() a little so that if a load event happens - // the assert_unreached is reached and fails the test. - t.test.step_timeout(() => t.test.done(), 100); - } else { - assert_unreached('Error event should not be fired.'); - } - }); -}; - -// To be called from inline scripts, which expect no load/error events. -function onExecute(t) { - t.executed = true; - // Delay done() a little so that if a load/error event happens - // the assert_unreached is reached and fails the test. - t.test.step_timeout(() => t.test.done(), 100); -} diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/load-error-events.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/load-error-events.py deleted file mode 100644 index 1eb82cd497d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/load-error-events.py +++ /dev/null @@ -1,15 +0,0 @@ -import re - -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - test = request.GET.first(b'test') - assert(re.match(b'^[a-zA-Z0-9_]+$', test)) - - if test.find(b'_load') >= 0: - status = 200 - content = b'"use strict"; %s.executed = true;' % test - else: - status = 404 - content = b'"use strict"; %s.test.step(function() { assert_unreached("404 script should not be executed"); });' % test - - return status, headers, content diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/promise-reject-and-remove-iframe.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/promise-reject-and-remove-iframe.html deleted file mode 100644 index 6da274469f8..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/promise-reject-and-remove-iframe.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html> -<script> -const promise = Promise.reject(); - -window.onload = () => { - promise.catch(() => parent.document.querySelector('iframe').remove()); -}; -</script> - -<!-- Load a slow script to delay window.onload for a while. - Without this, crashes are flaky. --> -<script src="/common/slow.py"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/script-type-and-language-js.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/script-type-and-language-js.js deleted file mode 100644 index d357bc49944..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/script-type-and-language-js.js +++ /dev/null @@ -1,141 +0,0 @@ -function testAttribute(attr, val, shouldRun) { - test(function() { - assert_false(window.ran, "ran variable not reset"); - let script; - if (document.contentType === 'image/svg+xml') { - // SVG - script = document.createElementNS("http://www.w3.org/2000/svg", "script"); - } else { - // HTML or XHTML - script = document.createElement("script"); - } - script.setAttribute(attr, val); - script.textContent = "window.ran = true;"; - document.querySelector('#script-placeholder').appendChild(script); - assert_equals(window.ran, shouldRun); - }, "Script should" + (shouldRun ? "" : "n't") + " run with " + attr + "=" + - format_value(val)); - window.ran = false; -} -function testTypeShouldRun(type) { - testAttribute("type", type, true); -} -function testLanguageShouldRun(lang) { - testAttribute("language", lang, true); -} -function testTypeShouldNotRun(type) { - testAttribute("type", type, false); -} -function testLanguageShouldNotRunUnlessSVG(lang) { - // In SVGs, there is no concrete spec but all browsers agree that - // language attributes have no effects and thus script elements - // without type attributes are always expected to run regardless of - // language attributes. - const expectedToRun = document.contentType === 'image/svg+xml'; - testAttribute("language", lang, expectedToRun); -} - -// Unlike `test*()` methods above, there should be a (parser-inserted) script -// with an invalid type/language that would set `window.ran` to true just -// before `testParserInsertedDidNotRun()`, and -// `testParserInsertedDidNotRun()` asserts that the script did not run. -// `window.ran` should be reset where needed. For example: -// <script>window.ran = false;</script> -// <script type="invalid-type">window.ran = true;</script> -// <script>testParserInsertedDidNotRun('type=invalid-type');</script> -function testParserInsertedDidNotRun(description) { - test(() => assert_false(window.ran), - "Script shouldn't run with " + description + " (parser-inserted)"); - window.ran = false; -} - -// When prefixed by "application/", these match with -// https://mimesniff.spec.whatwg.org/#javascript-mime-type -const application = [ - "ecmascript", - "javascript", - "x-ecmascript", - "x-javascript" -]; - -// When prefixed by "text/", these match with -// https://mimesniff.spec.whatwg.org/#javascript-mime-type -const text = [ - "ecmascript", - "javascript", - "javascript1.0", - "javascript1.1", - "javascript1.2", - "javascript1.3", - "javascript1.4", - "javascript1.5", - "jscript", - "livescript", - "x-ecmascript", - "x-javascript" -]; - -const legacyTypes = [ - "javascript1.6", - "javascript1.7", - "javascript1.8", - "javascript1.9" -]; - -const spaces = [" ", "\t", "\n", "\r", "\f"]; - -window.ran = false; - -// Type attribute - -testTypeShouldRun(""); -testTypeShouldNotRun(" "); - -application.map(t => "application/" + t).forEach(testTypeShouldRun); -application.map(t => ("application/" + t).toUpperCase()).forEach( - testTypeShouldRun); - -spaces.forEach(function(s) { - application.map(t => "application/" + t + s).forEach(testTypeShouldRun); - application.map(t => s + "application/" + t).forEach(testTypeShouldRun); -}); - -application.map(t => "application/" + t + "\0").forEach(testTypeShouldNotRun); -application.map(t => "application/" + t + "\0foo").forEach( - testTypeShouldNotRun); - -text.map(t => "text/" + t).forEach(testTypeShouldRun); -text.map(t => ("text/" + t).toUpperCase()).forEach(testTypeShouldRun); - -legacyTypes.map(t => "text/" + t).forEach(testTypeShouldNotRun); - -spaces.forEach(function(s) { - text.map(t => "text/" + t + s).forEach(testTypeShouldRun); - text.map(t => s + "text/" + t).forEach(testTypeShouldRun); -}); - -text.map(t => "text/" + t + "\0").forEach(testTypeShouldNotRun); -text.map(t => "text/" + t + "\0foo").forEach(testTypeShouldNotRun); - -text.forEach(testTypeShouldNotRun); -legacyTypes.forEach(testTypeShouldNotRun); - -// Language attribute - -testLanguageShouldRun(""); -testLanguageShouldNotRunUnlessSVG(" "); - -text.forEach(testLanguageShouldRun); -text.map(t => t.toUpperCase()).forEach(testLanguageShouldRun); - -legacyTypes.forEach(testLanguageShouldNotRunUnlessSVG); - -spaces.forEach(function(s) { - text.map(t => t + s).forEach(testLanguageShouldNotRunUnlessSVG); - text.map(t => s + t).forEach(testLanguageShouldNotRunUnlessSVG); -}); -text.map(t => t + "xyz").forEach(testLanguageShouldNotRunUnlessSVG); -text.map(t => "xyz" + t).forEach(testLanguageShouldNotRunUnlessSVG); - -text.map(t => t + "\0").forEach(testLanguageShouldNotRunUnlessSVG); -text.map(t => t + "\0foo").forEach(testLanguageShouldNotRunUnlessSVG); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/set-script-executed.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/set-script-executed.js deleted file mode 100644 index a6095097dd7..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/set-script-executed.js +++ /dev/null @@ -1 +0,0 @@ -window.executed = true; diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/syntax-error.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/syntax-error.js deleted file mode 100644 index 40dc81dcfac..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/syntax-error.js +++ /dev/null @@ -1 +0,0 @@ -This cannot be parsed as JavaScript diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/throw.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/throw.js deleted file mode 100644 index be53dd1ef3f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/throw.js +++ /dev/null @@ -1 +0,0 @@ -document.querySelector(":::not-going-to-be-valid"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01.html deleted file mode 100644 index c5ac0d0a62a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE html> -<head> - <meta charset="utf-8"> - <title>Script @type: unknown parameters</title> - <link rel="author" title="askalski" href="github.com/askalski"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <div id="log"></div> - - <!-- "Step1" tests --> - <!-- charset is set incorrectly via Content Type "text/javascript;charset=utf-8" in response - which has priority before a correct setting in "charset" attribute of script tag. - --> - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript%3Bcharset=utf-8" charset="windows-1250"> - </script> - <script> - test(function() { - //these strings should not match, since the file charset is set incorrectly - assert_not_equals(window.getSomeString(), "śćążź"); - }); - </script> - <!-- charset is set correctly via Content Type "text/javascript;charset=utf-8" in response - which has priority before a incorrect setting in "charset" attribute of script tag. - --> - - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript%3Bcharset=windows-1250" charset="utf-8"> - </script> - <script> - //the charset is set correctly via Content Type "text/javascript;charset=windows-1250" in respones - test(function() { - assert_equals(window.getSomeString(), "śćążź"); - }); - </script> - - <!-- end of step1 tests, now step2 tests --> - <!-- in this case, the response's Content Type does not bring charset information. - Second step takes block character encoding if available.--> - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript" charset="utf-8"> - </script> - <script> - test(function() { - //these strings should not match, since the file charset is set incorrectly in "charset" tag of <script> above - assert_not_equals(window.getSomeString(), "śćążź"); - }); - </script> - <!-- charset is set correctly via Content Type "text/javascript;charset=utf-8" in response - which has priority before a incorrect setting in "charset" attribute of script tag. - --> - - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript" charset="windows-1250"> - </script> - <script> - //the charset is set correctly via content attribute in <script> above - test(function() { - assert_equals(window.getSomeString(), "śćążź"); - }); - </script> - - <!-- end of step2 tests, now step3 tests --> - <!-- in this case, neither response's Content Type nor charset attribute bring correct charset information. - Third step takes this document's character encoding (declared correctly as UTF-8).--> - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript"> - </script> - <script> - test(function() { - //these strings should not match, since the tested file is in windows-1250, and document is utf-8 - assert_not_equals(window.getSomeString(), "śćążź"); - }); - </script> - - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript"> - </script> - <script> - //these strings should match, both document and tested file are utf-8 - test(function() { - assert_equals(window.getSomeString(), "śćążź"); - }); - </script> - - <!-- the last portion of tests (step4) are in file script-charset-02.html - -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02.html deleted file mode 100644 index 63cbe838e01..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02.html +++ /dev/null @@ -1,41 +0,0 @@ -<!DOCTYPE html> -<head> - <title>Script encoding for document encoding windows-1250</title> - <link rel="author" title="askalski" href="github.com/askalski"> - <link rel="author" title="Aaqa Ishtyaq" href="github.com/aaqaishtyaq"> - <link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-script"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <div id="log"></div> - <!-- to avoid conflating tests for script encoding declaring the encoding at the top of file. i.e, windows-1250--> - <meta charset="windows-1250"> - <script> - test(function() { - assert_equals(document.characterSet, "windows-1250") - }, "assumption: document encoding is windows-1250"); - </script> - - <!-- in this case, neither response's Content Type nor charset attribute bring correct charset information. - --> - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript"> - </script> - - <script> - test(function() { - //these string should match since, windows-1250 is the fallback encoding. - assert_equals(window.getSomeString(), "\u015b\u0107\u0105\u017c\u017a"); - }, "windows-1250 script decoded using document encoding (also windows-1250)"); - </script> - - <script type="text/javascript" - src="serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript"> - </script> - <script> - //these strings should match, since this string is the result of decoding the utf-8 text as windows-1250. - test(function() { - assert_equals(window.getSomeString(), "\u0139\u203a\xc4\u2021\xc4\u2026\u0139\u013d\u0139\u015f"); - }, "UTF-8 script decoded using document encoding (windows-1250)"); - </script> - -</head> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-03.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-03.html deleted file mode 100644 index 4ff4cc6b0ba..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-03.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<head> -<meta charset="utf-8"> -<title>Script changing @charset</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id="log"></div> -<script> -async_test(function() { - var s = document.createElement("script"); - s.src = "external-script-windows1250.js"; - s.charset = "windows-1250"; - document.body.appendChild(s); - s.charset = "utf-8"; - window.onload = this.step_func_done(function() { - assert_equals(window.getSomeString(), "\u015b\u0107\u0105\u017c\u017a"); - }); -}) -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network.sub.html deleted file mode 100644 index 5886ab6f32c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network.sub.html +++ /dev/null @@ -1,120 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>HTMLScriptElement: crossorigin attribute network test</title> -<link rel="author" title="KiChjang" href="mailto:kungfukeith11@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#cors-settings-attribute"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> - <script type="text/javascript"> - var test1 = async_test("same-origin use-credentials"); - var test2 = async_test("same-origin invalid"); - var test3 = async_test("same-origin missing"); - var test4 = async_test("cross-origin use-credentials"); - var test5 = async_test("cross-origin invalid"); - var test6 = async_test("cross-origin missing"); - var test7 = async_test("cross-origin use-credentials mixed case"); - var test8 = async_test("cross-origin use-credentials non-ASCII"); - - var same = "resources/cross-origin.py"; - var cross = new URL(same, location); - cross.port = {{ports[http][1]}}; - - var script1 = document.createElement("script"); - script1.src = same; - script1.crossOrigin = "use-credentials"; - - var script2 = document.createElement("script"); - script2.src = same; - script2.crossOrigin = "gibberish"; - - var script3 = document.createElement("script"); - script3.src = same; - - var script4 = document.createElement("script"); - script4.src = cross; - script4.crossOrigin = "use-credentials"; - - var script5 = document.createElement("script"); - script5.src = cross; - script5.crossOrigin = "gibberish"; - - var script6 = document.createElement("script"); - script6.src = cross; - - var script7 = document.createElement("script"); - script7.src = cross; - script7.crossOrigin = "UsE-cReDenTiAlS"; - - var script8 = document.createElement("script"); - script8.src = cross; - script8.crossOrigin = "uſe-credentialſ"; - - document.cookie = "milk=yes"; - - document.body.appendChild(script1); - script1.onload = function() { - test1.step(function() { - assert_true(included, "credentials included (credentialsMode include)"); - test1.done(); - }); - }; - - document.body.appendChild(script2); - script2.onload = function() { - test2.step(function() { - assert_true(included, "credentials included (credentialsMode same-origin)"); - test2.done(); - }); - }; - - document.body.appendChild(script3); - script3.onload = function() { - test3.step(function() { - assert_true(included, "credentials included (credentialsMode include)"); - test3.done(); - }); - }; - - document.body.appendChild(script4); - script4.onload = function() { - test4.step(function() { - assert_true(included, "credentials included (credentialsMode include)"); - test4.done(); - }); - }; - - document.body.appendChild(script5); - script5.onload = function() { - test5.step(function() { - assert_false(included, "credentials excluded (credentialsMode same-origin)"); - test5.done(); - }); - }; - - document.body.appendChild(script6); - script6.onload = function() { - test6.step(function() { - assert_true(included, "credentials included (credentialsMode include)"); - test6.done(); - }); - }; - - document.body.appendChild(script7); - script7.onload = function() { - test7.step(function() { - assert_true(included, "credentials included (credentialsMode include)"); - test7.done(); - }); - }; - - document.body.appendChild(script8); - script8.onload = function() { - test8.step(function() { - assert_false(included, "credentials excluded (credentialsMode same-origin)"); - test8.done(); - }); - }; - </script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin.html deleted file mode 100644 index 52857a08ea0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin.html +++ /dev/null @@ -1,39 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>HTMLScriptElement: crossOrigin IDL attribute</title> -<link rel="author" title="KiChjang" href="mailto:kungfukeith11@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#cors-settings-attribute"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script id="script1"></script> -<script id="script2" crossorigin=""></script> -<script id="script3" crossorigin="foo"></script> -<script id="script4" crossorigin="anonymous"></script> -<script id="script5" crossorigin="use-credentials"></script> -<script> -test(function() { - var script1 = document.getElementById("script1"); - var script2 = document.getElementById("script2"); - var script3 = document.getElementById("script3"); - var script4 = document.getElementById("script4"); - var script5 = document.getElementById("script5"); - - assert_equals(script1.crossOrigin, null, "Missing value default should be null"); - assert_equals(script2.crossOrigin, "anonymous", "Empty string should map to anonymous"); - assert_equals(script3.crossOrigin, "anonymous", "Invalid value default should be anonymous"); - assert_equals(script4.crossOrigin, "anonymous", "anonymous should be parsed correctly"); - assert_equals(script5.crossOrigin, "use-credentials", "use-credentials should be parsed correctly"); - - script1.crossOrigin = "bar"; - assert_equals(script1.crossOrigin, "anonymous", "Setting to invalid value would default to anonymous"); - - script2.crossOrigin = null; - assert_equals(script2.crossOrigin, null, "Resetting to null should work"); - - script4.crossOrigin = "use-credentials"; - assert_equals(script4.crossOrigin, "use-credentials", "Switching from anonymous to use-credentials should work"); - - script5.crossOrigin = "anonymous"; - assert_equals(script5.crossOrigin, "anonymous", "Switching from use-credentials to anonymous should work"); -}, document.title); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-defer-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-defer-xhtml.xhtml deleted file mode 100644 index 3f4a50f7790..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-defer-xhtml.xhtml +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title>XHTML Test: HTMLScriptElement - defer</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<meta charset="utf-8" /> -</head> -<body> -<div id="log"></div> - -<script> - -let script_run_status = "inline"; -let t = async_test("the defer script run later"); - -</script> - -<script type="text/javascript" src="defer.js" defer="defer"></script> - -<script> - -t.step(() => { - assert_equals(script_run_status, "inline", "the script run status"); - script_run_status = "deferred"; -}); - -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-defer.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-defer.html deleted file mode 100644 index 80eb98dc750..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-defer.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>HTML Test: HTMLScriptElement - defer</title> -<link rel="author" title="Intel" href="http://www.intel.com/"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="log"></div> - -<script> - -let script_run_status = "inline"; -let t = async_test("the defer script run later"); - -</script> - -<script type="text/javascript" src="defer.js" defer></script> - -<script> - -t.step(() => { - assert_equals(script_run_status, "inline", "the script run status"); - script_run_status = "deferred"; -}); - -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event-xhtml.xhtml deleted file mode 100644 index 69c4ef1f810..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event-xhtml.xhtml +++ /dev/null @@ -1,22 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Scripts with for and event attributes</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <div id="log"></div> - <script> - var run = false; - </script> - <script for="window" event="bar"> - // This script should not run, but should not cause a parse error either. - run = true; - </script> - <script> - test(function() { - assert_false(run, "Script was unexpectedly run.") - }, "Scripts with for and event attributes should not run.") - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event.html deleted file mode 100644 index 552ea7041a3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-for-event.html +++ /dev/null @@ -1,93 +0,0 @@ -<!DOCTYPE html> -<title>Scripts with for and event attributes</title> -<link rel="author" title="Matheus Kerschbaum" href="mailto:matjk7@gmail.com"> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id="log"></div> -<script> -var expected = [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - false, - true, - true, -]; -var run = expected.map(function() { return false }); -</script> -<script for="wİndow" event="onload"> -run[0] = true; -</script> -<script for="window" event="onload x"> -run[1] = true; -</script> -<script for="window" event="onload(x"> -run[2] = true; -</script> -<script for="window" event="onload(x)"> -run[3] = true; -</script> -<script for="window" event="onclick"> -run[4] = true; -</script> -<script for="" event="onload"> -run[5] = true; -</script> -<script for="window" event=""> -run[6] = true; -</script> -<script for="" event=""> -run[7] = true; -</script> -<script for=" window" event="onload"> -run[8] = true; -</script> -<script for="window " event="onload"> -run[9] = true; -</script> -<script for="window" event=" onload"> -run[10] = true; -</script> -<script for="window" event="onload "> -run[11] = true; -</script> -<script for=" window " event=" onload "> -run[12] = true; -</script> -<script for=" window " event=" onload() "> -run[13] = true; -</script> -<script for="object" event="handler"> -run[14] = true; -</script> -<script event="handler"> -run[15] = true; -</script> -<script for="object"> -run[16] = true; -</script> -<script> -test(function() { - for (var i = 0; i < run.length; ++i) { - test(function() { - var script = document.querySelectorAll("script[for], script[event]")[i]; - assert_equals(run[i], expected[i], - "script for=" + format_value(script.getAttribute("for")) + - " event=" + format_value(script.getAttribute("event"))); - }, "Script " + i); - } -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml deleted file mode 100644 index 8dd9ceb9a62..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-noembed-noframes-iframe.xhtml +++ /dev/null @@ -1,36 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title>Script inside noembed, noframes and iframe</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<div id="log"></div> -<script> -var run = []; -</script> -<div id="test"> -<noembed> -<script> -run.push("noembed"); -</script> -</noembed> -<noframes> -<script> -run.push("noframes"); -</script> -</noframes> -<iframe> -<script> -run.push("iframe"); -</script> -</iframe> -</div> -<script> -test(function() { - assert_array_equals(run, ["noembed", "noframes", "iframe"], "Haven't run."); -}); -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-child.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-child.html deleted file mode 100644 index 2f3ce2368d3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-child.html +++ /dev/null @@ -1,12 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>Script is not executed after script thread is shutdown</title> -<script> -onload = function() { - script_executed = parent.script_executed; - s = document.createElement('script'); - s.type = 'text/javascript'; - s.src = 'script-not-executed-after-shutdown.js?pipe=trickle(d3)'; - document.body.appendChild(s); -}; -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.html deleted file mode 100644 index eb4def3ec44..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.html +++ /dev/null @@ -1,19 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>Script is not executed after script thread is shutdown</title> -<meta name="timeout" content="long"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<iframe id="testiframe" src="script-not-executed-after-shutdown-child.html"></iframe> -<script> -async_test(function(t) { - window.script_executed = t.unreached_func("script executed in removed iframe"); - let iframe = document.getElementById("testiframe"); - iframe.onload = function() { - iframe.parentNode.removeChild(iframe); - }; - setTimeout(function() { - t.done(); - }, 5000); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.js deleted file mode 100644 index ccdf14c0cd4..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.js +++ /dev/null @@ -1 +0,0 @@ -script_executed(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-2.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-2.py deleted file mode 100644 index 4ff5be7374d..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-2.py +++ /dev/null @@ -1,4 +0,0 @@ -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - body = u"test2_token = \"script executed\";" - return 200, headers, body diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html deleted file mode 100644 index 44ad30b018a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html +++ /dev/null @@ -1,19 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title></title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script>var test1_token = "script not executed";</script> -<script src="script-not-found-not-executed.py"></script> -<script> -test(function(){ - assert_equals(test1_token, "script not executed"); -}, "Script that 404"); -</script> -<script>var test2_token = "script not executed";</script> -<script src="script-not-found-not-executed-2.py"></script> -<script> -test(function(){ - assert_equals(test2_token, "script executed"); -}, "Script that does not 404"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.py deleted file mode 100644 index 9354d427030..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.py +++ /dev/null @@ -1,4 +0,0 @@ -def main(request, response): - headers = [(b"Content-Type", b"text/javascript")] - body = u"test1_token = \"script executed\";" - return 404, headers, body diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-1.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-1.html deleted file mode 100644 index 0fe39b11a81..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-1.html +++ /dev/null @@ -1,12 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Test that the insertion point is defined in the error event of a parser-inserted script that actually started a fetch (but just had it fail).</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script> - var t = async_test(""); - var writeDone = t.step_func_done(function(text) { - assert_equals(text, "Some text"); - }); -</script> -<iframe src="support/script-onerror-insertion-point-1-helper.html"></iframe> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html deleted file mode 100644 index 6d3f3ef09ee..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html +++ /dev/null @@ -1,13 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Test that the insertion point is not defined in the error event of a - parser-inserted script that has an unparseable URL</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script> - var t = async_test(""); - var writeDone = t.step_func_done(function(text) { - assert_equals(text, "text"); - }); -</script> -<iframe src="support/script-onerror-insertion-point-2-helper.html"></iframe> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-insertion-point.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-insertion-point.html deleted file mode 100644 index ce3ddeee65f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-insertion-point.html +++ /dev/null @@ -1,12 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>Test that the insertion point is defined in the load event of a parser-inserted script.</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script> - var t = async_test(""); - var writeDone = t.step_func_done(function(text) { - assert_equals(text, "Some text"); - }); -</script> -<iframe src="support/script-onload-insertion-point-helper.html"></iframe> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-string.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-string.html deleted file mode 100644 index 85f2d4dcfaf..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-string.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<title>Script: setting onload to a string</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id=log></div> -<script> -test(function() { - var s = document.createElement("script"); - assert_equals(s.onload, null); - var dummy = function() {}; - s.onload = dummy; - assert_equals(s.onload, dummy); - s.onload = "w('load DOM appended')"; - assert_equals(s.onload, null); -}, "Setting onload to a string should convert to null."); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-referrerpolicy-idl.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-referrerpolicy-idl.html deleted file mode 100644 index bf01cb83b8c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-referrerpolicy-idl.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title><script> referrerPolicy IDL</title> -<link rel="author" href="mailto:masonf@chromium.org"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#referrer-policy-attribute"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<script> - test(() => { - const script = document.createElement('script'); - document.body.appendChild(script); - assert_equals(script.referrerPolicy,"",'Missing content attribute should reflect as empty'); - script.setAttribute('referrerpolicy','no-referrer'); - assert_equals(script.referrerPolicy,"no-referrer",'Valid value should reflect'); - script.setAttribute('referrerpolicy',''); - assert_equals(script.referrerPolicy,"",'Empty string should reflect as empty'); - script.setAttribute('referrerpolicy','invalid-value-here'); - assert_equals(script.referrerPolicy,"",'Invalid values should reflect as empty'); - script.referrerPolicy = 'no-referrer'; - assert_equals(script.referrerPolicy,"no-referrer",'Valid value via IDL'); - script.referrerPolicy = null; - assert_equals(script.referrerPolicy,"",'Null should reflect as empty'); - },'Missing/invalid/null referrerPolicy should reflect as the empty string') -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-supports.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-supports.html deleted file mode 100644 index 495056fce9a..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-supports.html +++ /dev/null @@ -1,52 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>HTMLScriptElement.supports</title> -<link rel=help href="https://html.spec.whatwg.org/#dom-script-supports"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -test(function() { - assert_equals(typeof HTMLScriptElement.supports, 'function'); -}, 'Type of HTMLScriptElement.supports is function'); - -test(function() { - assert_true(HTMLScriptElement.supports('classic')); -}, 'HTMLScriptElement.supports resurns true for \'classic\''); - -test(function() { - assert_true(HTMLScriptElement.supports('module')); -}, 'HTMLScriptElement.supports resurns true for \'module\''); - -test(function() { - assert_false(HTMLScriptElement.supports('application/ecmascript')); - assert_false(HTMLScriptElement.supports('application/javascript')); - assert_false(HTMLScriptElement.supports('application/x-ecmascript')); - assert_false(HTMLScriptElement.supports('application/x-javascript')); - assert_false(HTMLScriptElement.supports('text/ecmascript')); - assert_false(HTMLScriptElement.supports('text/javascript')); - assert_false(HTMLScriptElement.supports('text/javascript1.0')); - assert_false(HTMLScriptElement.supports('text/javascript1.1')); - assert_false(HTMLScriptElement.supports('text/javascript1.2')); - assert_false(HTMLScriptElement.supports('text/javascript1.3')); - assert_false(HTMLScriptElement.supports('text/javascript1.4')); - assert_false(HTMLScriptElement.supports('text/javascript1.5')); - assert_false(HTMLScriptElement.supports('text/jscript')); - assert_false(HTMLScriptElement.supports('text/livescript')); - assert_false(HTMLScriptElement.supports('text/x-ecmascript')); - assert_false(HTMLScriptElement.supports('text/x-javascript')); -}, 'HTMLScriptElement.supports returns false for JavaScript MIME types'); - -test(function() { - assert_false(HTMLScriptElement.supports('')); - assert_false(HTMLScriptElement.supports(' ')); - assert_false(HTMLScriptElement.supports('classic ')); - assert_false(HTMLScriptElement.supports('module ')); - assert_false(HTMLScriptElement.supports(' classic ')); - assert_false(HTMLScriptElement.supports(' module ')); - assert_false(HTMLScriptElement.supports('classics')); - assert_false(HTMLScriptElement.supports('modules')); - assert_false(HTMLScriptElement.supports('Classic')); - assert_false(HTMLScriptElement.supports('Module')); - assert_false(HTMLScriptElement.supports('unsupported')); -}, 'HTMLScriptElement.supports returns false for unsupported types'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications-csp.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications-csp.html deleted file mode 100644 index a9911510661..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications-csp.html +++ /dev/null @@ -1,52 +0,0 @@ -<!doctype html> -<head> -<meta charset=utf-8> -<title>Modify HTMLScriptElement's text after #prepare-a-script that violates CSP</title> -<link rel=help href="https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<meta http-equiv="content-security-policy" content="script-src - 'nonce-allow' - 'sha256-2+5xh6b9uuIi4GaJtmHWtgR2nwRXJpBtMY4nVaOBpfc=' -"> -<!-- The hash is that of the original content of `script0`. --> - -<script nonce="allow"> -window.t = async_test("Modify inline script element's text " + - "after prepare-a-script before evaluation (CSP)"); - -const updatedText = - 't.unreached_func("CSP check was done against the original text but the updated text was evaluated")();'; - -function changeScriptText() { - document.querySelector('#script0').textContent = updatedText; -} - -t.step_timeout(changeScriptText, 500); -</script> - -<!-- This is "a style sheet that is blocking scripts" and thus ... --> -<link rel="stylesheet" href="/common/slow.py?pipe=trickle(d1)"></link> - -<!-- This inline script becomes a parser-blocking script, and thus -the step_timeout is evaluated after script0 is inserted into DOM, -prepare-a-script'ed, but before its evaluation. --> -<script id="script0"> -t.step(() => { - // When this is evaluated after the stylesheet is loaded, - // script0's textContent is modified by the async script above, - // but the evaluated script is still the original script here, - // not what is overwritten, because "child text content" is taken in - // #prepare-a-script and passed to "creating a classic script". - var s = document.getElementById('script0'); - assert_equals(s.textContent, updatedText, - "<script>'s textContent should be already modified"); - t.done(); - }); -</script> -<script nonce="allow"> -// If this makes the test fail, it indicates `script0` (the original or updated -// text) was not evaluated, probably blocked by CSP that was checked against the -// updated text. -t.unreached_func("CSP check was done against the updated text")(); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html deleted file mode 100644 index cb54da6995b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html +++ /dev/null @@ -1,40 +0,0 @@ -<!doctype html> -<head> -<meta charset=utf-8> -<title>Modify HTMLScriptElement's text after #prepare-a-script</title> -<link rel=help href="https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<script> -var t = async_test("Modify inline script element's text " + - "after prepare-a-script before evaluation"); - -function changeScriptText() { - document.querySelector('#script0').textContent = - 't.unreached_func("This should not be evaluated")();'; -} - -t.step_timeout(changeScriptText, 500); -</script> - -<!-- This is "a style sheet that is blocking scripts" and thus ... --> -<link rel="stylesheet" href="/common/slow.py?pipe=trickle(d1)"></link> - -<!-- This inline script becomes a parser-blocking script, and thus -the step_timeout is evaluated after script0 is inserted into DOM, -prepare-a-script'ed, but before its evaluation. --> -<script id="script0"> -t.step(() => { - // When this is evaluated after the stylesheet is loaded, - // script0's textContent is modified by the async script above, - // but the evaluated script is still the original script here, - // not what is overwritten, because "child text content" is taken in - // #prepare-a-script and passed to "creating a classic script". - var s = document.getElementById('script0'); - assert_equals(s.textContent, - 't.unreached_func("This should not be evaluated")();', - "<script>'s textContent should be already modified"); - t.done(); - }); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-xhtml.xhtml deleted file mode 100644 index 33a4635db37..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-xhtml.xhtml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title>HTMLScriptElement.text</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-text"/> -<script src="/resources/testharness.js"/> -<script src="/resources/testharnessreport.js"/> -</head> -<body> -<div id="log"></div> -<script> -<x>7;</x> -<![CDATA[ - var x = "y"; -]]> -</script> -<script> -var script; -setup(function() { - script = document.body.getElementsByTagName("script")[0]; -}) -test(function() { - assert_equals(script.text, '\n\n\n var x = "y";\n\n') - assert_equals(script.textContent, '\n7;\n\n var x = "y";\n\n') -}, "Getter with CDATA section") -</script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html deleted file mode 100644 index 6e864722467..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html +++ /dev/null @@ -1,72 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>HTMLScriptElement.text</title> -<link rel=help href="https://html.spec.whatwg.org/multipage/#dom-script-text"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id="log"></div> -<script> -var script; -setup(function() { - script = document.createElement("script") - script.appendChild(document.createComment("COMMENT")) - script.appendChild(document.createTextNode(" TEXT ")) - script.appendChild(document.createProcessingInstruction("P", "I")) - script.appendChild(document.createElement("a")) - .appendChild(document.createTextNode("ELEMENT")) -}) - -test(function() { - assert_equals(script.text, " TEXT ") - assert_equals(script.textContent, " TEXT ELEMENT") -}, "Getter") - -test(function() { - script.text = " text " - assert_equals(script.text, " text ") - assert_equals(script.textContent, " text ") - assert_equals(script.firstChild.nodeType, Node.TEXT_NODE) - assert_equals(script.firstChild.data, " text ") - assert_equals(script.firstChild, script.lastChild) - assert_array_equals(script.childNodes, [script.firstChild]) -}, "Setter (non-empty string)") - -test(function() { - script.text = "" - assert_equals(script.text, "") - assert_equals(script.textContent, "") - assert_equals(script.firstChild, null) -}, "Setter (empty string)") - -test(function() { - script.text = null - assert_equals(script.text, "null") - assert_equals(script.textContent, "null") - assert_equals(script.firstChild.nodeType, Node.TEXT_NODE) - assert_equals(script.firstChild.data, "null") - assert_equals(script.firstChild, script.lastChild) -}, "Setter (null)") - -test(function() { - script.text = undefined - assert_equals(script.text, "undefined") - assert_equals(script.textContent, "undefined") - assert_equals(script.firstChild.nodeType, Node.TEXT_NODE) - assert_equals(script.firstChild.data, "undefined") - assert_equals(script.firstChild, script.lastChild) -}, "Setter (undefined)") - -test(function() { - var s = document.createElement("script"); - var text = document.createTextNode("one"); - s.appendChild(text); - - assert_equals(s.firstChild, text); - assert_equals(text.nodeValue, "one"); - - s.text = "two"; - assert_not_equals(s.firstChild, text); - assert_equals(text.nodeValue, "one"); - assert_equals(s.firstChild.nodeValue, "two"); -}, "Setter (text node reuse)") -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-empty.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-empty.html deleted file mode 100644 index 6ce1b279f74..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-empty.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<title>Script @type and @language: empty strings</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<!-- Setup --> -<script> -window.run1 = window.run2 = window.run3 = window.run4 = false; -</script> - -<!-- Systems under test --> -<script type=""> -window.run1 = true; -</script> - -<script type="" language="foo"> -window.run2 = true; -</script> - -<script type="" language=""> -window.run3 = true; -</script> - -<script language=""> -window.run4 = true; -</script> - -<!-- Asserts --> -<script> -test(() => { - assert_true(window.run1); -}, "A script with empty type and no language should run"); - -test(() => { - assert_true(window.run2); -}, "A script with empty type and a random language should run"); - -test(() => { - assert_true(window.run3); -}, "A script with empty type and empty language should run"); - -test(() => { - assert_true(window.run4); -}, "A script with no type and empty language should run"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-svg.svg b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-svg.svg deleted file mode 100644 index 2f31d4d75c0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-svg.svg +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<svg xmlns="http://www.w3.org/2000/svg" - xmlns:h="http://www.w3.org/1999/xhtml"> -<metadata> - <h:link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages" /> - <h:link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script" /> -</metadata> -<h:script src="/resources/testharness.js"/> -<h:script src="/resources/testharnessreport.js"/> -<h:div id="script-placeholder"/> -<h:script src="resources/script-type-and-language-js.js"/> -<script>window.ran = false;</script> -<script type="javascript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript');</script> -<script type="javascript1.0">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.0');</script> -<script type="javascript1.1">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.1');</script> -<script type="javascript1.2">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.2');</script> -<script type="javascript1.3">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.3');</script> -<script type="javascript1.4">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.4');</script> -<script type="javascript1.5">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.5');</script> -<script type="javascript1.6">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.6');</script> -<script type="javascript1.7">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.7');</script> -<script type="livescript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=livescript');</script> -<script type="ecmascript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=ecmascript');</script> -<script type="jscript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=jscript');</script> -</svg> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-xhtml.xhtml b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-xhtml.xhtml deleted file mode 100644 index 0bfdfce3c4b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js-xhtml.xhtml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title>Script @type and @language: JavaScript types</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com" /> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages" /> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script" /> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<div id="script-placeholder"/> -<script src="resources/script-type-and-language-js.js"></script> - -<script>ran = false;</script> -<script type="javascript">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript');</script> -<script type="javascript1.0">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.0');</script> -<script type="javascript1.1">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.1');</script> -<script type="javascript1.2">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.2');</script> -<script type="javascript1.3">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.3');</script> -<script type="javascript1.4">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.4');</script> -<script type="javascript1.5">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.5');</script> -<script type="javascript1.6">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.6');</script> -<script type="javascript1.7">ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.7');</script> -<script type="livescript">ran = true;</script> -<script>testParserInsertedDidNotRun('type=livescript');</script> -<script type="ecmascript">ran = true;</script> -<script>testParserInsertedDidNotRun('type=ecmascript');</script> -<script type="jscript">ran = true;</script> -<script>testParserInsertedDidNotRun('type=jscript');</script> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js.html deleted file mode 100644 index 009123de2b5..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-js.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<title>Script @type and @language: JavaScript types</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id="script-placeholder"></div> -<script src="resources/script-type-and-language-js.js"></script> - -<script>window.ran = false;</script> -<script type="javascript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript');</script> -<script type="javascript1.0">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.0');</script> -<script type="javascript1.1">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.1');</script> -<script type="javascript1.2">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.2');</script> -<script type="javascript1.3">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.3');</script> -<script type="javascript1.4">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.4');</script> -<script type="javascript1.5">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.5');</script> -<script type="javascript1.6">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.6');</script> -<script type="javascript1.7">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=javascript1.7');</script> -<script type="livescript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=livescript');</script> -<script type="ecmascript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=ecmascript');</script> -<script type="jscript">window.ran = true;</script> -<script>testParserInsertedDidNotRun('type=jscript');</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html deleted file mode 100644 index 977ee7d0a48..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html +++ /dev/null @@ -1,41 +0,0 @@ -<!DOCTYPE html> -<title>Script @type and @language: unknown type parameters</title> -<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages"> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<!-- Setup --> -<script> -window.run1 = window.run2 = window.run3 = false; -</script> - -<!-- Systems under test --> -<script type="text/javascript;charset=UTF-8"> -window.run1 = true; -</script> - -<script type="text/javascript;x-test=abc"> -window.run2 = true; -</script> - -<script language="javascript" type="text/javascript;charset=UTF-8"> -window.run3 = true; -</script> - -<!-- Asserts --> -<script> -test(() => { - assert_false(window.run1); -}, "A script with a charset param in its type should not run"); - -test(() => { - assert_false(window.run2); -}, "A script with an x-test param in its type should not run"); - -test(() => { - assert_false(window.run3); -}, "A script with a charset param in its type should not run, even with language=javascript"); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html deleted file mode 100644 index 5e8acb1a17b..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html +++ /dev/null @@ -1,27 +0,0 @@ -<!doctype html> -<title><script type> non-ASCII whitespace handling</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script> -function testParserInsertedDidNotRun(description) { - test(() => assert_false(window.ran), - "Script shouldn't run with " + description + " (parser-inserted)"); - window.ran = false; -} -</script> - -<script>window.ran = false;</script> -<script type="text/javascript">window.ran = true;</script> -<script>testParserInsertedDidNotRun("type=\"text/javascript\"");</script> - -<script type="text/javascript…">window.ran = true;</script> -<script>testParserInsertedDidNotRun("type=\"text/javascript…\"");</script> - -<script type="text/javascript ">window.ran = true;</script> -<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> - -<script type="text/javascript ">window.ran = true;</script> -<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> - -<script type="text/javascript ">window.ran = true;</script> -<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/scripting-enabled.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/scripting-enabled.html deleted file mode 100644 index a2671a78f69..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/scripting-enabled.html +++ /dev/null @@ -1,16 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>JS is disabled on documents created without a browsing context</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-n-script"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -test(function(t) { - var doc = document.implementation.createHTMLDocument(); - window.fail_test = t.unreached_func('should not have been called'); - - var script = doc.createElement('script'); - script.textContent = 'fail_test();'; - doc.documentElement.appendChild(script); -}, 'script on document returned by createHTMLDocument should not execute'); -</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-json-then-js.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-json-then-js.py deleted file mode 100644 index 9610734d444..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-json-then-js.py +++ /dev/null @@ -1,21 +0,0 @@ -# Respond with valid JSON to the first request with the given key, -# and with valid JavaScript to the second. Used for testing scenarios where -# the same request URL results in different responses on subsequent requests. -def main(request, response): - try: - stash_key = request.GET.first(b"key") - - run_count = request.server.stash.take(stash_key) - if not run_count: - run_count = 0 - - if run_count == 0: - response.headers.set(b"Content-Type", b"text/json") - response.content = '{"hello": "world"}' - else: - response.headers.set(b"Content-Type", b"application/javascript") - response.content = "export default 'hello';" - - request.server.stash.put(stash_key, run_count + 1) - except: - response.set_error(400, u"Not enough parameters") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-with-content-type.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-with-content-type.py deleted file mode 100644 index 675b3fc3eb0..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-with-content-type.py +++ /dev/null @@ -1,17 +0,0 @@ -import os - -from wptserve.utils import isomorphic_decode - -def main(request, response): - directory = os.path.dirname(isomorphic_decode(__file__)) - - try: - file_name = request.GET.first(b"fn") - content_type = request.GET.first(b"ct") - with open(os.path.join(directory, isomorphic_decode(file_name)), u"rb") as fh: - content = fh.read() - - response.headers.set(b"Content-Type", content_type) - response.content = content - except: - response.set_error(400, u"Not enough parameters or file not found") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-1-helper.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-1-helper.html deleted file mode 100644 index d9b0c84ca4f..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-1-helper.html +++ /dev/null @@ -1,2 +0,0 @@ -Some <script src="nosuchscripthere.js" - onerror="document.write('text'); parent.writeDone(document.documentElement.textContent)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-2-helper.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-2-helper.html deleted file mode 100644 index a9ee80026aa..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-2-helper.html +++ /dev/null @@ -1,2 +0,0 @@ -Some <script src="http://this is not parseable:-80/" - onerror="document.write('text'); document.close(); parent.writeDone(document.documentElement.textContent)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.html deleted file mode 100644 index f0236b4fbb3..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.html +++ /dev/null @@ -1,2 +0,0 @@ -Some <script src="script-onload-insertion-point-helper.js" - onload="document.write('xt'); parent.writeDone(document.documentElement.textContent)"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.js deleted file mode 100644 index 8a96a0b783e..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.js +++ /dev/null @@ -1 +0,0 @@ -document.write("te"); |