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

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

Issue 23135009: Improve IDB module's SecurityError messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Only IDB. Created 7 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/frames/sandboxed-iframe-storage-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } else if (typeof _av == "undefined") 48 } else if (typeof _av == "undefined")
49 testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception " : _ev) + ". Was undefined."); 49 testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception " : _ev) + ". Was undefined.");
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.indexedDB.webkitGetDatabaseNames()", '"SecurityError: Fa iled to execute \'getDatabaseNames\' on \'IDBFactory\': access to the Indexed Da tabase API is denied in this context."');
59 shouldThrow("window.indexedDB.open('foo')", '"SecurityError: Failed to execu te \'open\' on \'IDBFactory\': access to the Indexed Database API is denied in t his context."');
60 shouldThrow("window.indexedDB.deleteDatabase('foo')", '"SecurityError: Faile d to execute \'deleteDatabase\' on \'IDBFactory\': access to the Indexed Databas e API is denied in this context."');
58 shouldThrow("window.localStorage", '"SecurityError: Access to \'localStorage \' is denied for this document. The document is sandboxed and lacks the \'allow- same-origin\' flag."'); 61 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."'); 62 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."') ; 63 shouldThrow("document.cookie",'"SecurityError: Access to \'cookie\' is denie d for this document. The document is sandboxed and lacks the \'allow-same-origin \' flag."') ;
61 } 64 }
62 65
63 </script> 66 </script>
64 </head> 67 </head>
65 <body> 68 <body>
66 <div id="console"></div> 69 <div id="console"></div>
67 </body> 70 </body>
68 </html> 71 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/frames/sandboxed-iframe-storage-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698