diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated')
6 files changed, 48 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001-1.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001-1.html new file mode 100644 index 0000000000..7dd48b41c2 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001-1.html @@ -0,0 +1,2 @@ +<!doctype html> +<p>Now open a new tab and navigate to <a href="001-2.html">001-2</a></p> diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001-2.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001-2.html new file mode 100644 index 0000000000..b1413861a3 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001-2.html @@ -0,0 +1,16 @@ +<!doctype html> +<script> +var result = "FAIL"; +if (opener != null) { + result = "FAIL (did you open this page in a new tab?)"; +} else { + var w = window.open("", "test_name"); + if (w.location.href !== "about:blank") { + result = "FAIL (didn't open an about:blank browsing context)"; + } else { + w.close(); + result = "PASS"; + } + document.write(result); +} +</script> diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001.html new file mode 100644 index 0000000000..7b0f21ec04 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/001.html @@ -0,0 +1,3 @@ +<!doctype html> +<title>Accessing named windows from outside the unit of related browsing contexts</title> +<a href="001-1.html" target="test_name">Click here</a> diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002-1.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002-1.html new file mode 100644 index 0000000000..0e210f351b --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002-1.html @@ -0,0 +1,8 @@ +<!doctype html> +<p>Now open a new tab and navigate to <a></a></p> +<script> +href = window.location.href.replace("http://", "http://www.").replace("002-1.html", "002-2.html"); +var a = document.getElementsByTagName("a")[0]; +a.href = href; +a.textContent = href; +</script> diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002-2.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002-2.html new file mode 100644 index 0000000000..b1413861a3 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002-2.html @@ -0,0 +1,16 @@ +<!doctype html> +<script> +var result = "FAIL"; +if (opener != null) { + result = "FAIL (did you open this page in a new tab?)"; +} else { + var w = window.open("", "test_name"); + if (w.location.href !== "about:blank") { + result = "FAIL (didn't open an about:blank browsing context)"; + } else { + w.close(); + result = "PASS"; + } + document.write(result); +} +</script> diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002.html new file mode 100644 index 0000000000..b568ae8d48 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/non_automated/002.html @@ -0,0 +1,3 @@ +<!doctype html> +<title>Accessing different-origin named windows from outside the unit of related browsing contexts</title> +<a href="002-1.html" target="test_name">Click here</a> |