Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Document / document-current-script-async.html
bloba0a01500dff6ac80110a57abdfdba65aa1ac3851
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
5 jsTestIsAsync = true;
7 description('Test usage of document.currentScript with async')
9 var seenIds = [];
11 function logCurrentScript(id) {
12 // Don't print anything if pass since the execution order of script[async]
13 // is non deterministic.
14 if (id !== document.currentScript.id)
15 shouldBeEqualToString('document.currentScript.id', id);
17 seenIds.push(document.currentScript.id);
18 seenIds.sort();
19 if (seenIds.join('') === expectedIds)
20 finishJSTest();
23 var expectedIds = 'abcdef';
25 </script>
26 <script id="a">
27 logCurrentScript('a');
28 </script>
29 <script id="b" async src="resources/log-current-script-b.js"></script>
30 <script id="c">
31 logCurrentScript('c');
32 </script>
33 <script id="d" async src="resources/log-current-script-d.js"></script>
35 <script id="e">
36 logCurrentScript('e');
38 var script = document.createElement('script');
39 script.id = 'f'
40 script.async = true;
41 script.defer = false;
42 script.src = 'resources/log-current-script-f.js';
43 document.head.appendChild(script);
44 </script>
46 </body>
47 </html>