diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/old-tests/submission | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/old-tests/submission')
323 files changed, 10757 insertions, 0 deletions
diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_autocomplete.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_autocomplete.html new file mode 100644 index 000000000..531cb374f --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_autocomplete.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_autocomplete</h3> + </p> + + <li>input text in textbox and press enter key.</li> + <li>When you input same text, you can see hint text.</li> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type='text' id='input_text'></p> + </form> + + <script> + + var input_text = document.getElementById("input_text"); + input_text.autocomplete = 'on'; + + if (typeof(input_text.autocomplete) == "string") { + if (input_text.autocomplete != "on") { + test(function() { + assert_true(false, "autocomplete attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("autocomplete attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_list.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_list.html new file mode 100644 index 000000000..0056839db --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_list.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_list</h3> + </p> + <li>List is showed list when click the input control.</li> + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='text' id='input_url' list="urls"></p> + <datalist id="urls"> + <option value="http://www.google.com/" label="Google"> + <option value="http://www.reddit.com/" label="Reddit"> + </datalist> + </form> + + <script> + + var input_url = document.getElementById("input_url"); + var ele = input_url.list; + + if (typeof(ele) != "object") { + if (typeof(ele) == "null") { + test(function() { + assert_unreached("list attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("list attribute is not exist."); + }); + } + } + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasdate.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasdate.html new file mode 100644 index 000000000..c9002f042 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasdate.html @@ -0,0 +1,52 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_valueAsDate</h3> + </p> + <li>Date is showed in input when window is loaded.</li> + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='date' id='input_date'></p> + </form> + + <script> + + var input_date = document.getElementById("input_date"); + // Setting + try { + input_date.valueAsDate = new Date(); + } catch(e) { + test(function() { + assert_unreached("Failed to set valueAsDate attribute."); + }); + } + + // Getting + if (input_date.valueAsDate != null) { + if (typeof(input_date.valueAsDate) != "object") { + test(function() { + assert_true(false, "valueAsDate attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("Failed to get valueAsDate attribute."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasnumber.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasnumber.html new file mode 100644 index 000000000..6c24f1e4a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasnumber.html @@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_valueAsNumber</h3> + </p> + <li>Number 5 is showed in input when window is loaded.</li> + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='number' id='input_number'></p> + </form> + + <script> + + var input_number = document.getElementById("input_number"); + input_number.valueAsNumber = 5; + + if (typeof(input_number.valueAsNumber) == "number") { + if (input_number.value != 5) { + test(function() { + assert_true(false, "valueAsNumber attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("valueAsNumber attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_length.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_length.html new file mode 100644 index 000000000..6c0864a08 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_length.html @@ -0,0 +1,56 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>select_length</h3> + </p> + + <li>In select control there is only 3 items.</li> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p> + <label for="unittype">Select unit type:</label> + <select id="unittype" name="unittype"> + <option value="1"> Miner </option> + <option value="2"> Puffer </option> + <option value="3" selected> Snipey </option> + <option value="4"> Max </option> + <option value="5"> Firebot </option> + </select> + </p> + </form> + + <script> + + var select = document.getElementById("unittype"); + var length = select.length; + select.length = 3; + + if (typeof(length) == "number") { + if (length != 5) { + test(function() { + assert_true(false, "length attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("length attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_selectedindex.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_selectedindex.html new file mode 100644 index 000000000..99fb65a3c --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_selectedindex.html @@ -0,0 +1,50 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>select_selectedIndex</h3> + </p> + + <li>In select control second item is selected.</li> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p> + <label for="unittype">Select unit type:</label> + <select id="unittype" name="unittype"> + <option value="1"> Miner </option> + <option value="2"> Puffer </option> + <option value="3" selected> Snipey </option> + <option value="4"> Max </option> + <option value="5"> Firebot </option> + </select> + </p> + </form> + + <script> + + var select = document.getElementById("unittype"); + var selectedindex = select.selectedIndex; + + if (selectedindex != 2) { + test(function() { + assert_true(false, "selectedindex attribute is not correct."); + }); + } + + select.selectedIndex = 1; + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_checkvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_checkvalidity.html new file mode 100644 index 000000000..0d15e1083 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_checkvalidity.html @@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>button_checkValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><button id='button_id'>button</button></p> + </form> + <script> + + var button = document.getElementById("button_id"); + + try + { + var ret = button.checkValidity(); + + test(function() { + assert_equals(ret, true, "calling of checkValidity method is failed."); + }); + } + catch (e) { + test(function() { + assert_unreached("autofocus attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_labels.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_labels.html new file mode 100644 index 000000000..312fb7e81 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_labels.html @@ -0,0 +1,48 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>button_labels</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><label>Full name:<label>(name)<button id='button_id1'>button1</button><small>Format: First Last</small></label></label></p> + <p><label>Age: <button id='button_id2'>button2</button></label></p> + </form> + <script> + + var button1 = document.getElementById("button_id1"); + var button2 = document.getElementById("button_id2"); + + if (typeof(button1.labels) == "object") { + if (button1.labels.length == 2 && button2.labels.length == 1) { + test(function() { + assert_true(true, "labels attribute is correct."); + }); + } else { + test(function() { + assert_unreached("labels attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("labels attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_setcustomvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_setcustomvalidity.html new file mode 100644 index 000000000..6f012335f --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_setcustomvalidity.html @@ -0,0 +1,43 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>button_setCustomValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><button id='button_id'>button</button></p> + </form> + <script> + + var button = document.getElementById("button_id"); + + try + { + button.setCustomValidity("custom error"); + test(function() { + assert_true(true, "calling of setCustomValidity method is successed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validationmessage.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validationmessage.html new file mode 100644 index 000000000..44364aec5 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validationmessage.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>button_validationMessage</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><button id='button_id'>button</button></p> + </form> + <script> + + var button = document.getElementById("button_id"); + + if (typeof(button.validationMessage) == "string") { + test(function() { + assert_equals(button.validationMessage, "", "validationMessage attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("validationMessage attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validity.html new file mode 100644 index 000000000..00d022119 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validity.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>button_validity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><button id='button_id'>button</button></p> + </form> + <script> + + var button = document.getElementById("button_id"); + + if (typeof(button.validity) == "object") { + test(function() { + assert_equals(button.validity.valueMissing, false, "validity attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("validity attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_willvalidate.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_willvalidate.html new file mode 100644 index 000000000..067b38f89 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_willvalidate.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>button_willValidate</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><button id='button_id'>button</button></p> + </form> + <script> + + var button = document.getElementById("button_id"); + + if (typeof(button.willValidate) == "boolean") { + test(function() { + assert_equals(button.willValidate, true, "willValidate attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("willValidate attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_checkvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_checkvalidity.html new file mode 100644 index 000000000..ab4d9601f --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_checkvalidity.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>FieldSet_checkValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <fieldset id="input_field"> + </fieldset> + </form> + <script> + + var field = document.getElementById("input_field"); + + try + { + var ret = field.checkValidity(); + + test(function() { + assert_equals(ret, true, "calling of checkValidity method is failed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_setcustomvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_setcustomvalidity.html new file mode 100644 index 000000000..bca7d6f97 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_setcustomvalidity.html @@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>FieldSet_setCustomValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <fieldset id="input_field"> + </fieldset> + </form> + <script> + + var field = document.getElementById("input_field"); + + try + { + field.setCustomValidity("custom error"); + test(function() { + assert_true(true, "calling of setCustomValidity method is successed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validationmessage.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validationmessage.html new file mode 100644 index 000000000..8c3457d42 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validationmessage.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>FieldSet_validationMessage</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <fieldset id="input_field"> + </fieldset> + </form> + <script> + + var field = document.getElementById("input_field"); + + if (typeof(field.validationMessage) == "string") { + test(function() { + assert_equals(field.validationMessage, "", "validationMessage attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("validationMessage attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validity.html new file mode 100644 index 000000000..e0622bf38 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validity.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>FieldSet_validity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <fieldset id="input_field"> + </fieldset> + </form> + <script> + + var field = document.getElementById("input_field"); + + if (typeof(field.validity) == "object") { + test(function() { + assert_equals(field.validity.valueMissing, false, "validity attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("validity attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_willvalidate.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_willvalidate.html new file mode 100644 index 000000000..802968cd7 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_willvalidate.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>FieldSet_willValidate</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <fieldset id="input_field"> + </fieldset> + </form> + <script> + + var field = document.getElementById("input_field"); + + if (typeof(field.willValidate) == "boolean") { + test(function() { + assert_equals(field.willValidate, false, "willValidate attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("willValidate attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_action.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_action.html new file mode 100644 index 000000000..f925a62ff --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_action.html @@ -0,0 +1,43 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>Form_action</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="http://www.google.com/" + id="input_form"> + <p><input type=hidden name="custname"></p> + <p><input type=hidden name="custtel"></p> + <p><input type=hidden name="custemail"></p> + + </form> + <script> + + var form = document.getElementById("input_form"); + + if (typeof(form.action) == "string") { + test(function() { + assert_equals(form.action, "http://www.google.com/", "action attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("action attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_checkvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_checkvalidity.html new file mode 100644 index 000000000..83d53da0d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_checkvalidity.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>Form_checkValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type=hidden name="custname"></p> + <p><input type=hidden name="custtel"></p> + <p><input type=hidden name="custemail"></p> + + </form> + <script> + + var form = document.getElementById("input_form"); + + try + { + var ret = form.checkValidity(); + + test(function() { + assert_equals(ret, true, "calling of checkValidity method is failed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_length.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_length.html new file mode 100644 index 000000000..2fae73be1 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_length.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>Form_length</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type=hidden name="custname"></p> + <p><input type=hidden name="custtel"></p> + <p><input type=hidden name="custemail"></p> + + </form> + <script> + + var form = document.getElementById("input_form"); + var len = form.length; + + test(function() { + assert_equals(len, 3, "length attribute is not correct."); + }); + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_submit.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_submit.html new file mode 100644 index 000000000..788769049 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_submit.html @@ -0,0 +1,51 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>Form_submit</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="?x=1" + id="input_form"> + <p><input type=hidden name="custname"></p> + <p><input type=hidden name="custtel"></p> + <p><input type=hidden name="custemail"></p> + + </form> + <script> + + var form = document.getElementById("input_form"); + + try + { + var url = location.href; + pos = url.lastIndexOf("?x=1"); + if (pos == -1) { + form.submit(); + } else { + test(function() { + assert_true(true, "calling of submit method is successed."); + }); + } + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_checkvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_checkvalidity.html new file mode 100644 index 000000000..c46499638 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_checkvalidity.html @@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_checkValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type='hidden' id='input_text'></p> + </form> + <script> + + var input = document.getElementById("input_text"); + + try + { + var ret = input.checkValidity(); + + test(function() { + assert_equals(ret, true, "calling of checkValidity method is failed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_height.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_height.html new file mode 100644 index 000000000..edf362490 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_height.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_height</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='image' id='input_text'></p> + </form> + + <script> + + var input_text = document.getElementById("input_text"); + input_text.height = 30; + + if (typeof(input_text.height) == "number") { + test(function() { + assert_equals(input_text.height, 30, "formTarget attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("height attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_labels.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_labels.html new file mode 100644 index 000000000..b37b719e1 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_labels.html @@ -0,0 +1,49 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_labels</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><label>Full name:<label>(name)<input name=fn id='input_text1'> <small>Format: First Last</small></label></label></p> + <p><label>Age: <input name=age type=number min=0 id='input_text2'></label></p> + <p><label>Post code: <input name=pc> <small>Format: AB12 3CD</small></label></p> + </form> + <script> + + var input1 = document.getElementById("input_text1"); + var input2 = document.getElementById("input_text2"); + + if (typeof(input1.labels) == "object") { + if (input1.labels.length == 2 && input2.labels.length == 1) { + test(function() { + assert_true(true, "labels attribute is correct."); + }); + } else { + test(function() { + assert_unreached("labels attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("labels attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_setcustomvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_setcustomvalidity.html new file mode 100644 index 000000000..455dce2f0 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_setcustomvalidity.html @@ -0,0 +1,43 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_setCustomValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type='hidden' id='input_text'></p> + </form> + <script> + + var input = document.getElementById("input_text"); + + try + { + input.setCustomValidity("custom error"); + test(function() { + assert_true(true, "calling of setCustomValidity method is successed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepdown.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepdown.html new file mode 100644 index 000000000..abe31f595 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepdown.html @@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_stepDown</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='number' id='input_number'></p> + </form> + + <script> + var input_number = document.getElementById("input_number"); + input_number.max = "30"; + input_number.step = "3"; + input_number.value = "30"; + input_number.stepDown(5); + + if (typeof(input_number.stepDown) == "function") { + test(function() { + assert_equals(input_number.value, "15", "call of stepDown method is failed."); + }); + } else { + test(function() { + assert_unreached("stepDown attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepup.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepup.html new file mode 100644 index 000000000..39474b93d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepup.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_stepUp</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='number' id='input_number'></p> + </form> + + <script> + + var input_number = document.getElementById("input_number"); + input_number.max = "30"; + input_number.step = "3"; + input_number.value = "0"; + input_number.stepUp(5); + + if (typeof(input_number.stepUp) == "function") { + test(function() { + assert_equals(input_number.value, "15", "call of stepUp method is failed."); + }); + } else { + test(function() { + assert_unreached("stepUp attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validationmessage.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validationmessage.html new file mode 100644 index 000000000..785b4e79b --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validationmessage.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_validationMessage</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type='hidden' id='input_text'></p> + </form> + <script> + + var input = document.getElementById("input_text"); + + if (typeof(input.validationMessage) == "string") { + test(function() { + assert_equals(input.validationMessage, "", "validationMessage attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("validationMessage attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validity.html new file mode 100644 index 000000000..f46bd0b4c --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validity.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_validity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type='hidden' id='input_text'></p> + </form> + <script> + + var input = document.getElementById("input_text"); + + if (typeof(input.validity) == "object") { + test(function() { + assert_equals(input.validity.valueMissing, false, "validity attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("validity attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_value_invalidstateerr.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_value_invalidstateerr.html new file mode 100644 index 000000000..9ddf62acf --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_value_invalidstateerr.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_value_INVALID_STATE_ERR</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='file' id='input_file'></p> + </form> + + <script> + + var input_file = document.getElementById("input_file"); + try { + input_file.value = "val"; + test(function() { + assert_unreached("INVALID_STATE_ERR error is not raised."); + }); + } catch (e) { + test(function() { + assert_equals(e.code, e["INVALID_STATE_ERR"], "INVALID_STATE_ERR error is not raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasdate_invalidstateerr.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasdate_invalidstateerr.html new file mode 100644 index 000000000..6df4f74c5 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasdate_invalidstateerr.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_valueAsDate_INVALID_STATE_ERR</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='checkbox' id='input_checkbox'></p> + </form> + + <script> + var input_checkbox = document.getElementById("input_checkbox"); + try { + input_checkbox.valueAsDate = new Date('2011-11-01'); + test(function() { + assert_reached("INVALID_STATE_ERR error is not raised."); + }); + } + catch (e) { + test(function() { + assert_equals(e.code, e["INVALID_STATE_ERR"], "INVALID_STATE_ERR error is not raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasnumber_invalidstateerr.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasnumber_invalidstateerr.html new file mode 100644 index 000000000..8444d3fdc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasnumber_invalidstateerr.html @@ -0,0 +1,39 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_valueAsNumber_INVALID_STATE_ERR</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='checkbox' id='input_checkbox'></p> + </form> + + <script> + + var input_checkbox = document.getElementById("input_checkbox"); + try { + input_checkbox.valueAsNumber = 5; + } + catch (e) { + test(function() { + assert_equals(e.code, e["INVALID_STATE_ERR"], "INVALID_STATE_ERR error is not raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_width.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_width.html new file mode 100644 index 000000000..7cbda113a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_width.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_width</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + name="input_form"> + <p><input type='image' id='input_text'></p> + </form> + + <script> + + var input_text = document.getElementById("input_text"); + input_text.width = 30; + + if (typeof(input_text.width) == "number") { + test(function() { + assert_equals(input_text.width, 30, "width attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("width attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_willvalidate.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_willvalidate.html new file mode 100644 index 000000000..612fd004a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_willvalidate.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>input_willValidate</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><input type='hidden' id='input_text'></p> + </form> + <script> + + var input = document.getElementById("input_text"); + + if (typeof(input.willValidate) == "boolean") { + test(function() { + assert_equals(input.willValidate, false, "willValidate attribute is not correct."); + }); + } else { + test(function() { + assert_unreached("willValidate attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/keygen_checkvalidity.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/keygen_checkvalidity.html new file mode 100644 index 000000000..d7dcd13b3 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/keygen_checkvalidity.html @@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>keygen_checkValidity</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <keygen name='key' id='keygen_id'></keygen> + </form> + <script> + + var keygen = document.getElementById("keygen_id"); + + try + { + var ret = keygen.checkValidity(); + + test(function() { + assert_equals(ret, true, "calling of checkValidity method is failed."); + }); + } + catch (e) { + test(function() { + assert_unreached("Error is raised."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/keygen_labels.html b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/keygen_labels.html new file mode 100644 index 000000000..ca9600933 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/keygen_labels.html @@ -0,0 +1,48 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Forms</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <p> + <h3>keygen_labels</h3> + </p> + + <hr> + + <div id="log"></div> + + <form method="post" + enctype="application/x-www-form-urlencoded" + action="" + id="input_form"> + <p><label>Full name<label>(name):<keygen name='key1' id='keygen_id1'></keygen></label></label></p> + <p><label>Age:<keygen name='key2' id='keygen_id2'></keygen></label></p> + </form> + <script> + + var keygen1 = document.getElementById("keygen_id1"); + var keygen2 = document.getElementById("keygen_id2"); + + if (typeof(keygen1.labels) == "object") { + if (keygen1.labels.length == 2 && keygen2.labels.length == 1) { + test(function() { + assert_true(true, "labels attribute is correct."); + }); + } else { + test(function() { + assert_unreached("labels attribute is not correct."); + }); + } + } else { + test(function() { + assert_unreached("labels attribute is not exist."); + }); + } + + </script> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Session_History/contents/Session_History/css/result.css b/testing/web-platform/tests/old-tests/submission/Infraware/Session_History/contents/Session_History/css/result.css new file mode 100644 index 000000000..7bbc51730 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Session_History/contents/Session_History/css/result.css @@ -0,0 +1,12 @@ +.pass { + color: green; +} +.fail { + color: red; +} +.manualpass { + color: green; +} +.manualfail { + color: red; +}
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Infraware/Session_History/contents/Session_History/index.html b/testing/web-platform/tests/old-tests/submission/Infraware/Session_History/contents/Session_History/index.html new file mode 100644 index 000000000..7c5564102 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Infraware/Session_History/contents/Session_History/index.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0, user-scalable=yes" /> + <title>Session History</title> + + <script type="text/javascript"> + </script> + </head> + + <body> + <p> + <b>Session History </b><br/> + <hr/> + <ol type="1"> + <font size="2"> + <!-- <li><a href="history_length.html">history_length</a></li> --> + <li><a href="history_state.html">history_state</a></li> + + <li><a href="history_pushstate.html">history_pushState</a></li> + <li><a href="history_pushstate_nooptionalparam.html">history_pushState_NoOptionalParam</a></li> + <li><a href="history_pushstate_err.html">history_pushState SECURITY_ERR</a></li> + <li><a href="history_replacestate.html">history_replaceState</a></li> + <li><a href="history_replacestate_nooptionalparam.html">history_replaceStateNoOptionalParam</a></li> + <li><a href="history_replacestate_err.html">history_replaceState SECURITY_ERR</a></li> + + <li><a href="history_back.html">history_back</a></li> + <li><a href="history_forward.html">history_forward</a></li> + + <li><a href="history_go_minus.html">history_go_minus</a></li> + <li><a href="history_go_plus.html">history_go_plus</a></li> + <!-- <li><a href="history_go_zero.html">history_go_zero</a></li> --> + + <!-- <li><a href="history_go_under.html">history_go_under</a></li> --> + <!-- <li><a href="history_go_over.html">history_go_over</a></li> --> + + <li><a href="location_href.html">location_href</a></li> + <li><a href="location_assign.html">location_assign</a></li> + <li><a href="location_replace.html">location_replace</a></li> + <!-- <li><a href="location_reload.html">location_reload</a></li> --> + <li><a href="location_protocol.html">location_protocol</a></li> + <li><a href="location_host.html">location_host</a></li> + <li><a href="location_hostname.html">location_hostname</a></li> + <li><a href="location_port.html">location_port</a></li> + <li><a href="location_pathname.html">location_pathname</a></li> + <li><a href="location_search.html">location_search</a></li> + <li><a href="location_hash.html">location_hash</a></li> + + <li><a href="combination_history_001.html">combination_history_001</a></li> + <li><a href="combination_history_002.html">combination_history_002</a></li> + <li><a href="combination_history_003.html">combination_history_003</a></li> + <li><a href="combination_history_004.html">combination_history_004</a></li> + <li><a href="combination_history_005.html">combination_history_005</a></li> + <li><a href="combination_history_006.html">combination_history_006</a></li> + <li><a href="combination_history_007.html">combination_history_007</a></li> + + </font> + </ol> + <hr/> + <p> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_000-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_000-manual.htm new file mode 100644 index 000000000..278157644 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_000-manual.htm @@ -0,0 +1,62 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire drag event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire drag event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "drag"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire drag event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Click and drag the blue image + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If the user agent is still performing the previous iteration of the sequence (if any) when the next iteration becomes due, abort these steps for this iteration (effectively "skipping missed frames" of the drag-and-drop operation). + Fire a DND event named drag event at the source node. If this event is canceled, the user agent must set the current drag operation to "none" (no drag operation). + </p> + <img src="../images/blue.png" style="width:200px; height:100px" draggable="true" id="target"/> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_001-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_001-manual.htm new file mode 100644 index 000000000..3514f2193 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_001-manual.htm @@ -0,0 +1,62 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire drag event when dragging a div element</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire drag event when dragging a div element"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "drag"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire drag event when dragging a div element</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Click and drag the red box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If the user agent is still performing the previous iteration of the sequence (if any) when the next iteration becomes due, abort these steps for this iteration (effectively "skipping missed frames" of the drag-and-drop operation). + Fire a DND event named drag event at the source node. If this event is canceled, the user agent must set the current drag operation to "none" (no drag operation). + </p> + <div id="target" style="border:2px red solid; width:200px; height:50px" draggable="true"></div> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_002-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_002-manual.htm new file mode 100644 index 000000000..fdd40b577 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_002-manual.htm @@ -0,0 +1,64 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire dragend event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire dragend event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragendEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "dragend"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragendEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire dragend event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Drag the blue image + <li> Drop it on the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If the drag operation failed or succeeded, fire a DND event named dragend at the source node. + </p> + <img src="../images/blue.png" style="width:200px; height:100px" draggable="true" id="target"/> + <br /><br /> + <input type="text" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_003-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_003-manual.htm new file mode 100644 index 000000000..bde48b9cc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_003-manual.htm @@ -0,0 +1,67 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire dragenter event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire dragenter event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragenterEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "dragenter"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragenterEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire dragenter event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Select the text inside the red box + <li> Drag it and enter the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If the user is indicating a different immediate user selection than during the last iteration (or if this is the first iteration), and if this immediate user selection is not the same as the current target element, then update the current target element as follows: + - If the new immediate user selection is null, Set the current target element to null also. + - If the new immediate user selection is in a non-DOM document or application, Set the current target element to the immediate user selection. + - Otherwise, Fire a DND event named dragenter at the immediate user selection. + </p> + <div style="border:2px red solid; width:200px; height:50px">SampleText</div> + <br /><br /> + <input type="text" id="target" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_004-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_004-manual.htm new file mode 100644 index 000000000..c97cc7dbf --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_004-manual.htm @@ -0,0 +1,19 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Auto state of draggable attribute for 'a' element</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/> + <meta name="assert" content="Auto state of draggable attribute for 'a' element"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id=log></div> + <a href="#" style="display:none" id="target">Drag this</a> + <script type="text/javascript"> + test(function() {assert_true(document.getElementById("target").draggable)}, "Auto state of draggable attribute for 'a' element"); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_005-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_005-manual.htm new file mode 100644 index 000000000..28305cd26 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_005-manual.htm @@ -0,0 +1,19 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Auto state of draggable attribute for div element</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/> + <meta name="assert" content="Auto state of draggable attribute for div element"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id=log></div> + <div style="border:2px red solid; width:200px; height:50px; display:none;" id="target">SampleText</div> + <script type="text/javascript"> + test(function() {assert_false(document.getElementById("target").draggable)}, "Auto state of draggable attribute for div element"); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_006-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_006-manual.htm new file mode 100644 index 000000000..4d8432b07 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_006-manual.htm @@ -0,0 +1,19 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Auto state of draggable attribute for img element</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/> + <meta name="assert" content="Auto state of draggable attribute for img element"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id=log></div> + <img style="width:200px; height:100px; display:none;" id="target"/> + <script type="text/javascript"> + test(function() {assert_true(document.getElementById("target").draggable)}, "Auto state of draggable attribute for img element"); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_007-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_007-manual.htm new file mode 100644 index 000000000..f14c70b39 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_007-manual.htm @@ -0,0 +1,19 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: False state of draggable attribute</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/> + <meta name="assert" content="False state of draggable attribute"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id=log></div> + <a href="#" style="display:none" id="target" draggable="false">Drag this</a> + <script type="text/javascript"> + test(function() {assert_false(document.getElementById("target").draggable)}, "False state of draggable attribute"); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_008-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_008-manual.htm new file mode 100644 index 000000000..4716e5188 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_008-manual.htm @@ -0,0 +1,19 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: True state of draggable attribute</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/> + <meta name="assert" content="True state of draggable attribute"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id=log></div> + <a href="#" style="display:none" id="target" draggable="true">Drag this</a> + <script type="text/javascript"> + test(function() {assert_true(document.getElementById("target").draggable)}, "True state of draggable attribute"); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_009-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_009-manual.htm new file mode 100644 index 000000000..781a58476 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_009-manual.htm @@ -0,0 +1,66 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire dragleave event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire dragleave event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragleaveEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "dragleave"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragleaveEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire dragleave event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Select the text inside the red box + <li> Drag it over the blue box and drop it on the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If there is a change in the current target element, and if the previous target element was not null or a part of a non-DOM document, then fire a DND event named dragleave at the previous target element. + </p> + <div style="border:2px red solid; width:100px">SampleText</div> + <br /> + <div id="target" style="border:2px blue solid; width:200px; height:50px"></div> + <br /> + <input type="text" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_010-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_010-manual.htm new file mode 100644 index 000000000..08e0a071e --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_010-manual.htm @@ -0,0 +1,64 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire dragover event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire dragover event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragoverEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "dragover"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragoverEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire dragover event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Select the text inside the red box. + <li> Drag it, hover over the green box and then release the mouse + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If the current target element is a DOM element, then fire a DND event named dragover at this current target element + </p> + <div style="border:2px red solid; width:100px">SampleText</div> + <br /><br /> + <div id="target" style="border:2px green solid; width:200px; height:100px"></div> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_011-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_011-manual.htm new file mode 100644 index 000000000..dcd7c9c9d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_011-manual.htm @@ -0,0 +1,62 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire dragstart event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire dragstart event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DragstartEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "dragstart"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DragstartEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire dragstart event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Click and drag the red box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If it is an element that is being dragged, then set the drag data store elements list to contain just the source node. + Fire a DND event named dragstart at the source node. + </p> + <div id="target" style="border:2px red solid; width:200px; height:50px" draggable="true"></div> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_012-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_012-manual.htm new file mode 100644 index 000000000..b1df40a70 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_012-manual.htm @@ -0,0 +1,64 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Fire drop event during the drag and drop processing</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> + <meta name="assert" content="Fire drop event during the drag and drop processing"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DropEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "drop"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DropEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: Fire drop event during the drag and drop processing</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Select the text inside the red box + <li> Drag it and drop it on the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model + </p> + <p> + If the drag operation was a success, if the current target element is a DOM element, fire a DND event named drop at it. + </p> + <div style="border:2px red solid; width:100px">SampleText</div> + <br /><br /> + <input type="text" id="target" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_013-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_013-manual.htm new file mode 100644 index 000000000..6c2c88afc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_013-manual.htm @@ -0,0 +1,76 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Set a value to effectAllowed attribute</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> + <meta name="assert" content="Set a value to effectAllowed attribute"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var TARGETEVENT1, TARGETEVENT2, TARGET1, TARGET2; + + function DragstartEvent(evt) + { + if ((TARGET1 == evt.target) && (TARGETEVENT1 == evt.type)) + { + evt.dataTransfer.effectAllowed = "move"; + } + } + function DragenterEvent(evt) + { + if ((TARGET2 == evt.target) && (TARGETEVENT2 == evt.type)) + { + if("move" == evt.dataTransfer.effectAllowed) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + } + + TARGETEVENT1 = "dragstart"; + TARGETEVENT2 = "dragenter"; + + window.onload = function() + { + TARGET1 = document.getElementById("target1"); + TARGET2 = document.getElementById("target2"); + AddEventListenersForElement(TARGETEVENT1, DragstartEvent, false, TARGET1); + AddEventListenersForElement(TARGETEVENT2, DragenterEvent, false, TARGET2); + } + </script> + </head> + <body> + <pre>Description: Set a value to effectAllowed attribute</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Drag the blue image and enter the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#datatransfer + </p> + <p> + On setting, if the new value is one of "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", or "uninitialized", then the attribute's current value must be set to the new value. + </p> + <img src="../images/blue.png" style="width:200px; height:100px" draggable="true" id="target1"/> + <br /><br /> + <input type="text" id="target2" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_014-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_014-manual.htm new file mode 100644 index 000000000..3959cd2ee --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_014-manual.htm @@ -0,0 +1,81 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: files attribute returns a FileList</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> + <meta name="assert" content="files attribute returns a FileList"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DropEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + var files = evt.dataTransfer.files; + if(('[object FileList]' == files)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + else + { + LogTestResult("FAIL"); + } + } + + function DragenterEvent(evt) + { + evt.preventDefault(); + } + + function DragoverEvent(evt) + { + evt.preventDefault(); + } + + EVENT = "drop"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DropEvent, false, TARGET); + AddEventListenersForElement("dragenter", DragenterEvent, false, TARGET); + AddEventListenersForElement("dragover", DragoverEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: files attribute returns a FileList</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Drag a file and drop it in the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#datatransfer + </p> + <p> + The files attribute must return a live FileList sequence consisting of File objects representing the files. + </p> + <textarea type="text" id="target" style="border:2px green solid; width:200px; height:50px"></textarea> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_015-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_015-manual.htm new file mode 100644 index 000000000..1cd64d945 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_015-manual.htm @@ -0,0 +1,78 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: Add an item to the drag data store item list whose data is the string given by setData method's second argument</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> + <meta name="assert" content="Add an item to the drag data store item list whose data is the string given by setData method's second argument"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var TARGETEVENT1, TARGETEVENT2, TARGET1, TARGET2; + + function DragstartEvent(evt) + { + if ((TARGET1 == evt.target) && (TARGETEVENT1 == evt.type)) + { + evt.dataTransfer.setData("text", "SetText"); + } + } + function DropEvent(evt) + { + if ((TARGET2 == evt.target) && (TARGETEVENT2 == evt.type)) + { + if("SetText" == evt.dataTransfer.getData("text")) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + } + + TARGETEVENT1 = "dragstart"; + TARGETEVENT2 = "drop"; + + window.onload = function() + { + TARGET1 = document.getElementById("target1"); + TARGET2 = document.getElementById("target2"); + AddEventListenersForElement(TARGETEVENT1, DragstartEvent, false, TARGET1); + AddEventListenersForElement(TARGETEVENT2, DropEvent, false, TARGET2); + } + </script> + </head> + <body> + <pre>Description: Add an item to the drag data store item list whose data is the string given by setData method's second argument</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Drag the blue image and drop it in the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#datatransfer + </p> + <p> + If format equals "text", change it to "text/plain". + Remove the item in the drag data store item list whose kind is Plain Unicode string and whose type string is equal to format, if there is one. + Add an item to the drag data store item list whose kind is Plain Unicode string, whose type string is equal to format, and whose data is the string given by the method's second argument. + </p> + <img src="../images/blue.png" style="width:200px; height:100px" draggable="customValue2" id="target1"/> + <br /><br /> + <input type="text" id="target2" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_016-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_016-manual.htm new file mode 100644 index 000000000..26b3317c3 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_016-manual.htm @@ -0,0 +1,72 @@ +<!doctype html> +<html> + <head> + <title>HTML5 Drag and Drop: types attribute returns a DOMStringList</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> + <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> + <meta name="assert" content="types attribute returns a DOMStringList"/> + <script src="dragdrop_support.js" type="text/javascript"></script> + <script type="text/javascript"> + var EVENT, TARGET; + + function DropEvent(evt) + { + if ((TARGET == evt.target) && (EVENT == evt.type)) + { + var types = evt.dataTransfer.types; + if(('[object DOMStringList]' == types)) + { + LogTestResult("PASS"); + } + else + { + LogTestResult("FAIL"); + } + } + else + { + LogTestResult("FAIL"); + } + } + + EVENT = "drop"; + + window.onload = function() + { + TARGET = document.getElementById("target"); + AddEventListenersForElement(EVENT, DropEvent, false, TARGET); + } + </script> + </head> + <body> + <pre>Description: types attribute returns a DOMStringList</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_result'>Manual</td> + <td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below. + <div id="manualsteps"> + Steps: + <ol> + <li> Select the text inside the red box + <li> Drag and drop it in the green box + </ol> + </div> + </td> + </tr> + </table> + <p> + http://dev.w3.org/html5/spec/dnd.html#datatransfer + </p> + <p> + The types attribute must return a live DOMStringList. + </p> + <div style="border:2px red solid; width:200px; height:50px">SampleText</div> + <br /><br /> + <input type="text" id="target" style="border:2px green solid; width:200px; height:50px"></input> + </body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_support.js b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_support.js new file mode 100644 index 000000000..f5a1d6417 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_support.js @@ -0,0 +1,9 @@ +function AddEventListenersForElement(evt, callback, capture, element) +{ + element.addEventListener(evt, callback, capture); +} + +function LogTestResult(result) +{ + document.getElementById("test_result").firstChild.data = result; +} diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_002.html b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_002.html new file mode 100644 index 000000000..47acacfe7 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_002.html @@ -0,0 +1,47 @@ +<!DOCTYPE html > +<html> + <head> + <title>HTML 5 Foreign Content SVG in HTML </title> + <meta description="Test to verify SVG inside HTML I element parses correctly" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <script type="text/javascript"> + + function RunTest() + { + try + { + + if(document.getElementsByTagName("i")[0].childNodes[1].localName=="svg") + { + var svgNamespace = "http://www.w3.org/2000/svg"; + var textElem = document.createElementNS(svgNamespace, "text"); + + var textContent = document.createTextNode("FillerText"); + textElem.appendChild(textContent); + + var container = document.getElementById("svg1"); + container.appendChild(textElem); + + } + } + catch(ex) + { + } + } + </script> + </head> + + <body onLoad="RunTest()"> + + <div class="testdata"> + <p id="instructions">Test passes if 'FillerText' is rendered as italic.</p> + </div> + <div> + <i> + <svg id="svg1" width="100px" height="100px"> + </svg> + </i> + </div> + + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_007.html b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_007.html new file mode 100644 index 000000000..f1ba496bb --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_007.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<svg width="100px" height="100px" > + <rect width="100px" height="100px" fill="green" /> +</svg> + +<div> + <p> Test passes if a green rectangle is visible on the page above this line. </p> +</div> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_012.html b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_012.html new file mode 100644 index 000000000..09e99e41a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_012.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> + <head> + <title>HTML 5 Foreign Content SVG in HTML </title> + <meta description="Test to verify SVG elements are styled using SCRIPT and STYLE element" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + + <style> + svg + { + display: block; + fill: black; + } + </style> + <script> + function ChangeColor() + { + document.getElementById("rect1").style.fill = "green"; + } + </script> + </head> + + <body onload="ChangeColor()"> + + <div class="testdata"> + <p id="instructions">Test passes if a green square appears above a black square. </p> + </div> + <svg width="200px" height="200px"> + <rect id="rect1" x="0" y="0" width="100px" height="100px" /> + <rect id="rect2" x="0" y="150" width="100px" height="100px" /> + </svg> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_014.html b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_014.html new file mode 100644 index 000000000..d92c14dfa --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_014.html @@ -0,0 +1,98 @@ +<!DOCTYPE html> +<html> + <head> + <title>HTML 5 Foreign Content SVG in HTML </title> + <meta description="Test to verify SVG elements inside SVG namespace are camelCased" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + + <script type="text/javascript"> + + function RunTest() + { + try + { + var bResult = "FAIL"; + var parentNode = document.getElementById("svg1"); + + for(var i=1;i<parentNode.childNodes.length;i=i+2) + { + var idName = parentNode.childNodes[i].id; + var tagName = parentNode.childNodes[i].localName; + if(idName!=tagName) + { + bResult = "FAIL"; + break; + } + else + { + bResult = "PASS" + } + } + } + catch(ex) + { + bResult = "PASS"; + } + + document.getElementById("testresult").innerHTML = bResult; + } + </script> + </head> + + <body onload="RunTest()"> + + <div class="testdata"> + <p id="instructions"> Test passes if the word "PASS" appears below </p> + <p> Test Result : </p> + <p id="testresult"> RUNNING </div> + </div> + <svg id="svg1"> + + <altglyph id="altGlyph" /> + <ALTGLYPHDEF id="altGlyphDef" /> + <AltGlyphItem id="altGlyphItem" /> + <animatecolor id="animateColor" /> + <animatemotion id="animateMotion" /> + <animatetransform id="animateTransform" /> + <clippath id="clipPath" /> + <feblend id="feBlend" /> + <fecolormatrix id="feColorMatrix" /> + + <fecomponenttransfer id="feComponentTransfer" /> + <fecomposite id="feComposite" /> + <feconvolvematrix id="feConvolveMatrix" /> + <fediffuselighting id="feDiffuseLighting" /> + <fedisplacementmap id="feDisplacementMap" /> + <fedistantlight id="feDistantLight" /> + <feflood id="feFlood" /> + <fefunca id="feFuncA" /> + <fefuncb id="feFuncB" /> + + <fefuncg id="feFuncG" /> + <fefuncr id="feFuncR" /> + <fegaussianblur id="feGaussianBlur" /> + <feimage id="feImage" /> + <femerge id="feMerge" /> + <femergenode id="feMergeNode" /> + <femorphology id="feMorphology" /> + <feoffset id="feOffset" /> + <fepointlight id="fePointLight" /> + + <fespecularlighting id="feSpecularLighting" /> + <fespotlight id="feSpotLight" /> + <fetile id="feTile" /> + <feturbulence id="feTurbulence" /> + <foreignobject id="foreignObject" /> + <glyphref id="glyphRef" /> + <lineargradient id="linearGradient" /> + <radialgradient id="radialGradient" /> + <textpath id="textPath" /> + + </svg> + + + + </body> + +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_015.html b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_015.html new file mode 100644 index 000000000..a4d27873a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/foreigncontent/foreign_content_015.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html> + <head> + <title>HTML 5 Foreign Content SVG in HTML </title> + <meta description="Test to verify SVG Elements outside SVG namespace are camelCased" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + + <script type="text/javascript"> + + function RunTest() + { + try + { + + var parentNode = document.getElementById("div1"); + + for(var i=0;i<parentNode.childNodes.length;i++) + { + var idName = parentNode.childNodes[i].id; + var tagName = parentNode.childNodes[i].localName; + if(idName==tagName) + { + document.getElementById("testresult").innerHTML = "FAIL"; + break; + } + else + { + document.getElementById("testresult").innerHTML = "PASS"; + } + } + } + catch(ex) + { + document.getElementById("testresult").innerHTML = "FAIL"; + } + } + </script> + </head> + + <body onload="RunTest()"> + + <div id="div1"> + <AlTglYph id="altGlyph" /> + </div> + <p id="instructions"> Test passes if the word "PASS" appears below </p> + <p> Test Result : </p> + <div id="testresult"> RUNNING </div> + + + </body> + +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/history/404.html b/testing/web-platform/tests/old-tests/submission/Microsoft/history/404.html new file mode 100644 index 000000000..e28f5c575 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/history/404.html @@ -0,0 +1 @@ +Page Not Found
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/history/history_000.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/history/history_000.htm new file mode 100644 index 000000000..03a36bd5f --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/history/history_000.htm @@ -0,0 +1,329 @@ +<!doctype html> +<html> + <head> + <meta content="text/html; charset=utf-8" http-equiv="content-type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/history.html" /> + <title>HTML5 History Test Cases</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> +<body> + <div id="log"></div> + + <!-- Use this iframe to test url changes so that the base url does not change. Their document does not matter. --> + <iframe id="testframe1" style="display:none" src="./404.html"></iframe> + <iframe id="testframe2" style="display:none" src="./404.html"></iframe> + + <script type="text/javascript"> + var testCollection; + var testIndex = 0; + var testframe1 = document.getElementById("testframe1"); + var testframe2 = document.getElementById("testframe2"); + + setup(function() + { + testCollection = [ + function() { + test(function() { + assert_inherits(window, "onpopstate", "window inherits'onpopstate' event "); + }, "onpopstate in window"); + }, + function() { + test(function() { + assert_inherits(window.history, "pushState", "history inherits property 'pushState'"); + assert_equals(window.history.pushState.constructor, Function, "pushState is a function"); + }, "history.pushState is present"); + }, + function() { + test(function() { + assert_inherits(window.history, "replaceState", "history inherits property 'replaceState'"); + assert_equals(window.history.replaceState.constructor, Function, "replaceState is a function"); + }, "history.replaceState is present"); + }, + function() { + test(function() { + assert_inherits(window.history, "state", "history inherits property 'state'"); + }, "history.state is present"); + }, + function() { + test(function() { + assert_equals(window.history.state, null, "history.state initialized to null"); + }, "history.state is initialized to null"); + }, + + function() { + test(function() { + var length = history.length; + history.pushState(null,null); + assert_equals(history.length, length+1, "history.length should be incremented by one"); + }, "history.pushState increments history.length"); + }, + + function() { + var t = async_test("history.pushState clears forward entries"); + t.step(function() { + var length = history.length; + //push some extra entries into the session history + history.pushState(null,null); + history.pushState(null, null); + history.pushState(null, null); + + //there should now be three extra + assert_equals(history.length, length+3, "Three additional travel entries add to history.length"); + + //travel back to the entry that the test started on + history.back(); + history.back(); + history.back(); + + //if the back navs are queued, queue verification task after them + queue( + t.step_func(function() { + //once the .back navigations have completed, push again and verify length is one more than starting value + history.pushState(null, null); + assert_equals(history.length, length+1, "History.length should now only be one more than original value"); + t.done(); + }) + ); + }); + }, + + function() { + test(function() { + testframe1.contentWindow.history.pushState(null,null, "test-pushstate-url"); + assert_equals(getPageName(testframe1.contentWindow.location.href), "test-pushstate-url", "iframe1 has the pushed url"); + }, "history.pushState accepts a third parameter 'url' and uses it to alter location"); + }, + function() { + test(function() { + var oldurl = testframe1.contentWindow.location.href.toString(); + var pagename = getPageName(oldurl); + //form a new absolute url (with protocol, host, etc) with "absolute-page" as the name of the page + var newurl = oldurl.replace(pagename, "absolute-page"); + + testframe1.contentWindow.history.pushState(null,null, newurl); + assert_equals(testframe1.contentWindow.location.href, newurl, "iframe1 has the pushed url correctly"); + }, "history.pushState's url parameter can be an absolute url"); + }, + + function() { + test(function() { + testframe1.contentWindow.history.pushState(null,null, "multiple-pushstate-url1"); + testframe2.contentWindow.history.pushState(null,null, "multiple-pushstate-url2"); + + assert_equals(getPageName(testframe1.contentWindow.location.href), "multiple-pushstate-url1", "iframe1 has the pushed url"); + assert_equals(getPageName(testframe2.contentWindow.location.href), "multiple-pushstate-url2", "iframe2 has the pushed url"); + }, "history.pushState can modify location object in multiple frames"); + }, + + function() { + test(function() { + //trigger a security error by replacing the host of the current url with a fake one that is cross-domain + var testurl = testframe1.contentWindow.location.href.toString().replace(testframe1.contentWindow.location.host, "fakelocation-push"); + assert_throws("SECURITY_ERR", function() { history.pushState(null, null, testurl); }, "Security_Err 18 should be thrown"); + }, "history.pushState throws DOMException with code SECURITY_ERR (18)"); + }, + + function() { + test(function() { + //trigger a data clone error by passing invalid SCA data into the function + assert_throws("DATA_CLONE_ERR", function() { history.pushState(document.body, null); }, "pushState should throw an exception DATA_CLONE_ERR with code 25"); + }, "history.pushState throws DATA_CLONE_ERR(25) for bad state parameter"); + }, + + function() { + test(function() { + var length = history.length; + history.replaceState(null,null); + assert_equals(history.length, length, "history.length should not change"); + }, "history.replaceState does not increment history.length"); + }, + + function() { + var t = async_test("history.replaceState does not clear forward entries"); + t.step(function() { + var length = history.length; + //push some extra entries into the session history + history.pushState(null,null); + history.pushState(null, null); + history.pushState(null, null); + + //there should now be three extra + assert_equals(history.length, length+3, "Three additional travel entries add to history.length"); + + //travel back two entries to land in the middle + history.back(); + history.back(); + + //if the back navs are queued, queue verification task after them + queue( + t.step_func(function() { + //once the .back navigations have fired, push again and verify length has not changed since the last check + history.replaceState(null, null); + assert_equals(history.length, length+3, "History.length should still be three more than original value"); + t.done(); + }) + ); + }); + }, + + function() { + test(function() { + testframe1.contentWindow.history.replaceState(null,null, "test-replaceState-url"); + assert_equals(getPageName(testframe1.contentWindow.location.href), "test-replaceState-url", "iframe1 has the pushed url"); + }, "history.replaceState accepts a third parameter 'url' and uses it to alter location"); + }, + function() { + test(function() { + var oldurl = testframe1.contentWindow.location.href.toString(); + var pagename = getPageName(oldurl); + //form a new absolute url (with protocol, host, etc) with "absolute-page" as the name of the page + var newurl = oldurl.replace(pagename, "absolute-page"); + + testframe1.contentWindow.history.replaceState(null,null, newurl); + assert_equals(testframe1.contentWindow.location.href, newurl, "iframe1 has the pushed url correctly"); + }, "history.replaceState's url parameter can be an absolute url"); + }, + + function() { + test(function() { + testframe1.contentWindow.history.replaceState(null,null, "multiple-replaceState-url1"); + testframe2.contentWindow.history.replaceState(null,null, "multiple-replaceState-url2"); + + assert_equals(getPageName(testframe1.contentWindow.location.href), "multiple-replaceState-url1", "iframe1 has the pushed url"); + assert_equals(getPageName(testframe2.contentWindow.location.href), "multiple-replaceState-url2", "iframe2 has the pushed url"); + }, "history.replaceState can modify location object in multiple frames"); + }, + + function() { + test(function() { + //trigger a security error by replacing the host of the current url with a fake one that is cross-domain + var testurl = testframe1.contentWindow.location.href.toString().replace(testframe1.contentWindow.location.host, "fakelocation-replace"); + assert_throws("SECURITY_ERR", function() { history.replaceState(null, null, testurl); }, "Security_Err 18 should be thrown"); + }, "history.replaceState throws DOMException with code SECURITY_ERR (18)"); + }, + + function() { + test(function() { + //trigger a data clone error by passing invalid SCA data into the function + assert_throws("DATA_CLONE_ERR", function() {history.replaceState(document.body, null);}, "replaceState should throw an exception DATA_CLONE_ERR with code 25"); + }, "history.replaceState throws DATA_CLONE_ERR(25) for bad state parameter"); + }, + + function() { + var t = async_test("PopStateEvent fires on Back navigation"); + t.step(function() { + history.pushState(null, null); + history.pushState(null, null); + //prepare to end the test as soon as popstate fires + onpopstate = function(e) { + t.done(); + } + //go back to fire the popstate event + history.back(); + }); + }, + + function() { + var t = async_test("PopStateEvent fires on Forward navigation"); + t.step( function() { + onpopstate = null; + history.pushState(null, null); + history.pushState(null, null); + history.back(); + //if the back navigation is queued, set up the rest of the test after it is done + queue( + t.step_func(function() { + //prepare to end the test as soon as popstate fires + onpopstate = function(e) { + t.done(); + } + //go forward to fire the popstate event + history.forward(); + }) + ); + }); + }, + + function() { + var t = async_test("PopStateEvent receives state data on Back navigation"); + t.step(function() { + history.pushState("popstate-data", null); + history.pushState(null, null); + //prepare the popstate event to validate the data + onpopstate = t.step_func(function(e) { + assert_equals(e.state, "popstate-data", "State data is passed to the event correctly"); + t.done(); + }); + //go back to fire the popstate event + history.back(); + }); + }, + + function() { + test(function() { + history.pushState("pushstate-data", null); + //history.state should be set immediately + assert_equals(history.state, "pushstate-data", "State data is set correctly"); + }, "history.state is set by history.pushState"); + }, + + function() { + test(function() { + history.replaceState("replacestate-data", null); + //history.state should be set immediately + assert_equals(history.state, "replacestate-data", "State data is set correctly"); + }, "history.state is set by history.replaceState"); + }, + + function() { + var t = async_test("history.state changes on navigation"); + t.step(function() { + history.pushState("state-back1", null); + history.pushState("state-back2", null); + //precondition + assert_equals(history.state, "state-back2", "Verify that history.state is set to a second value"); + + //set up the popstate event to verify that history.state was changed + onpopstate = t.step_func(function(e) { + assert_equals(e.state, "state-back1", "Verify that history.state reverted to the first value"); + t.done(); + }); + history.back(); + }); + }, + ]; + }, {explicit_done:true, timeout:8000}); + + //used to get the name of a page within a path + // to check correctness of url parameter + function getPageName(path) { + var path = path || location.pathname; + var segments = path.split('/'); + return segments[segments.length-1]; + } + + //Callback for result_callback + //queues the next test in the array testCollection + //serves to make test execution sequential despite asynchronous behaviors + function testFinished(test) { + if(testIndex < testCollection.length - 1) { + //queue the function so that stack remains shallow + queue(testCollection[++testIndex]); + } else { + //when the last test has run, explicitly end test suite + done(); + } + } + function queue(func) { + //50 allows adequate time for .back and .forward navigations to queue first + setTimeout(func, 50); + } + + add_result_callback(testFinished); + //start the first test manually + queue(testCollection[testIndex]); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue-area.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue-area.png Binary files differnew file mode 100644 index 000000000..570ae0f2b --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue-area.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue-border.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue-border.png Binary files differnew file mode 100644 index 000000000..8f8e41c3d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue-border.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue.png Binary files differnew file mode 100644 index 000000000..4498dd258 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/blue.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/fail.gif b/testing/web-platform/tests/old-tests/submission/Microsoft/images/fail.gif Binary files differnew file mode 100644 index 000000000..c4addcf00 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/fail.gif diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/movie_300_frame_0.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/movie_300_frame_0.png Binary files differnew file mode 100644 index 000000000..b71282509 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/movie_300_frame_0.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster.png Binary files differnew file mode 100644 index 000000000..8873ed678 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_blue.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_blue.png Binary files differnew file mode 100644 index 000000000..69d5a39dc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_blue.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_green.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_green.png Binary files differnew file mode 100644 index 000000000..cac16ede7 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_green.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_red.png b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_red.png Binary files differnew file mode 100644 index 000000000..0fb1f252c --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/poster_red.png diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/images/rect.svg b/testing/web-platform/tests/old-tests/submission/Microsoft/images/rect.svg new file mode 100644 index 000000000..bb0cf97d9 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/images/rect.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="svg-root" width="100" height="50"> + <rect width="100" height="50" fill="black" /> +</svg> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm new file mode 100644 index 000000000..24d16cfcc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with script</title> +</head> +<body> + <script type="text/javascript"> + parent.window.postMessage("script ran", "*"); + </script> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm new file mode 100644 index 000000000..e63784771 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 video with autoplay attribute.</title> + <script src="/common/media.js"></script> +</head> +<body> + <script> + function do_play(event) { + parent.window.postMessage("play event fired", "*"); + } + + document.write( + "<video id='video0' src='" + getVideoURI("/media/green-at-15") + "'" + + " autoplay onplay='do_play(event);'>" + ); + </script> + Your browser does not support HTML5 video. + </video> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm new file mode 100644 index 000000000..621ece79a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <title>autofocus on form control</title> +</head> +<body> + <div>Below form control has autofocus attribute set.</div><br /> + <form action=""> + <span>Textbox: </span><input autofocus="autofocus" type="text" name="movie" /> + </form> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm new file mode 100644 index 000000000..02960d078 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<head> + <title>object tag</title> +</head> +<body> + <object width="400" height="600" data="sandbox.pdf"> + </object> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm new file mode 100644 index 000000000..42542ae14 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> +<title>Form submission</title> +</head> +<body> + <form id="form1" action="standalone-pass.htm"> + <span>Name: </span><input type="text" name="name" value="browser" /><br /> + <input id="submitButton" type="submit" value="Submit Form" /> + </form> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm new file mode 100644 index 000000000..fc01557c7 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> +<title>Form submission</title> +</head> +<body> + <form id="form1" action="standalone-fail.htm"> + <span>Name: </span><input type="text" name="name" value="browser" /><br /> + <input id="submitButton" type="submit" value="Submit Form" /> + </form> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm new file mode 100644 index 000000000..115b97293 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with hyperlink and target set to self</title> +</head> +<body> + <a id="hyperlink" href="standalone-pass.htm" target="_self">Click here to perform self navigation</a> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm new file mode 100644 index 000000000..f232dcb7c --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with showModalDialog() API</title> +</head> +<body> + <button type="button" onclick="javascript:showModalDialog('standalone-fail.htm')">Click here to call showModalDialog() API</button> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm new file mode 100644 index 000000000..d4e81bb96 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with window.open()</title> +</head> +<body> + <button type="button" onclick="javascript:window.open('standalone-fail.htm')">Click here to call window.open() API</button> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm new file mode 100644 index 000000000..b1e8f92fb --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with access to document.cookie</title> +</head> +<body> + <script type="text/javascript"> + cookie = document.cookie; + document.cookie = "name=browser"; + parent.window.postMessage("cookies are R/W", "*"); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm new file mode 100644 index 000000000..3304ea84b --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with iframes</title> +</head> +<body> + <table cellpadding="5" cellspacing="10"> + <tr> + <td> + <span>child iframe with sandbox="allow-scripts" attribute</span><br /> + <iframe id="Iframe1" src="iframe_sandbox_020a.htm" sandbox="allow-scripts" style="height: 50px; width: 250px;"></iframe> + </td> + </tr> + <tr> + <td> + <span>child iframe with sandbox="" attribute</span><br /> + <iframe id="Iframe2" src="iframe_sandbox_020a.htm" sandbox="" style="height: 50px; width: 250px;"></iframe> + </td> + </tr> + <tr> + <td> + <span>child iframe without sandbox attribute</span><br /> + <iframe id="Iframe3" src="iframe_sandbox_020a.htm" style="height: 50px; width: 250px;"></iframe> + </td> + </tr> + </table> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm new file mode 100644 index 000000000..a419c9413 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with script</title> +</head> +<body> + <div>Script Execution: <span id="scriptExecute" style="Color: Green">Blocked</span></div> + <script type="text/javascript"> + document.getElementById("scriptExecute").innerHTML = "Not Blocked"; + document.getElementById("scriptExecute").style.color = "Red"; + </script> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm new file mode 100644 index 000000000..e3041ccef --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with iframes</title> +</head> +<body> + <table cellpadding="5" cellspacing="10"> + <tr> + <td> + <span>child iframe with sandbox="allow-scripts" attribute</span><br /> + <iframe id="Iframe1" src="iframe_sandbox_021a.htm" sandbox="allow-scripts" style="height: 50px; width: 250px;"></iframe> + </td> + </tr> + <tr> + <td> + <span>child iframe with sandbox="" attribute</span><br /> + <iframe id="Iframe2" src="iframe_sandbox_020a.htm" sandbox="" style="height: 50px; width: 250px;"></iframe> + </td> + </tr> + <tr> + <td> + <span>child iframe without sandbox attribute</span><br /> + <iframe id="Iframe3" src="iframe_sandbox_021a.htm" style="height: 50px; width: 250px;"></iframe> + </td> + </tr> + </table> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm new file mode 100644 index 000000000..4e22a363c --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with script</title> +</head> +<body> + <div>Script Execution: <span id="scriptExecute" style="Color: Red">Blocked</span></div> + <script type="text/javascript"> + document.getElementById("scriptExecute").innerHTML = "Allowed"; + document.getElementById("scriptExecute").style.color = "Green"; + </script> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm new file mode 100644 index 000000000..11382d1d7 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> +<head> + <title>target=_top</title> +</head> +<body> + <div>hyperlink with target=_top</div> + <br /> + <a href="standalone-pass.htm" target="_top">Open the link in top window</a> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm new file mode 100644 index 000000000..a65db539b --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head><title>Access parent dom</title> +</head> +<body> + <script type="text/javascript"> + if (window.parent.document) + { + parent.window.postMessage("window.parent.document", "*"); + }else{ + parent.window.postMessage("!window.parent.document", "*"); + } + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm new file mode 100644 index 000000000..1b0996e58 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head><title>Page with access to document.cookie</title> +</head> +<body> + <div>Cookie Read: <span id="readCookie"></span></div> + <script type="text/javascript"> + cookie = document.cookie; + document.cookie = "name=browser"; + parent.window.postMessage("cookies are R/W", "*"); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm new file mode 100644 index 000000000..5f1a973e1 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head><title>Page with access to localStorage and sessionStorage</title> +</head> +<body> + <script type="text/javascript"> + if (window.localStorage && window.sessionStorage) { + parent.window.postMessage("access to window.localStorage and window.sessionStorage", "*"); + } + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm new file mode 100644 index 000000000..366bff6f9 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head><title>XMLHttpRequest</title> +</head> +<body> + <script type="text/javascript"> + xhrRequest = new XMLHttpRequest(); + + xhrRequest.onreadystatechange = function () { + if (xhrRequest.readyState == 4 && xhrRequest.status == 200) { + //xhr successful + parent.window.postMessage("access to window.XMLHttpRequest", "*"); + } + } + + xhrRequest.open("GET", "standalone-pass.htm", true); + xhrRequest.send(); + + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm new file mode 100644 index 000000000..d7ca76144 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head><title>Access parent dom</title> +</head> +<body> + <script type="text/javascript"> + try + { + if (window.parent.document) + { + parent.window.postMessage("window.parent.document", "*"); + } + } + catch(e) + { + parent.window.postMessage("!window.parent.document", "*"); + } + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm new file mode 100644 index 000000000..5d5c720bd --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head><title>Page with access to document.cookie</title> +</head> +<body> + <div>Cookie Read: <span id="readCookie"></span></div> + <script type="text/javascript"> + try + { + cookie = document.cookie; + document.cookie = "name=browser"; + parent.window.postMessage("cookies are R/W", "*"); + }catch(e) + { + parent.window.postMessage("cookies are not R/W", "*"); + } + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm new file mode 100644 index 000000000..7ec7d7a4e --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head><title>Page with access to localStorage and sessionStorage</title> +</head> +<body> + <script type="text/javascript"> + try + { + if (window.localStorage && window.sessionStorage) { + parent.window.postMessage("access to window.localStorage and window.sessionStorage", "*"); + } + } + catch(e) + { + parent.window.postMessage("no access to window.localStorage and window.sessionStorage", "*"); + } + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm new file mode 100644 index 000000000..abc0370c2 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head><title>XMLHttpRequest</title> +</head> +<body> + <script type="text/javascript"> + + try + { + xhrRequest = new XMLHttpRequest(); + + xhrRequest.onreadystatechange = function () { + if (xhrRequest.readyState == 4 && xhrRequest.status == 200) { + //xhr successful + parent.window.postMessage("access to window.XMLHttpRequest", "*"); + } + } + + xhrRequest.open("GET", "standalone-pass.htm", true); + xhrRequest.send(); + + }catch(e){} + + parent.window.postMessage("no access to window.XMLHttpRequest", "*"); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf Binary files differnew file mode 100644 index 000000000..0e16bc8d9 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm new file mode 100644 index 000000000..53e2172bc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Allow script execution inside iframe with sandbox attribute when sandbox="allow-scripts".</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" /> + <meta name="assert" content="Allow script execution inside iframe with sandbox attribute when sandbox='allow-scripts'." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Allow script execution inside iframe with sandbox attribute when sandbox='allow-scripts'."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "script ran"); + }); + t.done(); + } + + var timer = setTimeout(callback, 8000); + window.addEventListener("message", callback, false); + </script> + <iframe src="iframe_sandbox_001.htm" sandbox="allow-scripts" style="display: none"></iframe> + <div id=log></div> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm new file mode 100644 index 000000000..767518456 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Allow autoplay for HTML5 Video inside iframe with sandbox attribute if sandbox='allow-scripts'.</title> + <meta name=timeout content=long> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script> + async_test(function (t) { + var callback = t.step_func_done(function(event) { + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "play event fired"); + }); + + window.addEventListener("message", callback, false); + }, "Allow autoplay for HTML5 Video inside iframe with sandbox attribute if sandbox='allow-scripts'."); + </script> + <iframe src="iframe_sandbox_002.htm" sandbox="allow-scripts" style="display: none"></iframe> + <div id=log></div> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm new file mode 100644 index 000000000..21078322b --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Block autofocus on form control inside iframe with sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-automatic-features-browsing-context-flag" /> + <meta name="assert" content="Block autofocus on form control inside iframe with sandbox attribute." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Block autofocus on form controls inside iframe with sandbox attribute.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'>Test passes if caret (text cursor) is not on the textbox in the below iframe.</td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox</pre> + <iframe src="iframe_sandbox_003.htm" sandbox style="height: 100px; width: 400px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm new file mode 100644 index 000000000..21b063aed --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Block plugins inside iframe with sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-plugins-browsing-context-flag" /> + <meta name="assert" content="Block plugins inside iframe with sandbox attribute." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Block plugins inside iframe with sandbox attribute.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'>Test passes if you DO NOT see the 'Sample PDF For Testing' pdf below or 'FAIL'.<br> + Test requires that a pdf plugin has been installed!</td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox</pre> + <iframe sandbox src="iframe_sandbox_004.htm" height="400" width ="600"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm new file mode 100644 index 000000000..cc5f815c9 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Block script execution inside iframe with sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" /> + <meta name="assert" content="Block script execution inside iframe with sandbox attribute." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Block script execution inside iframe with sandbox attribute."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_true(!event); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <iframe src="iframe_sandbox_001.htm" sandbox style="display: none"></iframe> + <div id=log></div> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm new file mode 100644 index 000000000..487e8d4cf --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm @@ -0,0 +1,37 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Allow form submission inside sandbox iframe when sandbox='allow-forms'</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-forms-browsing-context-flag" /> + <meta name="assert" content="Allow form submission inside sandbox iframe when sandbox='allow-forms'." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Allow form submission inside iframe with sandbox attribute if sandbox='allow-forms'.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'> + <div>Steps:</div> + <div>1. Click button "Submit Form".</div> + <br /> + <div>Test passes if there is no red on the page and if the word "PASS" appears in the below iframe after following the above steps.</div> + </td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox="allow-forms"</pre> + <iframe src="iframe_sandbox_006.htm" sandbox="allow-forms" style="height: 100px; width: 300px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm new file mode 100644 index 000000000..5caa12a07 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm @@ -0,0 +1,37 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Block form submission inside sandbox iframe</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-forms-browsing-context-flag" /> + <meta name="assert" content="Block form submission inside sandbox iframe." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Block form submission inside iframe with sandbox attribute.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'> + <div>Steps:</div> + <div>1. Click button "Submit Form".</div> + <br /> + <div>Test passes if there is no red on the page and there is no navigation in the below iframe after following the above steps.</div> + </td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox="allow-scripts allow-same-origin allow-top-navigation"</pre> + <iframe src="iframe_sandbox_007.htm" sandbox="allow-scripts allow-same-origin allow-top-navigation" style="height: 100px; width: 300px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm new file mode 100644 index 000000000..dde12ef1d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Allow sandboxed iframe content to navigate the sandboxed browsing context itself.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-navigation-browsing-context-flag" /> + <meta name="assert" content="Allow sandboxed iframe content to navigate the sandboxed browsing context itself." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Allow sandboxed iframe content to navigate the sandboxed browsing context itself.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'> + <div>Steps:</div> + <div>1. Click link "Click here to perform self navigation".</div> + <br /> + <div>Test passes if there is no red on the page and the word "PASS" appears in the below iframe after following the above steps.</div> + </td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox=""</pre> + <iframe id="iframe1" name="iframe1" src="iframe_sandbox_008.htm" sandbox="" style="height: 100px; width: 350px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm new file mode 100644 index 000000000..5cb0d9030 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Block popup created via showModalDialog() inside iframe with sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="Block popup created via showModalDialog() inside iframe with sandbox attribute." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Block popup created via showModalDialog() inside iframe with sandbox attribute.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'> + <div>Steps:</div> + <div>1. Click button "Click here to call showModalDialog() API".</div> + <br /> + <div>Test passes if there is no red on the page and no new window opens. The user agent may offer the user the option of allowing a new window to open.</div> + </td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation"</pre> + <iframe src="iframe_sandbox_009.htm" sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation" style="height: 100px; width: 450px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm new file mode 100644 index 000000000..4341066e1 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Block window.open() API inside iframe with sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-navigation-browsing-context-flag" /> + <meta name="assert" content="Block window.open() API inside iframe with sandbox attribute." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Block window.open() API inside iframe with sandbox attribute.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'> + <div>Steps:</div> + <div>1. Click button "Click here to call window.open() API".</div> + <br /> + <div>Test passes if there is no red on the page and no new window opens. The user agent may offer the user the option of allowing a new window to open.</div> + </td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation"</pre> + <iframe src="iframe_sandbox_010.htm" sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation" style="height: 100px; width: 450px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm new file mode 100644 index 000000000..ce3ee1a7d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: iframe sandbox attribute value support DOMTokenList interface.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-iframe-element" /> + <meta name="assert" content="iframe sandbox attribute value support DOMTokenList interface." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id=log></div> + <iframe id="iframe1" src="about:blank" sandbox="allow-scripts allow-same-origin allow-forms" style="display : none"></iframe> + <script type="text/javascript"> + + test(function() { + var iframeEle = document.getElementById("iframe1"); + assert_equals(iframeEle.sandbox.length, 3) + }, "DOMTokenList length") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + assert_equals(iframeEle.sandbox.item(1), "allow-same-origin") + }, "DOMTokenList item(index)") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + assert_true(iframeEle.sandbox.contains("allow-forms")) + }, "DOMTokenList contains(DomString)") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + iframeEle.sandbox.add("ALLOW-SANDBOX"); + assert_true(iframeEle.sandbox.contains("ALLOW-SANDBOX")) + }, "DOMTokenList add(DomString)") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + iframeEle.sandbox.remove("ALLOW-SANDBOX"); + assert_false(iframeEle.sandbox.contains("ALLOW-SANDBOX")) + }, "DOMTokenList remove(DomString)") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + iframeEle.sandbox.remove("ALLOW-SANDBOX"); + assert_true( + iframeEle.sandbox.toggle("allow-top-navigation") && iframeEle.sandbox.contains("allow-top-navigation") && + !iframeEle.sandbox.toggle("allow-top-navigation") && !iframeEle.sandbox.contains("allow-top-navigation") + ) + }, "DOMTokenList toggle(DomString) - Returns true if token is now present (it was added); returns false if it is not (it was removed).") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + assert_equals(iframeEle.sandbox.value, iframeEle.sandbox.toString()) + }, "DOMTokenList sandbox.toString()") + + test(function() { + var iframeEle = document.getElementById("iframe1"); + iframeEle.sandbox.remove("ALLOW-SANDBOX"); + assert_true(iframeEle.sandbox.contains("allow-scripts") != iframeEle.sandbox.contains("Allow-SCRIPTS")) + }, "DOMTokenList case sensitivity") + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm new file mode 100644 index 000000000..cf99378cd --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox=" Allow-Scripts Allow-Same-Origin "></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm new file mode 100644 index 000000000..ab0aea079 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox=" + allow-scripts + allow-same-origin + "></iframe> +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm new file mode 100644 index 000000000..774720929 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox=" allow-scripts allow-same-origin "></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm new file mode 100644 index 000000000..a34ede4b3 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox=" ALLOW-SCRIPTS allow-same-origin "></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm new file mode 100644 index 000000000..c84e223e1 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function() { + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="
ALLOW-SCRIPTS
allow-same-origin
"></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm new file mode 100644 index 000000000..ade4c8092 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="ALLOW-SCRIPTSallow-same-origin"></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm new file mode 100644 index 000000000..77f10d274 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="
ALLOW-SCRIPTS
allow-same-origin
"></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm new file mode 100644 index 000000000..d91280a60 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + + <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="	ALLOW-SCRIPTS	allow-same-origin	"></iframe> + +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm new file mode 100644 index 000000000..751f85863 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</pre> + <div>This test is to verify script is blocked inside nested iframes if the top-most sandbox iframe has no 'allow-scripts' token.</div> + <br /> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'>Test passes if there is no red on the page.</td> + </tr> + </table> + <br /> + <div id="testframe"> + <div style="font-weight:bold">Top-most iframe with sandbox=""</div> + <iframe id="iframe1" name="iframe1" src="iframe_sandbox_020.htm" sandbox="" style="height: 330px; width: 400px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm new file mode 100644 index 000000000..bbdc21f93 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" /> + <meta name="assert" content="Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</pre> + <div>This test is to verify script is allowed inside nested iframes if any of the conditions below are true</div> + <div>1. both parent sandbox and child sandbox have 'allow-scripts' token.</div> + <div>2. parent sandbox has 'allow-scripts' token and nested child iframe has no sandbox attribute.</div> + <div>3. parent iframe has no sandbox attribute and child iframe has sandbox='allow-scripts' token.</div> + <div>4. both parent and child iframes have no sandbox attribute.</div> + <br /> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'>Test passes if there is no red on the page.</td> + </tr> + </table> + <br /> + <div id="testframe"> + <div style="float: left; border: 1px solid; padding: 5px;"> + <div style="font-weight: bold">Top-most iframe with sandbox="allow-scripts"</div> + <iframe id="iframe1" src="iframe_sandbox_021.htm" sandbox="allow-scripts" style="height: 330px; width: 400px;"></iframe> + </div> + <div style="float: left; border: 1px solid; padding: 5px; margin-left: 20px;"> + <div style="font-weight: bold">Top-most iframe without sandbox attribute</div> + <iframe id="iframe2" src="iframe_sandbox_021.htm" style="height: 330px; width: 400px;"></iframe> + </div> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm new file mode 100644 index 000000000..aa08de512 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: allow sandbox iframe to navigate their top-level browsing context if sandbox="allow-top-navigation".</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" /> + <meta name="assert" content="Allow sandbox iframe to navigate their top-level browsing context if sandbox='allow-top-navigation'." /> + <script src="sandbox_helper.js" type="text/javascript"></script> +</head> +<body> + <pre>Description: Allow sandbox iframe to navigate its top-level browsing context if sandbox='allow-top-navigation'.</pre> + <table id='testtable' border='1'> + <tr> + <td>Test Result</td> + <td>Test Assertion</td> + </tr> + <tr> + <td id='test_0_result'>Manual</td> + <td id='test_0_assertion'> + <div>Steps:</div> + <div>1. Click link "Open the link in top window".</div> + <br /> + <div>Test passes if there is no red on the page and no top-level navigation after following the above steps.</div> + </td> + </tr> + </table> + <br /> + <div id="testframe"> + <pre>iframe with sandbox="allow-top-navigation"</pre> + <iframe src="iframe_sandbox_022.htm" sandbox="allow-top-navigation" style="height: 100px; width: 450px;"></iframe> + </div> + <script type="text/javascript"> + DisableTestForNonSupportingBrowsers(); + </script> +</body> +</html> + diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm new file mode 100644 index 000000000..7f8a436b4 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm @@ -0,0 +1,34 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Allow sandbox iframe to access other content from the same origin if sandbox="allow-same-origin".</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content=" Allow sandbox iframe to access other content from the same origin if sandbox='allow-same-origin'." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Allow sandbox iframe to access other content from the same origin if sandbox='allow-same-origin'"); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "window.parent.document"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <iframe src="iframe_sandbox_023.htm" sandbox="allow-scripts allow-same-origin" style="display:none"></iframe> + <div id=log></div> + +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm new file mode 100644 index 000000000..935543707 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: document.cookie access is allowed inside iframe with sandbox="allow-same-origin".</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="document.cookie access is allowed inside iframe with sandbox='allow-same-origin'." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("document.cookie access is allowed inside iframe with sandbox='allow-same-origin'."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + <iframe src="iframe_sandbox_024.htm" sandbox="allow-scripts allow-same-origin" style="display:none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm new file mode 100644 index 000000000..ab291e5ce --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Allow parent content to access sandbox child iframe content when sandbox='allow-same-origin</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Allow parent content to access sandbox child iframe content when sandbox='allow-same-origin'" /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + + var t = async_test("Allow parent content to access sandbox child iframe content when sandbox='allow-same-origin'"); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(document.getElementById('sandboxIframe').contentDocument.title, "Page with a message"); + }); + t.done(); + } + </script> + <div id=log></div> + + <iframe id='sandboxIframe' src="standalone-iframe-content.htm" sandbox="allow-same-origin" onload="callback()" style="display : none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm new file mode 100644 index 000000000..49243899e --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Allow localStorage and sessionStorage access inside iframe with sandbox='allow-same-origin allow-scripts'.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Allow localStorage and sessionStorage access inside iframe with sandbox='allow-same-origin allow-scripts'." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Allow localStorage and sessionStorage access inside iframe with sandbox='allow-same-origin allow-scripts'"); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "access to window.localStorage and window.sessionStorage"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + <iframe src="iframe_sandbox_026.htm" sandbox="allow-scripts allow-same-origin" style="display : none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm new file mode 100644 index 000000000..2b9cba5d2 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Allow XMLHttpRequest inside iframe with the sandbox attribute if sandbox='allow-same-origin'.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Allow XMLHttpRequest in an iframe with the sandbox attribute if sandbox='allow-same-origin'." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Allow XMLHttpRequest in an iframe with the sandbox attribute if sandbox='allow-same-origin'."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "access to window.XMLHttpRequest"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + <iframe src="iframe_sandbox_027.htm" sandbox="allow-scripts allow-same-origin" style="display : none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm new file mode 100644 index 000000000..56dfb6810 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm @@ -0,0 +1,34 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Block sandbox iframe from accessing other content from the same origin.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Block sandbox iframe from accessing other content from the same origin." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Block sandbox iframe from accessing other content from the same origin."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "!window.parent.document"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <iframe src="iframe_sandbox_028.htm" sandbox="allow-scripts" style="display:none"></iframe> + <div id=log></div> + +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm new file mode 100644 index 000000000..b88b74a22 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Block document.cookie inside iframe with the sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Block document.cookie inside iframe with the sandbox attribute." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Block document.cookie inside iframe with the sandbox attribute."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "cookies are not R/W"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + <iframe src="iframe_sandbox_029.htm" sandbox="allow-scripts" style="display:none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm new file mode 100644 index 000000000..1c3b54cb0 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <title>HTML5 Sandbox: Block parent content to access sandbox child iframe content when sandbox attribute exists</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Block parent content to access sandbox child iframe content when sandbox attribute exists" /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + + var t = async_test("Block parent content to access sandbox child iframe content when sandbox attribute exists"); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + try { document.getElementById('sandboxIframe').contentDocument.title; assert_true(false);} + catch(e) {assert_true(true);} + }); + t.done(); + } + </script> + <div id=log></div> + + <iframe id='sandboxIframe' src="standalone-iframe-content.htm" sandbox onload="callback()" style="display : none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm new file mode 100644 index 000000000..2582fac35 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Block localStorage and sessionStorage inside iframe with the sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Block localStorage and sessionStorage inside iframe with the sandbox attribute." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Block localStorage and sessionStorage inside iframe with the sandbox attribute."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "no access to window.localStorage and window.sessionStorage"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + <iframe src="iframe_sandbox_031.htm" sandbox="allow-scripts" style="display : none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm new file mode 100644 index 000000000..1c234fcc9 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>HTML5 Sandbox: Block XMLHttpRequest in an iframe with the sandbox attribute.</title> + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> + <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" /> + <meta name="assert" content="Block XMLHttpRequest inside sandbox iframe." /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script type="text/javascript"> + + + var t = async_test("Block XMLHttpRequest in an iframe with the sandbox attribute."); + + function callback(event) + { + t.step(function(){ + assert_true('sandbox' in document.createElement('iframe')); + assert_equals(event.data, "no access to window.XMLHttpRequest"); + }); + t.done(); + } + + var timer = setTimeout(callback, 4000); + window.addEventListener("message", callback, false); + </script> + <div id=log></div> + <iframe src="iframe_sandbox_032.htm" sandbox="allow-scripts" style="display : none"></iframe> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js new file mode 100644 index 000000000..1472cbf22 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js @@ -0,0 +1,14 @@ +function IsSandboxSupported() { + if ('sandbox' in document.createElement('iframe')) { + return true; + } + return false; +} + +function DisableTestForNonSupportingBrowsers() { + //check if sandbox is supported by the browser + if (!IsSandboxSupported()) { + document.getElementById('testframe').innerHTML = "FAIL: Your browser does not support the sandbox attribute on the iframe element."; + document.getElementById('testframe').style.color = "Red"; + } +}
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm new file mode 100644 index 000000000..1725ef060 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with FAIL message</title> +</head> +<body> + <div style="color: Red">FAIL!!!</div> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm new file mode 100644 index 000000000..e543c21d6 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with a message</title> +</head> +<body> + <div>Hello World.</div> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm new file mode 100644 index 000000000..0ca822f8d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>Page with PASS message</title> +</head> +<body> + <div style="color: Green">PASS!!!</div> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/RemoveElementContainingSelection.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/RemoveElementContainingSelection.htm new file mode 100644 index 000000000..69150236e --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/RemoveElementContainingSelection.htm @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Remove the element containing the selection</title> + <script type="text/javascript"> + function RunTest() + { + try + { + var selection = window.getSelection(); + var div1 = document.getElementById("div1"); + var span1 = document.getElementById("span1"); + var range = document.createRange(); + range.selectNode(span1); + selection.addRange(range); + + document.body.removeChild(div1); + + if ("" == selection.toString()) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <div id="div1">some text + <span id="span1">aaaaaaaa</span> + </div> + <div id="div2">Remove the element containing the selection</div> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/addRange.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/addRange.htm new file mode 100644 index 000000000..c4b5e9944 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/addRange.htm @@ -0,0 +1,72 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Add a range to the selection</title> + <script type="text/javascript"> + var testPassed = true; + + function checkSelectionAttributes(anchorNode, anchorOffset, focusNode, focusOffset, collapsed, rangeCount) + { + var selection = window.getSelection(); + if (anchorNode != selection.anchorNode) + { + testPassed = false; + } + if (anchorOffset != selection.anchorOffset) + { + testPassed = false; + } + if (focusNode != selection.focusNode) + { + testPassed = false; + } + if (focusOffset != selection.focusOffset) + { + testPassed = false; + } + if (collapsed != selection.isCollapsed) + { + testPassed = false; + } + if (rangeCount != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + + checkSelectionAttributes(range.startContainer, range.startOffset, range.endContainer, range.endOffset, range.collapsed, 1); + if (p1.firstChild.nodeValue != selection.toString()) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Add a range to the selection</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapse.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapse.htm new file mode 100644 index 000000000..7c2423021 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapse.htm @@ -0,0 +1,73 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Collapse the selection using collapse()</title> + <script type="text/javascript"> + var testPassed = true; + + function checkSelectionAttributes(anchorNode, anchorOffset, focusNode, focusOffset, collapsed, rangeCount) + { + var selection = window.getSelection(); + if (anchorNode != selection.anchorNode) + { + testPassed = false; + } + if (anchorOffset != selection.anchorOffset) + { + testPassed = false; + } + if (focusNode != selection.focusNode) + { + testPassed = false; + } + if (focusOffset != selection.focusOffset) + { + testPassed = false; + } + if (collapsed != selection.isCollapsed) + { + testPassed = false; + } + if (rangeCount != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + selection.collapse(p1, 0); + + checkSelectionAttributes(p1, 0, p1, 0, true, 1); + if ("" != selection.toString()) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Collapse the selection using collapse()</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapseToEnd.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapseToEnd.htm new file mode 100644 index 000000000..2f68ec655 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapseToEnd.htm @@ -0,0 +1,75 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Collapse the selection with collapseToEnd()</title> + <script type="text/javascript"> + var testPassed = true; + + function checkSelectionAttributes(anchorNode, anchorOffset, focusNode, focusOffset, collapsed, rangeCount) + { + var selection = window.getSelection(); + if (anchorNode != selection.anchorNode) + { + testPassed = false; + } + if (anchorOffset != selection.anchorOffset) + { + testPassed = false; + } + if (focusNode != selection.focusNode) + { + testPassed = false; + } + if (focusOffset != selection.focusOffset) + { + testPassed = false; + } + if (collapsed != selection.isCollapsed) + { + testPassed = false; + } + if (rangeCount != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + selection.collapseToEnd(); + + range.collapse(false); + + checkSelectionAttributes(range.startContainer, range.startOffset, range.endContainer, range.endOffset, true, 1); + if ("" != selection.toString()) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Collapse the selection with collapseToEnd()</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapseToStart.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapseToStart.htm new file mode 100644 index 000000000..da9676d57 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/collapseToStart.htm @@ -0,0 +1,75 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Collapse the selection with collapseToStart()</title> + <script type="text/javascript"> + var testPassed = true; + + function checkSelectionAttributes(anchorNode, anchorOffset, focusNode, focusOffset, collapsed, rangeCount) + { + var selection = window.getSelection(); + if (anchorNode != selection.anchorNode) + { + testPassed = false; + } + if (anchorOffset != selection.anchorOffset) + { + testPassed = false; + } + if (focusNode != selection.focusNode) + { + testPassed = false; + } + if (focusOffset != selection.focusOffset) + { + testPassed = false; + } + if (collapsed != selection.isCollapsed) + { + testPassed = false; + } + if (rangeCount != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + selection.collapseToStart(); + + range.collapse(true); + + checkSelectionAttributes(range.startContainer, range.startOffset, range.endContainer, range.endOffset, true, 1); + if ("" != selection.toString()) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Collapse the selection with collapseToStart()</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/deleteFromDocument.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/deleteFromDocument.htm new file mode 100644 index 000000000..2373939cc --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/deleteFromDocument.htm @@ -0,0 +1,80 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Delete some text from the document while it is part of a selection</title> + <script type="text/javascript"> + var testPassed = true; + + function checkSelectionAttributes(anchorNode, anchorOffset, focusNode, focusOffset, collapsed, rangeCount) + { + var selection = window.getSelection(); + if (anchorNode != selection.anchorNode) + { + testPassed = false; + } + if (anchorOffset != selection.anchorOffset) + { + testPassed = false; + } + if (focusNode != selection.focusNode) + { + testPassed = false; + } + if (focusOffset != selection.focusOffset) + { + testPassed = false; + } + if (collapsed != selection.isCollapsed) + { + testPassed = false; + } + if (rangeCount != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p2 = document.getElementById("p2"); + var expectedResult = "abcdeuvwxyz"; + + var range = document.createRange(); + range.setStart(p2.firstChild, 5); + range.setEnd(p2.firstChild, 20); + selection.addRange(range); + selection.deleteFromDocument(); + p2.normalize(); + + range.collapse(true); + + checkSelectionAttributes(range.startContainer, range.startOffset, range.endContainer, range.endOffset, true, 1); + + if (expectedResult != p2.firstChild.data) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Delete some text from the document while it is part of a selection</p> + <p id="p2">abcdefghijklmnopqrstuvwxyz</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/getRangeAt.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/getRangeAt.htm new file mode 100644 index 000000000..a3911e6cd --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/getRangeAt.htm @@ -0,0 +1,59 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Get the range from the selection</title> + <script type="text/javascript"> + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + var testPassed = true; + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + + var returnedRange = selection.getRangeAt(0); + + if (range.toString() != returnedRange.toString()) + { + testPassed = false; + } + if (range.startContainer != returnedRange.startContainer) + { + testPassed = false; + } + if (range.startOffset != returnedRange.startOffset) + { + testPassed = false; + } + if (range.endContainer != returnedRange.endContainer) + { + testPassed = false; + } + if (range.endOffset != returnedRange.endOffset) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Get the range from the selection</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/insertNodeIntoSelection.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/insertNodeIntoSelection.htm new file mode 100644 index 000000000..4ec0d80f3 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/insertNodeIntoSelection.htm @@ -0,0 +1,41 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Insert a new element and text node into an element that is currently selected</title> + <script type="text/javascript"> + function RunTest() + { + try + { + var selection = window.getSelection(); + var expectedText = "some textnew text"; + var div1 = document.getElementById("div1"); + var range = document.createRange(); + range.selectNode(div1); + selection.addRange(range); + + var ele = document.createElement("div"); + var tNode = document.createTextNode("new text"); + ele.appendChild(tNode); + div1.appendChild(ele); + + if (expectedText == selection.toString()) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p>This test inserts a new element with a text node child into the current selection.</p> + <div id="div1">some text</div> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/removeAllRanges.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/removeAllRanges.htm new file mode 100644 index 000000000..869e5391d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/removeAllRanges.htm @@ -0,0 +1,73 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Call removeAllRanges() to clear the selection</title> + <script type="text/javascript"> + var testPassed = true; + + function checkDefaultSelectionAttributes() + { + var selection = window.getSelection(); + if (null != selection.anchorNode) + { + testPassed = false; + } + if (0 != selection.anchorOffset) + { + testPassed = false; + } + if (null != selection.focusNode) + { + testPassed = false; + } + if (0 != selection.focusOffset) + { + testPassed = false; + } + if (!selection.isCollapsed) + { + testPassed = false; + } + if (0 != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + selection.removeAllRanges(); + + checkDefaultSelectionAttributes(); + if ("" != selection.toString()) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Call removeAllRanges() to clear the selection</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/removeRange.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/removeRange.htm new file mode 100644 index 000000000..e35047b47 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/removeRange.htm @@ -0,0 +1,72 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Remove the range from the selection</title> + <script type="text/javascript"> + var testPassed = true; + + function checkDefaultSelectionAttributes() + { + var selection = window.getSelection(); + if (null != selection.anchorNode) + { + testPassed = false; + } + if (0 != selection.anchorOffset) + { + testPassed = false; + } + if (null != selection.focusNode) + { + testPassed = false; + } + if (0 != selection.focusOffset) + { + testPassed = false; + } + if (!selection.isCollapsed) + { + testPassed = false; + } + if (0 != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var selection = window.getSelection(); + var p1 = document.getElementById("p1"); + + var range = document.createRange(); + range.selectNode(p1); + selection.addRange(range); + selection.removeRange(range); + + checkDefaultSelectionAttributes(); + if ("" != selection.toString()) + { + testPassed = false; + } + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <p id="p1">Remove the range from the selection by calling removeRange()</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/select.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/select.htm new file mode 100644 index 000000000..f6a31f249 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/select.htm @@ -0,0 +1,72 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Call select() on a text field</title> + <script type="text/javascript"> + var testPassed = true; + + function checkDefaultSelectionAttributes() + { + var selection = window.getSelection(); + if (null != selection.anchorNode) + { + testPassed = false; + } + if (0 != selection.anchorOffset) + { + testPassed = false; + } + if (null != selection.focusNode) + { + testPassed = false; + } + if (0 != selection.focusOffset) + { + testPassed = false; + } + if (!selection.isCollapsed) + { + testPassed = false; + } + if (0 != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var input1 = document.getElementById("input1"); + + input1.select(); + + checkDefaultSelectionAttributes(); + + var selectionText = input1.value.substring(input1.selectionStart, input1.selectionEnd); + if (input1.value != selectionText) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <input style="WIDTH: 500px" id="input1" value="Some text in an input control" type="text" /> + <p>Select the text in the input element by calling select()</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectAllChildren.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectAllChildren.htm new file mode 100644 index 000000000..a3ab4f57d --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectAllChildren.htm @@ -0,0 +1,32 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Call selectAllChildren() where the parameter is a text node</title> + <script type="text/javascript"> + function RunTest() + { + try + { + var selection = window.getSelection(); + var div1 = document.getElementById("div1"); + selection.selectAllChildren(div1.firstChild); + + if ("" == selection.toString()) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <div id="div1">Call selectAllChildren() where the parameter is a text node</div> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectionStartEnd.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectionStartEnd.htm new file mode 100644 index 000000000..c5b69d570 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/selectionStartEnd.htm @@ -0,0 +1,74 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Set selectionStart and selectionEnd on a text field</title> + <script type="text/javascript"> + var testPassed = true; + + function checkDefaultSelectionAttributes() + { + var selection = window.getSelection(); + if (null != selection.anchorNode) + { + testPassed = false; + } + if (0 != selection.anchorOffset) + { + testPassed = false; + } + if (null != selection.focusNode) + { + testPassed = false; + } + if (0 != selection.focusOffset) + { + testPassed = false; + } + if (!selection.isCollapsed) + { + testPassed = false; + } + if (0 != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var input1 = document.getElementById("input1"); + var expectedResult = "text"; + + input1.selectionStart = 5; + input1.selectionEnd = 9; + + checkDefaultSelectionAttributes(); + + var selectionText = input1.value.substring(input1.selectionStart, input1.selectionEnd); + if (expectedResult != selectionText) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <input style="WIDTH: 500px" id="input1" value="Some text in an input control" type="text" /> + <p>Select some text in the input element by setting selectionStart and selectionEnd</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/selection/setSelectionRange.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/setSelectionRange.htm new file mode 100644 index 000000000..a6d7a0f2b --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/selection/setSelectionRange.htm @@ -0,0 +1,73 @@ +<!DOCTYPE HTML> +<html> + <head> + <title id="desc">HTML5 Selection: Call setSelectionRange() on a text field</title> + <script type="text/javascript"> + var testPassed = true; + + function checkDefaultSelectionAttributes() + { + var selection = window.getSelection(); + if (null != selection.anchorNode) + { + testPassed = false; + } + if (0 != selection.anchorOffset) + { + testPassed = false; + } + if (null != selection.focusNode) + { + testPassed = false; + } + if (0 != selection.focusOffset) + { + testPassed = false; + } + if (!selection.isCollapsed) + { + testPassed = false; + } + if (0 != selection.rangeCount) + { + testPassed = false; + } + } + + function RunTest() + { + try + { + var input1 = document.getElementById("input1"); + var expectedResult = "input"; + + input1.setSelectionRange(16, 21); + + checkDefaultSelectionAttributes(); + + var selectionText = input1.value.substring(input1.selectionStart, input1.selectionEnd); + if (expectedResult != selectionText) + { + testPassed = false; + } + + if (testPassed) + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + } + catch (ex) + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + } + </script> + </head> + <body onload="RunTest();"> + <input style="WIDTH: 500px" id="input1" value="Some text in an input control" type="text" /> + <p>Call setSelectionRange() on the input element to select some of the text</p> + <p>Test passes if the word "PASS" appears below.</p> + <div>Test result: </div> + <div id="testresult">FAIL</div> + </body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/echo.js b/testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/echo.js new file mode 100644 index 000000000..02184921c --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/echo.js @@ -0,0 +1 @@ +onmessage = function (ev) { postMessage(ev.data); }
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/structuredclone_0.html b/testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/structuredclone_0.html new file mode 100644 index 000000000..ed0e35d9a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/structuredclone_0.html @@ -0,0 +1,400 @@ +<!doctype html> +<html> + <head> + <meta content="text/html; charset=utf-8" http-equiv="content-type" /> + <title>2.8 Common DOM interfaces - Structured Clone Algorithm </title> + <link rel="help" href="http://www.w3.org/TR/html5/common-dom-interfaces.html#safe-passing-of-structured-data" /> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id="log"></div> + +<script type="text/javascript"> + var worker; + var testCollection; + setup(function() + { + //the worker is used for each test in sequence + //worker's callback will be set for each test + //worker's internal onmessage echoes the data back to this thread through postMessage + worker = new Worker("./echo.js"); + testCollection = [ + function() { + var t = async_test("Primitive string is cloned"); + t.id = 0; + worker.onmessage = t.step_func(function(e) {assert_equals("primitive string", e.data, "\"primitive string\" === event.data"); t.done(); }); + t.step(function() { worker.postMessage("primitive string");}); + }, + function() { + var t = async_test("Primitive integer is cloned"); + t.id = 1; + worker.onmessage = t.step_func(function(e) {assert_equals(2000, e.data, "2000 === event.data"); t.done(); }); + t.step(function() { worker.postMessage(2000);}); + }, + function() { + var t = async_test("Primitive floating point is cloned"); + t.id = 2; + worker.onmessage = t.step_func(function(e) {assert_equals(111.456, e.data, "111.456 === event.data"); t.done(); }); + t.step(function() { worker.postMessage(111.456);}); + }, + function() { + var t = async_test("Primitive floating point (negative) is cloned"); + t.id = 3; + worker.onmessage = t.step_func(function(e) {assert_equals(-111.456, e.data, "-111.456 === event.data"); t.done(); }); + t.step(function() { worker.postMessage(-111.456);}); + }, + function() { + var t = async_test("Primitive number (hex) is cloned"); + t.id = 4; + worker.onmessage = t.step_func(function(e) {assert_equals(0xAB25, e.data, "0xAB25 === event.data"); t.done(); }); + t.step(function() { worker.postMessage(0xAB25);}); + }, + function() { + var t = async_test("Primitive number (scientific) is cloned"); + t.id = 5; + worker.onmessage = t.step_func(function(e) {assert_equals(15e2, e.data, "15e2 === event.data"); t.done(); }); + t.step(function() { worker.postMessage(15e2);}); + }, + function() { + var t = async_test("Primitive boolean is cloned"); + t.id = 6; + worker.onmessage = t.step_func(function(e) {assert_equals(false, e.data, "false === event.data"); t.done(); }); + t.step(function() { worker.postMessage(false);}); + }, + function() { + var t = async_test("Instance of Boolean is cloned"); + t.id = 7; + var obj; + t.step(function() {obj = new Boolean(false);}); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "Boolean === event.data.constructor"); + assert_equals(obj.valueOf(), e.data.valueOf(), "(new Boolean(false)).valueof() === event.data.valueOf()"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + },function() { + var t = async_test("Instance of Number is cloned"); + t.id = 8; + var obj; + t.step(function() {obj = new Number(2000);}); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "Number === event.data.constructor"); + assert_equals(obj.valueOf(), e.data.valueOf(), "(new Number(2000)).valueof() === event.data.valueOf()"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Instance of String is cloned"); + t.id = 9; + var obj; + t.step(function() { obj = new String("String Object");}); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "String === event.data.constructor"); + assert_equals(obj.valueOf(), e.data.valueOf(), "(new String(\"String Object\")).valueof() === event.data.valueOf()"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Instance of Date is cloned"); + t.id = 10; + var obj; + t.step(function() { obj= new Date(2011,1,1);}); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "Date === event.data.constructor"); + assert_equals(obj.valueOf(), e.data.valueOf(), "(new Date(2011,1,1)).valueof() === event.data.valueOf()"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Instance of RegExp is cloned"); + t.id = 11; + var obj; + t.step(function() {obj = new RegExp("w3+c","g","i");}); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "RegExp === event.data.constructor"); + assert_equals(obj.source, e.data.source, "canon.source === event.data.source"); + assert_equals(obj.multiline, e.data.multiline, "canon.multiline === event.data.multiline"); + assert_equals(obj.global, e.data.global, "canon.global === event.data.global"); + assert_equals(obj.ignoreCase, e.data.ignoreCase, "canon.ignoreCase === event.data.ignoreCase"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Value 'null' is cloned"); + t.id = 12; + worker.onmessage = t.step_func(function(e) {assert_equals(null, e.data, "null === event.data"); t.done(); }); + t.step(function() { worker.postMessage(null);}); + }, + function() { + var t = async_test("Value 'undefined' is cloned"); + t.id = 13; + worker.onmessage = t.step_func(function(e) {assert_equals(undefined, e.data, "undefined === event.data"); t.done(); }); + t.step(function() { worker.postMessage(undefined);}); + }, + function() { + var t = async_test("Object properties are cloned"); + t.id = 14; + var obj; + t.step(function() { + obj= {}; + obj.a = "test"; + obj.b = 2; + obj["child"] = 3; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_equals(obj.a, e.data.a, "canon.a === event.data.a"); + assert_equals(obj.b, e.data.b, "canon.b === event.data.b"); + assert_equals(obj.child, e.data.child, "canon.child === e.data.child"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Prototype chains are not walked."); + t.id = 15; + function Custom() { + this.a = "hello"; + } + + var obj; + t.step(function() { + Object.defineProperty(Custom.prototype, "b", { enumerable: true, value: 100 }); + obj = new Custom(); + }); + worker.onmessage = t.step_func(function(e) { + assert_not_equals(obj.constructor, e.data.constructor, "canon.constructor !== event.data.constructor"); + assert_equals(Object, e.data.constructor, "Object === e.data.constructor"); + assert_equals(obj.a, e.data.a, "canon.a === e.data.a"); + assert_equals(undefined, e.data.b, "undefined === e.data.b"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Property descriptors of Objects are not cloned"); + t.id = 16; + var obj; + t.step(function() { + obj = {}; + Object.defineProperty(obj, "a", { enumerable: true, writable: false, value: 100 }); + }); + worker.onmessage = t.step_func(function(e) { + var des = Object.getOwnPropertyDescriptor(e.data, "a"); + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_true(des.writable, "Descriptor is writable"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Cycles are preserved in Objects"); + t.id = 17; + var obj; + t.step(function() { + obj = {}; + obj.a = obj; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_equals(e.data, e.data.a, "cycle is preserved"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Identity of duplicates is preserved"); + t.id = 18; + var ref; + var obj; + t.step(function() { + ref = {}; + ref.called = 0; + Object.defineProperty(ref, "child", {get: function(){this.called++;}, enumerable: true}); + + obj = {a:ref, b:ref}; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_equals(e.data.b.called, 0, "e.data.b.called === 0"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Property order is preserved"); + t.id = 19; + var obj; + t.step(function() { + obj = { "a": "hello", "b": "w3c", "c": "and world" }; + obj["a"] = "named1"; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + var canonNames = Object.getOwnPropertyNames(obj); + var testNames = Object.getOwnPropertyNames(e.data); + for (var i in canonNames) { + assert_equals(canonNames[i], testNames[i], "canonProperty["+i+"] === dataProperty["+i+"]"); + } + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Enumerable properties of Arrays are cloned"); + t.id = 20; + var obj; + t.step(function() { + obj = [0,1]; + obj["a"] = "named1"; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_equals(e.data["a"], "named1", "e.data[\"a\"] === \"named1\""); + assert_equals(e.data[0], 0, "e.data[0] === 0"); + assert_equals(e.data[1], 1, "e.data[1] === 1"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Property descriptors of Arrays are not cloned"); + t.id = 21; + var obj; + t.step(function() { + obj = [0, 1]; + Object.defineProperty(obj, "2", { enumerable: true, writable: false, value: 100 }); + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_equals(e.data[0], 0, "e.data[0] === 0"); + assert_equals(e.data[1], 1, "e.data[1] === 1"); + var des = Object.getOwnPropertyDescriptor(e.data, "2"); + assert_true(des.writable, "Descriptor is writable"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Cycles are preserved in Arrays"); + t.id = 22; + var obj; + t.step(function() { + obj = [0,1]; + obj[2] = obj; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_equals(e.data[0], 0, "e.data[0] === 0"); + assert_equals(e.data[1], 1, "e.data[1] === 1"); + assert_equals(e.data[2], e.data, "e.data[2] === e.data"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + + function() { + var t = async_test("ImageData object can be cloned"); + t.id = 23; + var obj; + t.step(function() { + var canvas = document.createElement("canvas"); + canvas.width = 40; + canvas.height = 40; + var context = canvas.getContext('2d'); + obj = context.createImageData(40, 40); + assert_true(window.hasOwnProperty("ImageData"), "ImageData constructor must be present"); + assert_true(obj instanceof ImageData, "ImageData must be returned by .createImageData"); + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_not_equals(obj, e.data, "cloned object should be a new instance of ImageData"); + assert_equals(obj.width, e.data.width, "canon.width === e.data.width"); + assert_equals(obj.height, e.data.height, "canon.height === e.data.height"); + assert_array_equals(obj.data, e.data.data, "data arrays are the same"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("ImageData expandos are not cloned"); + t.id = 24; + var obj; + t.step(function() { + var canvas = document.createElement("canvas"); + canvas.width = 40; + canvas.height = 40; + var context = canvas.getContext('2d'); + obj = context.createImageData(40, 40); + assert_true(window.hasOwnProperty("ImageData"), "ImageData constructor must be present"); + assert_true(obj instanceof ImageData, "ImageData must be returned by .createImageData"); + obj.foo = "bar"; + }); + worker.onmessage = t.step_func(function(e) { + assert_equals(obj.constructor, e.data.constructor, "canon.constructor === event.data.constructor"); + assert_not_equals(obj, e.data, "cloned object should be a new instance of ImageData"); + assert_equals(obj.width, e.data.width, "canon.width === e.data.width"); + assert_equals(obj.height, e.data.height, "canon.height === e.data.height"); + assert_array_equals(obj.data, e.data.data, "data arrays are the same"); + assert_equals(undefined, e.data.foo, "Expando is lost (undefined === e.data.foo)"); + t.done(); + }); + t.step(function() { worker.postMessage(obj);}); + }, + function() { + var t = async_test("Window objects cannot be cloned"); + t.id = 25; + worker.onmessage = function() {}; //no op because exception should be thrown. + t.step(function() { + assert_true(DOMException.hasOwnProperty('DATA_CLONE_ERR'), "DOMException.DATA_CLONE_ERR is present"); + assert_equals(DOMException.DATA_CLONE_ERR, 25, "DOMException.DATA_CLONE_ERR === 25"); + assert_throws('DATA_CLONE_ERR', function() {worker.postMessage(window)}); + }); + t.done(); + }, + function() { + var t = async_test("Document objects cannot be cloned"); + t.id = 26; + worker.onmessage = function() {}; //no op because exception should be thrown. + t.step(function() { + assert_true(DOMException.hasOwnProperty('DATA_CLONE_ERR'), "DOMException.DATA_CLONE_ERR is present"); + assert_equals(DOMException.DATA_CLONE_ERR, 25, "DOMException.DATA_CLONE_ERR === 25"); + assert_throws('DATA_CLONE_ERR', function() {worker.postMessage(document)}); + }); + t.done(); + } + ]; + }, {explicit_done:true}); + + //Callback for result_callback + //queues the next test in the array testCollection + //serves to make test execution sequential from the async worker callbacks + //alternatively, we would have to create a worker for each test + function testFinished(test) { + if(test.id < testCollection.length - 1) { + //queue the function so that stack remains shallow + queue(testCollection[test.id+1]); + } else { + //when the last test has run, explicitly end test suite + done(); + } + } + function queue(func) { + setTimeout(func, 10); + } + + add_result_callback(testFinished); + //start the first test manually + queue(testCollection[0]); + + + + + </script> +</body> +</html> diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/xhtml5/colgroup_valign_bottom.xhtml b/testing/web-platform/tests/old-tests/submission/Microsoft/xhtml5/colgroup_valign_bottom.xhtml Binary files differnew file mode 100644 index 000000000..84da6dbf6 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/xhtml5/colgroup_valign_bottom.xhtml diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/xhtml5/colgroup_valign_top.xhtml b/testing/web-platform/tests/old-tests/submission/Microsoft/xhtml5/colgroup_valign_top.xhtml Binary files differnew file mode 100644 index 000000000..83b8c62e5 --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/Microsoft/xhtml5/colgroup_valign_top.xhtml 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("iframe script #1"));'></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 diff --git a/testing/web-platform/tests/old-tests/submission/migration.txt b/testing/web-platform/tests/old-tests/submission/migration.txt new file mode 100644 index 000000000..9480d754a --- /dev/null +++ b/testing/web-platform/tests/old-tests/submission/migration.txt @@ -0,0 +1,26 @@ + +TODO: + + Google (not sure how much of that is what's already in) + Infraware (these come bundled with resources and require lots of rewriting) + Intel (need to check how much overlap there is with existing stuff) + Microsoft (lots of things, need to check overlap) + Ms2ger (Ms2ger is doing those) + Opera (split into multiple PRs) + TestTWF_Paris + W3C + +DONE: + + Apple + AryehGregor + Baidu + Comcast + DavidCarlisle + html5bidi + MathiasBynens + PhilipTaylor + MOSQUITO + Mozilla + WebKit +
\ No newline at end of file |