OLD | NEW |
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 Loading... |
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)", '"SecurityError: Failed to execute \'openDatabase\' on \'Window\': Acce
ss to the WebDatabase API is denied in this context."'); | 57 shouldThrow("window.openDatabase('SandboxedIframeStorageDisallowed', '1.0',
'', 1)", '"SecurityError: Failed to execute \'openDatabase\' on \'Window\': Acce
ss to the WebDatabase API is denied in this context."'); |
| 58 shouldThrow("window.indexedDB.webkitGetDatabaseNames()", '"SecurityError: Fa
iled to execute \'webkitGetDatabaseNames\' on \'IDBFactory\': access to the Inde
xed Database API is denied in this context."'); |
58 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."'); | 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."'); |
59 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."'); | 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."'); |
60 shouldThrow("window.localStorage", '"SecurityError: Failed to read the \'loc
alStorage\' property from \'Window\': The document is sandboxed and lacks the \'
allow-same-origin\' flag."'); | 61 shouldThrow("window.localStorage", '"SecurityError: Failed to read the \'loc
alStorage\' property from \'Window\': The document is sandboxed and lacks the \'
allow-same-origin\' flag."'); |
61 shouldThrow("window.sessionStorage", '"SecurityError: Failed to read the \'s
essionStorage\' property from \'Window\': The document is sandboxed and lacks th
e \'allow-same-origin\' flag."'); | 62 shouldThrow("window.sessionStorage", '"SecurityError: Failed to read the \'s
essionStorage\' property from \'Window\': The document is sandboxed and lacks th
e \'allow-same-origin\' flag."'); |
62 shouldThrow("document.cookie",'"SecurityError: Failed to read the \'cookie\'
property from \'Document\': The document is sandboxed and lacks the \'allow-sam
e-origin\' flag."') ; | 63 shouldThrow("document.cookie",'"SecurityError: Failed to read the \'cookie\'
property from \'Document\': The document is sandboxed and lacks the \'allow-sam
e-origin\' flag."') ; |
63 } | 64 } |
64 | 65 |
65 </script> | 66 </script> |
66 </head> | 67 </head> |
67 <body> | 68 <body> |
68 <div id="console"></div> | 69 <div id="console"></div> |
69 </body> | 70 </body> |
70 </html> | 71 </html> |
OLD | NEW |