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

Side by Side Diff: LayoutTests/fast/frames/resources/sandboxed-iframe-storage-disallowed.html

Issue 23163004: Improve 'document.cookie' access check exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 function debug(msg) 7 function debug(msg)
8 { 8 {
9 var span = document.createElement("span"); 9 var span = document.createElement("span");
10 document.getElementById("console").appendChild(span); 10 document.getElementById("console").appendChild(span);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 else 50 else
51 testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception " : _ev) + ". Was " + _av + "."); 51 testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception " : _ev) + ". Was " + _av + ".");
52 } 52 }
53 </script> 53 </script>
54 <script> 54 <script>
55 55
56 window.onload = function() { 56 window.onload = function() {
57 shouldThrow("window.openDatabase('SandboxedIframeStorageDisallowed', '1.0', '', 1)"); 57 shouldThrow("window.openDatabase('SandboxedIframeStorageDisallowed', '1.0', '', 1)");
58 shouldThrow("window.localStorage", '"SecurityError: Access to \'localStorage \' is denied for this document. The document is sandboxed and lacks the \'allow- same-origin\' flag."'); 58 shouldThrow("window.localStorage", '"SecurityError: Access to \'localStorage \' is denied for this document. The document is sandboxed and lacks the \'allow- same-origin\' flag."');
59 shouldThrow("window.sessionStorage", '"SecurityError: Access to \'sessionSto rage\' is denied for this document. The document is sandboxed and lacks the \'al low-same-origin\' flag."'); 59 shouldThrow("window.sessionStorage", '"SecurityError: Access to \'sessionSto rage\' is denied for this document. The document is sandboxed and lacks the \'al low-same-origin\' flag."');
60 shouldThrow("document.cookie",'"SecurityError: Access to \'cookie\' is denie d for this document. The document is sandboxed and lacks the \'allow-same-origin \' flag."') ;
60 } 61 }
61 62
62 </script> 63 </script>
63 </head> 64 </head>
64 <body> 65 <body>
65 <div id="console"></div> 66 <div id="console"></div>
66 </body> 67 </body>
67 </html> 68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698