Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/navigation/pushstate-at-unique-origin-denied.php

Issue 1835463002: Stop supporting invalid CSP directives in meta tags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove service worker extendable event test Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts"> 1 <?php
2 header("Content-Security-Policy: sandbox allow-scripts");
3 ?>
2 <script src="../resources/testharness.js"></script> 4 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 5 <script src="../resources/testharnessreport.js"></script>
4 <script> 6 <script>
5 test(function () { 7 test(function () {
6 assert_throws('SecurityError', function () { 8 assert_throws('SecurityError', function () {
7 history.pushState(null, null, document.URL + "/path"); 9 history.pushState(null, null, document.URL + "/path");
8 }); 10 });
9 }, 'pushState to a new path in unique origin should fail with SecurityError'); 11 }, 'pushState to a new path in unique origin should fail with SecurityError');
10 test(function () { 12 test(function () {
11 try { 13 try {
12 history.pushState(null, null, document.URL + "#hash"); 14 history.pushState(null, null, document.URL + "#hash");
13 done(); 15 done();
14 } catch (e) { 16 } catch (e) {
15 assert_unreached("pushState to a new hash should not fail."); 17 assert_unreached("pushState to a new hash should not fail.");
16 } 18 }
17 }, 'pushState to new hash in unique origin should not fail with SecurityError'); 19 }, 'pushState to new hash in unique origin should not fail with SecurityError');
18 </script> 20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698