Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Update tests in web-platform-tests/html/semantics/scripting-1/
https://bugs.webkit.org/show_bug.cgi?id=157026 Reviewed by Darin Adler. Reimported tests under web-platform-tests/html/semantics/scripting-1/ as of d5a4c5b. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_001-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_001.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_002-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_002.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_003-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_003.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_004-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_004.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_005-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_005.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_006-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_006.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_007-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_007.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_008-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_008.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_009-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_009.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_010-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_010.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_011-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/async_011.htm: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-utf8.js: Added. (window.getSomeString): * web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-windows1250.js: Added. (window.getSomeString): * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/w3c-import.log: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/w3c-import.log: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/w3c-import.log: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-2.py: Added. (main): * web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-expected.txt: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html: Added. * web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.py: Added. (main): * web-platform-tests/html/semantics/scripting-1/the-script-element/serve-with-content-type.py: Added. (main): * web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/template-child-nodes.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/outerhtml.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/template-clone-children.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-document-type.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-001.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-002.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/innerhtml.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/resources/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/serializing-html-templates/outerhtml.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/serializing-html-templates/w3c-import.log: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/content-attribute.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-content-node-document.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-content.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-body.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-head.html: * web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/w3c-import.log: Canonical link: https://commits.webkit.org/175166@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
994 additions
and 61 deletions.
- +96 −0 LayoutTests/imported/w3c/ChangeLog
- +3 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_001-expected.txt
- +18 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_001.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_002-expected.txt
- +31 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_002.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_003-expected.txt
- +39 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_003.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_004-expected.txt
- +37 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_004.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_005-expected.txt
- +39 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_005.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_006-expected.txt
- +45 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_006.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_007-expected.txt
- +48 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_007.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_008-expected.txt
- +47 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_008.htm
- +3 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_009-expected.txt
- +25 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_009.htm
- +4 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_010-expected.txt
- +54 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_010.htm
- +3 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_011-expected.txt
- +19 −0 ...Tests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_011.htm
- +5 −0 ...rted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-utf8.js
- +5 −0 ...c/web-platform-tests/html/semantics/scripting-1/the-script-element/external-script-windows1250.js
- +3 −0 ...eb-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base-expected.txt
- +15 −0 ...ed/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html
- +1 −0 ...rted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js
- +19 −0 ...c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/w3c-import.log
- +1 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js
- +18 −0 ...3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/w3c-import.log
- +3 −0 ...w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-expected.txt
- +3 −0 ...atform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base-expected.txt
- +27 −0 ...c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html
- +32 −0 ...mported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html
- +4 −0 ...c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure-expected.txt
- +25 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html
- +1 −0 ...ted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js
- +21 −0 ...ted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/w3c-import.log
- +8 −0 ...c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt
- +89 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01.html
- +4 −0 ...c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02-expected.txt
- +40 −0 ...orted/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-02.html
- +4 −0 ...b-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-2.py
- +4 −0 ...rm-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed-expected.txt
- +19 −0 ...b-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.html
- +4 −0 ...web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-found-not-executed.py
- +15 −0 ...d/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/serve-with-content-type.py
- +22 −3 ...ests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log
- +1 −1 .../scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document-expected.txt
- +5 −3 ...emantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document.html
- +0 −1 ...s/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/template-child-nodes.html
- +3 −3 ...ml/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/w3c-import.log
- +0 −1 ...emantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/outerhtml.html
- +3 −3 ...emantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/w3c-import.log
- +3 −3 ...ntics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/w3c-import.log
- +0 −1 ...ipting-1/the-template-element/additions-to-the-steps-to-clone-a-node/template-clone-children.html
- +0 −1 ...-1/the-template-element/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner.html
- +3 −3 .../semantics/scripting-1/the-template-element/additions-to-the-steps-to-clone-a-node/w3c-import.log
- +0 −1 ...semantics/scripting-1/the-template-element/definitions/template-contents-owner-document-type.html
- +0 −1 ...html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-001.html
- +0 −1 ...html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-002.html
- +0 −1 ...platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents.html
- +3 −3 ...w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/w3c-import.log
- +0 −1 ...tform-tests/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/innerhtml.html
- +3 −3 ...tform-tests/html/semantics/scripting-1/the-template-element/innerhtml-on-templates/w3c-import.log
- +3 −3 ...d/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/resources/w3c-import.log
- +0 −1 ...m-tests/html/semantics/scripting-1/the-template-element/serializing-html-templates/outerhtml.html
- +3 −3 ...m-tests/html/semantics/scripting-1/the-template-element/serializing-html-templates/w3c-import.log
- +0 −1 ...orm-tests/html/semantics/scripting-1/the-template-element/template-element/content-attribute.html
- +0 −1 ...tests/html/semantics/scripting-1/the-template-element/template-element/node-document-changes.html
- +2 −2 ...semantics/scripting-1/the-template-element/template-element/template-as-a-descendant-expected.txt
- +28 −8 ...ts/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant.html
- +0 −1 ...l/semantics/scripting-1/the-template-element/template-element/template-content-node-document.html
- +0 −1 ...form-tests/html/semantics/scripting-1/the-template-element/template-element/template-content.html
- +0 −1 ...ts/html/semantics/scripting-1/the-template-element/template-element/template-descendant-body.html
- +0 −1 ...tml/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html
- +0 −1 ...ts/html/semantics/scripting-1/the-template-element/template-element/template-descendant-head.html
- +3 −3 ...eb-platform-tests/html/semantics/scripting-1/the-template-element/template-element/w3c-import.log
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,3 @@ | ||
|
||
PASS Async property on a dynamically-created script is true by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,18 @@ | ||
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,4 @@ | ||
|
||
PASS Test 'async' attribute are reflected in the async property with setAttribute | ||
PASS Test 'async' attribute are reflected in the async property with removeAttribute | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,31 @@ | ||
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,4 @@ | ||
21 | ||
|
||
PASS An async script does not block the parser while downloading | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>An async script does not block the parser while downloading</title> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,4 @@ | ||
21 | ||
|
||
PASS async script executes as soon as possible after a download is complete | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>An async script executes as soon as possible after a download is complete</title> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,4 @@ | ||
2134 | ||
|
||
PASS A script element with both async and defer set should execute asynchronously | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>A script element with both async and defer set should execute asynchronously</title> | ||
<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(){ assert_equals(document.getElementById("testresult").innerHTML, "2134")}); | ||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,4 @@ | ||
321 | ||
|
||
PASS dynamically created external script executes asynchronously | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>A dynamically created external script executes asynchronously</title> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,4 @@ | ||
312 | ||
|
||
PASS Ordered async script execution when script.async == false | ||
|
Oops, something went wrong.