diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated')
12 files changed, 156 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-1.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-1.html new file mode 100644 index 000000000..c762ece3b --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-1.html @@ -0,0 +1,7 @@ +<!doctype html> +<script> +opener.history_length = history.length; +</script> +<a onclick="location = 'manual_click_assign_during_load-2.html'; return false;" href>Click Here</a> +<p>Filler image to keep the page loading:</p> +<img src="/images/smiley.png?pipe=trickle(20:d1:r2)"> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-2.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-2.html new file mode 100644 index 000000000..1bf7f41e0 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-2.html @@ -0,0 +1,7 @@ +<!doctype html> +<p>This window should close itself and the test result appear in the original window +<script> +onload = function() { + setTimeout(function() {opener.do_test(history.length); window.close();}, 100); +} +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-manual.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-manual.html new file mode 100644 index 000000000..4f2555c5e --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_assign_during_load-manual.html @@ -0,0 +1,17 @@ +<!doctype html> +<title>Assignment to location with click during load</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<p>The popup blocker must be disabled for this test</p> +<div id="log"></div> +<script> +setup({timeout:3600000}); +var t = async_test(undefined, {timeout:3600000}); +var win = window.open("manual_click_assign_during_load-1.html"); + +var history_length; +do_test = t.step_func(function(new_length) { + assert_equals(new_length, history_length + 1); + t.done(); +}); +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-1.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-1.html new file mode 100644 index 000000000..e9d03e936 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-1.html @@ -0,0 +1,10 @@ +<!doctype html> +<script> +opener.history_length = history.length; +</script> +<a onclick="location.replace('manual_click_location_replace_during_load-2.html'); return false;" href>Click Here</a> +<p>Filler image to keep the page loading:</p> +<img> +<script> +document.images[0].src = "/images/smiley.png?pipe=trickle(20:d1:r2)&random=" + Math.random(); +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-2.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-2.html new file mode 100644 index 000000000..1bf7f41e0 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-2.html @@ -0,0 +1,7 @@ +<!doctype html> +<p>This window should close itself and the test result appear in the original window +<script> +onload = function() { + setTimeout(function() {opener.do_test(history.length); window.close();}, 100); +} +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-manual.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-manual.html new file mode 100644 index 000000000..43af1b1d3 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_location_replace_during_load-manual.html @@ -0,0 +1,17 @@ +<!doctype html> +<title>location.replace with click during load</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<p>The popup blocker must be disabled for this test</p> +<div id="log"></div> +<script> +setup({timeout:3600000}); +var t = async_test(undefined, {timeout:3600000}); +var win = window.open("manual_click_location_replace_during_load-1.html"); + +var history_length; +do_test = t.step_func(function(new_length) { + assert_equals(new_length, history_length); + t.done(); +}); +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_replace_during_load-manual.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_replace_during_load-manual.html new file mode 100644 index 000000000..3507222ca --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_click_replace_during_load-manual.html @@ -0,0 +1,17 @@ +<!doctype html> +<title>Assignment to location with click during load</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<p>The popup blocker must be disabled for this test</p> +<div id="log"></div> +<script> +setup({timeout:3600000}); +var t = async_test(undefined, {timeout:3600000}); +var win = window.open("manual_click_replace_during_load-1.html"); + +var history_length; +do_test = t.step_func(function(new_length) { + assert_equals(new_length, history_length); + t.done(); +}); +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-1.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-1.html new file mode 100644 index 000000000..08f7e2dd6 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-1.html @@ -0,0 +1,9 @@ +<!doctype html> +<script> +opener.history_length = history.length; +</script> +<form onsubmit="location = 'manual_form_submit_assign_during_load-2.html'; return false;"> +<input type=submit value="Click Me"> +</form> +<p>Filler image to keep the page loading:</p> +<img src="/images/smiley.png?pipe=trickle(20:d1:r2)"> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-2.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-2.html new file mode 100644 index 000000000..1bf7f41e0 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-2.html @@ -0,0 +1,7 @@ +<!doctype html> +<p>This window should close itself and the test result appear in the original window +<script> +onload = function() { + setTimeout(function() {opener.do_test(history.length); window.close();}, 100); +} +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-manual.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-manual.html new file mode 100644 index 000000000..df6487407 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/manual_form_submit_assign_during_load-manual.html @@ -0,0 +1,17 @@ +<!doctype html> +<title>Assignment to location with form submit during load</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<p>The popup blocker must be disabled for this test</p> +<div id="log"></div> +<script> +setup({timeout:3600000}); +var t = async_test(undefined, {timeout:3600000}); +var win = window.open("manual_form_submit_assign_during_load-1.html"); + +var history_length; +do_test = t.step_func(function(new_length) { + assert_equals(new_length, history_length + 1); + t.done(); +}); +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/reload_in_resize-1.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/reload_in_resize-1.html new file mode 100644 index 000000000..05b44f4c4 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/reload_in_resize-1.html @@ -0,0 +1,15 @@ +<!doctype html> +<p>Resize this window. FAIL if the window doesn't close shortly afterwards.</p> +<script> +onload = opener.t.step_func(function() { + opener.load_count++; + if (opener.load_count > 1) { + opener.do_test(); + } +}) + +onresize = opener.t.step_func(function() { + opener.flag_resized(); + location.reload(); +}); +</script> diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/reload_in_resize-manual.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/reload_in_resize-manual.html new file mode 100644 index 000000000..1991cee8a --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/non-automated/reload_in_resize-manual.html @@ -0,0 +1,26 @@ +<!doctype html> +<title>Reload called from resize event</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<p>Resize the popup window. That window should then close and the result be presented here. If that window doesn't close after resize that's a FAIL.</p> +<div id="log"></div> +<script> +setup({timeout:3600000}) +var t = async_test(undefined, {timeout:3600000}); +var load_count = 0; +var resized = false; +var win = window.open("reload_in_resize-1.html") + +flag_resized = t.step_func(function() { + resized = true; + setTimeout(do_test, 1000); +}); + +do_test = t.step_func(function() { + win.close(); + assert_true(resized, "Resize event happened"); + assert_equals(load_count, 1, "Number of load events"); + t.done(); +}); +</script> + |