| Index: third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-denied.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-denied.html b/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-denied.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2c646594248acfd4e6cd476d479405d057f88ccb
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-denied.html
|
| @@ -0,0 +1,17 @@
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.addOriginAccessWhitelistEntry(location.origin, location.protocol, '', false);
|
| +}
|
| +
|
| +var otherOrigin = new URL(document.URL);
|
| +otherOrigin.port = otherOrigin.port ? otherOrigin.port ^ 0xFFFF : 1337;
|
| +otherOrigin = otherOrigin.href;
|
| +
|
| +try {
|
| + history.pushState(null, null, otherOrigin);
|
| + document.write("FAIL: pushState to different origin succeeded.");
|
| +} catch(e) {
|
| + document.write("PASS: pushState to different origin was blocked.");
|
| +}
|
| +</script>
|
|
|