Index: third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-unique-origin-denied.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-unique-origin-denied.html b/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-unique-origin-denied.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c89da59223d77cb18a7505243720c5072079eb61 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-whitelisted-at-unique-origin-denied.html |
@@ -0,0 +1,14 @@ |
+<meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts"> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script> |
+test(function () { |
+ testRunner.addOriginAccessWhitelistEntry(location.origin, location.protocol, '', false); |
+}, 'testRunner.addOriginAccessWhitelistEntry is required for this test'); |
+ |
+test(function () { |
+ assert_throws('SecurityError', function () { |
+ history.pushState(null, null, document.URL); |
+ }); |
+}, 'pushState at unique origin should fail with SecurityError (even with whitelisted origins)'); |
+</script> |