summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/old-tests/submission/Opera
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/old-tests/submission/Opera')
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/001.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/002.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/003.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/004.html25
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/005.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/006.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/007.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/008.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/009.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/010.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/011.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/012.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/013.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/014.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015a.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/016.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/017.html33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/018.html35
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/019.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/020.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/021.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/022.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/023.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/024.html32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/025.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/026.html33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/027.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/028.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/029.html37
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/030.html39
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/031.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/032.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/033.html35
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/034.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/035.html35
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/036.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/037.html33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/038.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/039.html36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/040.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/041.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/042.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/043.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/044.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/045.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/046.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/047.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/048.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/049.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/050.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/051.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/052.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/053.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/054.html33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/055.html32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/056.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/057.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/058.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/059.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/060.html32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/061.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/062.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/063.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/064.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/065.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/066.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/067.html38
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/068.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/069.html33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/070.html48
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/071.html55
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/072.html50
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/073.html52
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/074.html49
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/075.html42
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/076.html32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/077.html41
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/078.html43
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/079.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/080.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/081.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/082.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/083.html48
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/084.html47
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/085.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/086.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/087.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/088.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/089.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/090.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/091.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/092.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/094.html23
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/095.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/096.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/097.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/098.html25
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/099.html19
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/100.html19
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/101.html35
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/102.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/103.html39
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/104.html39
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/105.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-import.html20
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-noimport.html20
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-import.html21
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-noimport.html21
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/108.html25
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/109.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/110.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/112.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/113.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/114.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/115.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/116.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/117.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/118.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/119.html32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/120.html17
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/121.html17
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/122.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/123.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/124.html25
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/125.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/126.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/127.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/128.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/129.html40
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/130.html34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/131.html22
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/132.html22
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/133.html29
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/134.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/135.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/136.html33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/137.html21
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/138.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/139.html30
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/140.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/141.html26
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/142.html27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/143.html31
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/144.html28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/145.html24
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/146.html22
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/147.html40
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/148.html40
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/149.html59
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/background.css1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/import.css1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld-postMessage.html19
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld.html15
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/count-script-tags.js1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-body.js2
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-foo.js2
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-1.js1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-10.js1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-11.js4
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-12.js4
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-2.js1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-3.js3
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-4.js3
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-5.js7
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-6.js6
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-7.js1
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-8.js4
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-9.js2
-rw-r--r--testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/testlib/testlib.js43
171 files changed, 4725 insertions, 0 deletions
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/001.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/001.html
new file mode 100644
index 000000000..665019ed0
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/001.html
@@ -0,0 +1,27 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/002.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/002.html
new file mode 100644
index 000000000..dcaa163ea
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/002.html
@@ -0,0 +1,27 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/003.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/003.html
new file mode 100644
index 000000000..053dd6aca
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/003.html
@@ -0,0 +1,27 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/004.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/004.html
new file mode 100644
index 000000000..838c2feb7
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/004.html
@@ -0,0 +1,25 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/005.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/005.html
new file mode 100644
index 000000000..b0411284a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/005.html
@@ -0,0 +1,27 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/006.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/006.html
new file mode 100644
index 000000000..3f40ef1c1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/006.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/007.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/007.html
new file mode 100644
index 000000000..ee99bc36e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/007.html
@@ -0,0 +1,27 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/008.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/008.html
new file mode 100644
index 000000000..9f6b3876e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/008.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/009.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/009.html
new file mode 100644
index 000000000..fc62b9d2b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/009.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/010.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/010.html
new file mode 100644
index 000000000..9c5fd849b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/010.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/011.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/011.html
new file mode 100644
index 000000000..7bc10995d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/011.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/012.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/012.html
new file mode 100644
index 000000000..41c3d066d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/012.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/013.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/013.html
new file mode 100644
index 000000000..a3a9b8255
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/013.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/014.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/014.html
new file mode 100644
index 000000000..eae7076ac
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/014.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015.html
new file mode 100644
index 000000000..88c28a8bc
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015a.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015a.html
new file mode 100644
index 000000000..05113feb7
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/015a.html
@@ -0,0 +1,30 @@
+<!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?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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/016.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/016.html
new file mode 100644
index 000000000..739560021
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/016.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/017.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/017.html
new file mode 100644
index 000000000..78a0f7b1a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/017.html
@@ -0,0 +1,33 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/018.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/018.html
new file mode 100644
index 000000000..793343c43
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/018.html
@@ -0,0 +1,35 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/019.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/019.html
new file mode 100644
index 000000000..30fa63432
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/019.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/020.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/020.html
new file mode 100644
index 000000000..abbfbf7db
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/020.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/021.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/021.html
new file mode 100644
index 000000000..92b5f0641
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/021.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/022.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/022.html
new file mode 100644
index 000000000..f56b43171
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/022.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/023.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/023.html
new file mode 100644
index 000000000..dc687ffe4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/023.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/024.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/024.html
new file mode 100644
index 000000000..37146f846
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/024.html
@@ -0,0 +1,32 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/025.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/025.html
new file mode 100644
index 000000000..182be3aef
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/025.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/026.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/026.html
new file mode 100644
index 000000000..70fac7c7f
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/026.html
@@ -0,0 +1,33 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/027.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/027.html
new file mode 100644
index 000000000..d3181d587
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/027.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/028.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/028.html
new file mode 100644
index 000000000..5d0207d85
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/028.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/029.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/029.html
new file mode 100644
index 000000000..b3beeaef3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/029.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: javascript: URL in HREF</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')"></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()
+
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/030.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/030.html
new file mode 100644
index 000000000..9c83b9a26
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/030.html
@@ -0,0 +1,39 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/031.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/031.html
new file mode 100644
index 000000000..166dda475
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/031.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/032.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/032.html
new file mode 100644
index 000000000..a012ab29e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/032.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/033.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/033.html
new file mode 100644
index 000000000..035bf0a23
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/033.html
@@ -0,0 +1,35 @@
+<!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> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/034.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/034.html
new file mode 100644
index 000000000..8dcb4294d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/034.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/035.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/035.html
new file mode 100644
index 000000000..540439e7e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/035.html
@@ -0,0 +1,35 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/036.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/036.html
new file mode 100644
index 000000000..0eb4a6eb3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/036.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/037.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/037.html
new file mode 100644
index 000000000..aff995b47
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/037.html
@@ -0,0 +1,33 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/038.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/038.html
new file mode 100644
index 000000000..3bbfe4604
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/038.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/039.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/039.html
new file mode 100644
index 000000000..a0abdf161
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/039.html
@@ -0,0 +1,36 @@
+<!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' );
+ var t = async_test()
+
+ function test() {
+ assert_any(assert_array_equals, eventOrder, [
+ ['inline script #1', 'end script #1', 'inline script #2', 'frame/popup script 0', 'frame/popup script 1'],
+ ['inline script #1', 'end script #1', 'inline script #2', 'frame/popup script 1', 'frame/popup script 0']]);
+ t.done();
+ }
+ onload = t.step_func(function() {
+ setTimeout(t.step_func(test), 200);
+ });
+ </script>
+
+</body></html>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/040.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/040.html
new file mode 100644
index 000000000..984bc6689
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/040.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/041.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/041.html
new file mode 100644
index 000000000..c2a0b9bc4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/041.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/042.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/042.html
new file mode 100644
index 000000000..e91ea116c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/042.html
@@ -0,0 +1,29 @@
+<!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> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/043.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/043.html
new file mode 100644
index 000000000..082ca618b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/043.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/044.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/044.html
new file mode 100644
index 000000000..a0e1c03b0
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/044.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/045.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/045.html
new file mode 100644
index 000000000..70520d06c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/045.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/046.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/046.html
new file mode 100644
index 000000000..1598234e1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/046.html
@@ -0,0 +1,27 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/047.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/047.html
new file mode 100644
index 000000000..ab758d2f5
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/047.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/048.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/048.html
new file mode 100644
index 000000000..ceb18cae5
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/048.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/049.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/049.html
new file mode 100644
index 000000000..65705bc1f
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/049.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/050.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/050.html
new file mode 100644
index 000000000..c9e990206
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/050.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: adding external script that removes all scripts from 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');
+ 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() {
+ assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'include-5 before removing scripts', 'include-5 after removing scripts', 'external script #1', 'external script #2']),
+ t.done();
+ }
+ onload = t.step_func(test)
+ </script>
+
+</body></html>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/051.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/051.html
new file mode 100644
index 000000000..e97c153b1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/051.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/052.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/052.html
new file mode 100644
index 000000000..1147be247
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/052.html
@@ -0,0 +1,26 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/053.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/053.html
new file mode 100644
index 000000000..12ac6101a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/053.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/054.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/054.html
new file mode 100644
index 000000000..3dc466435
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/054.html
@@ -0,0 +1,33 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/055.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/055.html
new file mode 100644
index 000000000..8916d1a8b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/055.html
@@ -0,0 +1,32 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/056.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/056.html
new file mode 100644
index 000000000..873fb34d3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/056.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/057.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/057.html
new file mode 100644
index 000000000..dbec8895f
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/057.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/058.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/058.html
new file mode 100644
index 000000000..730ba456f
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/058.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/059.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/059.html
new file mode 100644
index 000000000..a3ea560c4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/059.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/060.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/060.html
new file mode 100644
index 000000000..669dd2a74
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/060.html
@@ -0,0 +1,32 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/061.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/061.html
new file mode 100644
index 000000000..df708b7bf
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/061.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/062.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/062.html
new file mode 100644
index 000000000..8eda26b71
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/062.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/063.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/063.html
new file mode 100644
index 000000000..9b939c4d4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/063.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/064.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/064.html
new file mode 100644
index 000000000..814e62545
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/064.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/065.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/065.html
new file mode 100644
index 000000000..92078df04
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/065.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/066.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/066.html
new file mode 100644
index 000000000..58560aee0
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/066.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/067.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/067.html
new file mode 100644
index 000000000..7be0fd0ab
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/067.html
@@ -0,0 +1,38 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/068.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/068.html
new file mode 100644
index 000000000..c584653c8
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/068.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/069.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/069.html
new file mode 100644
index 000000000..4d4aed265
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/069.html
@@ -0,0 +1,33 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/070.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/070.html
new file mode 100644
index 000000000..45928b873
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/070.html
@@ -0,0 +1,48 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/071.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/071.html
new file mode 100644
index 000000000..304297494
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/071.html
@@ -0,0 +1,55 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/072.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/072.html
new file mode 100644
index 000000000..348381df2
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/072.html
@@ -0,0 +1,50 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/073.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/073.html
new file mode 100644
index 000000000..56dc9180b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/073.html
@@ -0,0 +1,52 @@
+<!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> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/074.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/074.html
new file mode 100644
index 000000000..6f1baef6b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/074.html
@@ -0,0 +1,49 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/075.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/075.html
new file mode 100644
index 000000000..40ec9bbb6
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/075.html
@@ -0,0 +1,42 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/076.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/076.html
new file mode 100644
index 000000000..ad2359019
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/076.html
@@ -0,0 +1,32 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/077.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/077.html
new file mode 100644
index 000000000..a7a594212
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/077.html
@@ -0,0 +1,41 @@
+<!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 #1 ran")');
+ var script2 = createScript('','log("Script #2 ran")');
+ if(script2) {
+ head.removeChild(script2);
+ }
+ var script3 = createScript('data:text\/javascript, log("Script #3 ran"); createScript(\'\', \'log("Script #4 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/078.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/078.html
new file mode 100644
index 000000000..556006a24
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/078.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title> adding several types of scripts through the DOM and removing some of them confuses scheduler (slow-loading scripts) </title>
+ <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(undefined, {timeout:10000})
+
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/079.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/079.html
new file mode 100644
index 000000000..8d684cebf
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/079.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/080.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/080.html
new file mode 100644
index 000000000..a55bc24d0
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/080.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html><head>
+ <title>scheduler: IFRAMEs added with DOM (appendChild), 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');
+ var iframe=document.createElement('iframe');
+ iframe.src='javascript:parent.log(\'JS URL\');\'<html><script>parent.log(\\\'frame script\\\')<\/script></html>\'';
+ document.getElementsByTagName('div')[1].appendChild(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', 'JS URL', 'frame script']);
+ t.done();
+ }
+ onload = t.step_func(function(){setTimeout(t.step_func(test), 400);})
+ </script>
+
+</body></html>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/081.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/081.html
new file mode 100644
index 000000000..94f2be6dd
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/081.html
@@ -0,0 +1,31 @@
+<!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(undefined, {timeout:5000})
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/082.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/082.html
new file mode 100644
index 000000000..89f86d4d4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/082.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: multiple slow loading external scripts 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>
+
+ 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(undefined, {timeout:10000})
+
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/083.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/083.html
new file mode 100644
index 000000000..b307041f8
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/083.html
@@ -0,0 +1,48 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/084.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/084.html
new file mode 100644
index 000000000..5e9adb07d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/084.html
@@ -0,0 +1,47 @@
+<!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> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/085.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/085.html
new file mode 100644
index 000000000..e0d165ffc
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/085.html
@@ -0,0 +1,24 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/086.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/086.html
new file mode 100644
index 000000000..86db3aea5
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/086.html
@@ -0,0 +1,24 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/087.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/087.html
new file mode 100644
index 000000000..759335474
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/087.html
@@ -0,0 +1,24 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/088.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/088.html
new file mode 100644
index 000000000..f7e7366e1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/088.html
@@ -0,0 +1,24 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/089.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/089.html
new file mode 100644
index 000000000..1b888ea3d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/089.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/090.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/090.html
new file mode 100644
index 000000000..224e79763
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/090.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/091.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/091.html
new file mode 100644
index 000000000..946cf8333
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/091.html
@@ -0,0 +1,31 @@
+<!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(undefined, {timeout:4000});
+
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/092.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/092.html
new file mode 100644
index 000000000..d42caa7c0
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/092.html
@@ -0,0 +1,26 @@
+<!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(undefined, {timeout:3500});
+
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/094.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/094.html
new file mode 100644
index 000000000..44fd7b559
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/094.html
@@ -0,0 +1,23 @@
+<!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(undefined, {timeout:3500});
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/095.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/095.html
new file mode 100644
index 000000000..13142ef6c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/095.html
@@ -0,0 +1,24 @@
+<!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(undefined, {timeout:3500});
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/096.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/096.html
new file mode 100644
index 000000000..d5e1e8b46
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/096.html
@@ -0,0 +1,24 @@
+<!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"])}), 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/097.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/097.html
new file mode 100644
index 000000000..083fd390a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/097.html
@@ -0,0 +1,29 @@
+<!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(undefined, {timeout:3500});
+
+ 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/098.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/098.html
new file mode 100644
index 000000000..2d421a8a3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/098.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: defer 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 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"])}), 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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/099.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/099.html
new file mode 100644
index 000000000..5c6df576e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/099.html
@@ -0,0 +1,19 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/100.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/100.html
new file mode 100644
index 000000000..d24828c99
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/100.html
@@ -0,0 +1,19 @@
+<!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-12.js"></script>
+ <script>
+ var t = async_test();
+
+ onload = t.step_func(function() {assert_array_equals(eventOrder, ["external script before adding object", "script in object"]); t.done();});
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/101.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/101.html
new file mode 100644
index 000000000..b868f9a44
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/101.html
@@ -0,0 +1,35 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/102.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/102.html
new file mode 100644
index 000000000..67edbc659
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/102.html
@@ -0,0 +1,24 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/103.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/103.html
new file mode 100644
index 000000000..198c394de
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/103.html
@@ -0,0 +1,39 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/104.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/104.html
new file mode 100644
index 000000000..b5cdb75e3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/104.html
@@ -0,0 +1,39 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/105.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/105.html
new file mode 100644
index 000000000..abf2c8c21
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/105.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-import.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-import.html
new file mode 100644
index 000000000..db7abcc88
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-import.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: stylesheets 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="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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-noimport.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-noimport.html
new file mode 100644
index 000000000..8e099c580
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-noimport.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: stylesheets 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="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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-import.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-import.html
new file mode 100644
index 000000000..0b572b072
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-import.html
@@ -0,0 +1,21 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-noimport.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-noimport.html
new file mode 100644
index 000000000..ce57d1f1c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-noimport.html
@@ -0,0 +1,21 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/108.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/108.html
new file mode 100644
index 000000000..732fcfa9c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/108.html
@@ -0,0 +1,25 @@
+<!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(&quot;iframe script #1&quot;));'></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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/109.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/109.html
new file mode 100644
index 000000000..c6815b4dc
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/109.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/110.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/110.html
new file mode 100644
index 000000000..de0c5050c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/110.html
@@ -0,0 +1,30 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html
new file mode 100644
index 000000000..144633c57
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: removing 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="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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/112.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/112.html
new file mode 100644
index 000000000..76c0a1550
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/112.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html><head>
+ <title> scheduler: removing async attribute at runtime, script also has defer attribute</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="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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/113.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/113.html
new file mode 100644
index 000000000..c857c6a97
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/113.html
@@ -0,0 +1,31 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/114.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/114.html
new file mode 100644
index 000000000..784a69f51
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/114.html
@@ -0,0 +1,26 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/115.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/115.html
new file mode 100644
index 000000000..78790c2ef
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/115.html
@@ -0,0 +1,26 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/116.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/116.html
new file mode 100644
index 000000000..fef7b8938
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/116.html
@@ -0,0 +1,24 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/117.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/117.html
new file mode 100644
index 000000000..3868a292a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/117.html
@@ -0,0 +1,26 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/118.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/118.html
new file mode 100644
index 000000000..f018001db
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/118.html
@@ -0,0 +1,26 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/119.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/119.html
new file mode 100644
index 000000000..af74c3d40
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/119.html
@@ -0,0 +1,32 @@
+<!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>
+ <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']);
+ t.done();
+ }));
+
+ addEventListener("load", t.step_func(function() {
+ assert_array_equals(eventOrder, ['inline script #1', 'end inline script #1', 'external script #1']);
+ t.done();
+ }));
+
+
+ log('end inline script #1');
+ </script>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/120.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/120.html
new file mode 100644
index 000000000..d6af5d02e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/120.html
@@ -0,0 +1,17 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/121.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/121.html
new file mode 100644
index 000000000..534532ad1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/121.html
@@ -0,0 +1,17 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/122.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/122.html
new file mode 100644
index 000000000..888681d2a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/122.html
@@ -0,0 +1,28 @@
+<!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(undefined, {timeout:4000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/123.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/123.html
new file mode 100644
index 000000000..375ae1316
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/123.html
@@ -0,0 +1,28 @@
+<!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(undefined, {timeout:4000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/124.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/124.html
new file mode 100644
index 000000000..86eef3f78
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/124.html
@@ -0,0 +1,25 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/125.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/125.html
new file mode 100644
index 000000000..6b50ca097
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/125.html
@@ -0,0 +1,28 @@
+<!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(undefined, {timeout:4000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/126.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/126.html
new file mode 100644
index 000000000..5d258b59d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/126.html
@@ -0,0 +1,29 @@
+<!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(undefined, {timeout:4000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/127.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/127.html
new file mode 100644
index 000000000..efb0fe377
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/127.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/128.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/128.html
new file mode 100644
index 000000000..a21fd8b4b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/128.html
@@ -0,0 +1,34 @@
+<!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 #2", "inline script #3", "end inline script #2", "end inline script #1"]);
+ t.done();
+});
+</script>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/129.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/129.html
new file mode 100644
index 000000000..1148d9fae
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/129.html
@@ -0,0 +1,40 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/130.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/130.html
new file mode 100644
index 000000000..af60e3cf4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/130.html
@@ -0,0 +1,34 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/131.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/131.html
new file mode 100644
index 000000000..f7f14178b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/131.html
@@ -0,0 +1,22 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/132.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/132.html
new file mode 100644
index 000000000..9a675be55
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/132.html
@@ -0,0 +1,22 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/133.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/133.html
new file mode 100644
index 000000000..daecb3628
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/133.html
@@ -0,0 +1,29 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/134.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/134.html
new file mode 100644
index 000000000..14cd5d0d3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/134.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/135.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/135.html
new file mode 100644
index 000000000..15ee85982
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/135.html
@@ -0,0 +1,28 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/136.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/136.html
new file mode 100644
index 000000000..4a47e8527
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/136.html
@@ -0,0 +1,33 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/137.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/137.html
new file mode 100644
index 000000000..c0e695462
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/137.html
@@ -0,0 +1,21 @@
+<!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(undefined, {timeout:3000});
+</script>
+<svg>
+<script xlink:href="">
+t.step(function() {assert_unreached()});
+</script>
+</svg>
+<script>
+onload = t.step_func(function() {
+ t.done();
+});
+</script>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/138.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/138.html
new file mode 100644
index 000000000..0eaad0765
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/138.html
@@ -0,0 +1,30 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/139.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/139.html
new file mode 100644
index 000000000..f1cbc158c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/139.html
@@ -0,0 +1,30 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/140.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/140.html
new file mode 100644
index 000000000..fbdd1c76e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/140.html
@@ -0,0 +1,24 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/141.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/141.html
new file mode 100644
index 000000000..a237373bb
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/141.html
@@ -0,0 +1,26 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/142.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/142.html
new file mode 100644
index 000000000..91f19f757
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/142.html
@@ -0,0 +1,27 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/143.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/143.html
new file mode 100644
index 000000000..9c0230d89
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/143.html
@@ -0,0 +1,31 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/144.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/144.html
new file mode 100644
index 000000000..96a1f4777
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/144.html
@@ -0,0 +1,28 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/145.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/145.html
new file mode 100644
index 000000000..655a2132b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/145.html
@@ -0,0 +1,24 @@
+<!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(undefined, {timeout:3000});
+</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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/146.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/146.html
new file mode 100644
index 000000000..c666a51a3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/146.html
@@ -0,0 +1,22 @@
+<!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() {
+ assert_array_equals(eventOrder, ["external script #1"]);
+ t.done();
+});
+</script>
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/147.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/147.html
new file mode 100644
index 000000000..0542380ff
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/147.html
@@ -0,0 +1,40 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/148.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/148.html
new file mode 100644
index 000000000..72a914380
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/148.html
@@ -0,0 +1,40 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/149.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/149.html
new file mode 100644
index 000000000..6fe9b68ba
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/149.html
@@ -0,0 +1,59 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/background.css b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/background.css
new file mode 100644
index 000000000..86a155b81
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/background.css
@@ -0,0 +1 @@
+#test {position:fixed} \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/import.css b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/import.css
new file mode 100644
index 000000000..d1664c29a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/import.css
@@ -0,0 +1 @@
+@import url("background.css") \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld-postMessage.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld-postMessage.html
new file mode 100644
index 000000000..cae2797a4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld-postMessage.html
@@ -0,0 +1,19 @@
+<!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> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld.html
new file mode 100644
index 000000000..30d5c5fda
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/pages/helloworld.html
@@ -0,0 +1,15 @@
+<!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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/count-script-tags.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/count-script-tags.js
new file mode 100644
index 000000000..8fba4ecb3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/count-script-tags.js
@@ -0,0 +1 @@
+log('script tags in DOM: '+document.getElementsByTagName('script').length); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-body.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-body.js
new file mode 100644
index 000000000..22e1050ff
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-body.js
@@ -0,0 +1,2 @@
+log('document.body: '+(document.body?'<BODY>':null));
+var findBodyLoaded=true; \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-foo.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-foo.js
new file mode 100644
index 000000000..52d0ec91c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-foo.js
@@ -0,0 +1,2 @@
+log('found #foo element: ' + ( document.getElementById('foo') ? 'YES' : 'NO' ));
+var findFooLoaded=true; \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-1.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-1.js
new file mode 100644
index 000000000..8ff291ad5
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-1.js
@@ -0,0 +1 @@
+log('external script #1'); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-10.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-10.js
new file mode 100644
index 000000000..8dc770ddc
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-10.js
@@ -0,0 +1 @@
+document.write("<script src='scripts/include-9.js?pipe=trickle(d2)' defer></script>");
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-11.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-11.js
new file mode 100644
index 000000000..a822dd8ba
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-11.js
@@ -0,0 +1,4 @@
+log("external script before adding iframe");
+var iframe = document.createElement("iframe");
+iframe.src = "data:text/html,<script>parent.log('script in iframe')</script>"
+document.body.appendChild(iframe); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-12.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-12.js
new file mode 100644
index 000000000..7ced0fb42
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-12.js
@@ -0,0 +1,4 @@
+log("external script before adding object");
+var object = document.createElement("object");
+object.data = "data:text/html,<script>parent.log('script in object')</script>"
+document.body.appendChild(object); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-2.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-2.js
new file mode 100644
index 000000000..31319423a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-2.js
@@ -0,0 +1 @@
+log('external script #2'); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-3.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-3.js
new file mode 100644
index 000000000..53352e0f8
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-3.js
@@ -0,0 +1,3 @@
+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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-4.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-4.js
new file mode 100644
index 000000000..0597a2262
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-4.js
@@ -0,0 +1,3 @@
+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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-5.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-5.js
new file mode 100644
index 000000000..52952d737
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-5.js
@@ -0,0 +1,7 @@
+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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-6.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-6.js
new file mode 100644
index 000000000..77da2af23
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-6.js
@@ -0,0 +1,6 @@
+top.log(
+ 'external script (#foo found? ' +
+ (document.getElementById('foo') ? 'YES' : 'NO' ) +
+ ')'
+);
+top.include6Loaded=true; \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-7.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-7.js
new file mode 100644
index 000000000..57c550801
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-7.js
@@ -0,0 +1 @@
+log('external script #7'); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-8.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-8.js
new file mode 100644
index 000000000..960f2129f
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-8.js
@@ -0,0 +1,4 @@
+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/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-9.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-9.js
new file mode 100644
index 000000000..904288202
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-9.js
@@ -0,0 +1,2 @@
+log("external script #9");
+test(); \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/testlib/testlib.js b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/testlib/testlib.js
new file mode 100644
index 000000000..7b556b150
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/testlib/testlib.js
@@ -0,0 +1,43 @@
+/*
+* 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);
+ }
+})(); \ No newline at end of file