Skip to content

Commit

Permalink
Bug 1632040 [wpt PR 23162] - Test whether parse document check is don…
Browse files Browse the repository at this point in the history
…e in #prepare-a-script, a=testonly

Automatic update from web-platform-tests
Test whether parse document check is done in #prepare-a-script (#23162)

This PR adds empty-src tests, which moves <script src=""> elements
between Documents before #prepare-a-script. If the parser document
check is done in #prepare-a-script, the <script>'s error event is not fired,
and thus we can more-completely test whether the parser document check is done.

This PR also does some minor refactoring / documentation clean-up, as well as
adds a TODO to remove some of the tests once whatwg/html#2137
is closed and whatwg/html#5575 lands.

Co-authored-by: Dominic Farolino <[email protected]>
--

wpt-commits: eccee3ede4f1debb1ad5bd34e6122bcb2cadce48
wpt-pr: 23162
  • Loading branch information
hiroshige-g authored and moz-wptsync-bot committed Jun 1, 2020
1 parent d92a7e9 commit dc6374f
Show file tree
Hide file tree
Showing 55 changed files with 114 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!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>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!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>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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="author" href="mailto:[email protected]" title="Domenic Denicola">
<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>
Expand Down
Loading

0 comments on commit dc6374f

Please sign in to comment.