diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/resources/child-navigates-parent-cross-origin-inner.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/resources/child-navigates-parent-cross-origin-inner.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/resources/child-navigates-parent-cross-origin-inner.html b/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/resources/child-navigates-parent-cross-origin-inner.html new file mode 100644 index 0000000000..72b92c8061 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/resources/child-navigates-parent-cross-origin-inner.html @@ -0,0 +1,20 @@ +<!doctype html> +<script> +const params = new URL(window.location).searchParams; +const property = params.get("property"); + +try { + if (property === null) { + parent.location = "foo"; + } else if (property === "reload") { + parent.location.reload(); + } else if (property === "replace") { + parent.location.replace("foo"); + } else { + parent.location[property] = "foo"; + } + parent.parent.postMessage("success", "*"); +} catch (e) { + parent.parent.postMessage(`error: ${e.name}`, "*"); +} +</script> |