Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.html

Issue 1292863003: update-w3c-deps import using blink e60a8575c2fa4bc64b804926b956b695a3ac158e: (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tkent review Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <meta charset=utf-8>
3 <title>Document.currentScript</title>
4 <link rel=help href="https://html.spec.whatwg.org/multipage/#dom-document-curren tscript">
5 <link rel=help href="https://html.spec.whatwg.org/multipage/#execute-the-script- block">
6 <script src="../../../../../../resources/testharness.js"></script>
7 <script src="../../../../../../resources/testharnessreport.js"></script>
8 <div id="log"></div>
9 <script>
10 var expected = [
11 "parse-inline",
12 "parse-ext",
13 "dom-inline",
14 "dom-ext",
15 ];
16 var tests = {};
17 expected.forEach(function(id) {
18 tests[id] = async_test("Script " + id);
19 });
20 function verifyScript(id) {
21 tests[id].step(function() {
22 assert_equals(document.currentScript, document.getElementById(id));
23 this.done();
24 });
25 }
26 </script>
27
28 <!-- Test parser inserted scripts -->
29 <script id="parse-inline">
30 verifyScript("parse-inline");
31 </script>
32 <script id="parse-ext" src="data:text/plain,verifyScript('parse-ext');"></script >
33
34 <!-- Test DOM inserted scripts -->
35 <script>
36 var s = document.createElement("script");
37 s.textContent = "verifyScript('dom-inline');";
38 s.id = "dom-inline";
39 document.body.appendChild(s);
40
41 s = document.createElement("script");
42 s.src = "data:text/plain,verifyScript('dom-ext');";
43 s.id = "dom-ext";
44 document.body.appendChild(s);
45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698