OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../fast/js/resources/js-test-pre.js"></script> |
5 <script> | 5 <script> |
6 window.jsTestIsAsync = true; | 6 window.jsTestIsAsync = true; |
7 | 7 |
8 description("Detaching a frame should bypass it's cached permissionclien
t state in StorageAreaProxy."); | 8 description("Detaching a frame should bypass it's cached permissionclien
t state in StorageAreaProxy."); |
9 | 9 |
10 if (window.testRunner && testRunner.setStorageAllowed) | 10 if (window.testRunner && testRunner.setStorageAllowed) |
11 testRunner.setStorageAllowed(true); | 11 testRunner.setStorageAllowed(true); |
12 | 12 |
13 var frame, storage; | 13 var frame, storage; |
14 window.onload = function () { | 14 window.onload = function () { |
15 frame = document.querySelector('iframe'); | 15 frame = document.querySelector('iframe'); |
16 storage = frame.contentWindow.localStorage; | 16 storage = frame.contentWindow.localStorage; |
17 frame.parentElement.removeChild(frame); | 17 frame.parentElement.removeChild(frame); |
18 shouldThrow("storage.length"); | 18 shouldThrow("storage.length"); |
19 shouldThrow("storage.getItem('foo')"); | 19 shouldThrow("storage.getItem('foo')"); |
20 shouldThrow("storage.setItem('foo', 'bar')"); | 20 shouldThrow("storage.setItem('foo', 'bar')"); |
21 shouldThrow("storage.key(0)"); | 21 shouldThrow("storage.key(0)"); |
22 shouldThrow("storage.clear()"); | 22 shouldThrow("storage.clear()"); |
23 finishJSTest(); | 23 finishJSTest(); |
24 }; | 24 }; |
25 </script> | 25 </script> |
26 <script src="../fast/js/resources/js-test-post.js"></script> | |
27 </head> | 26 </head> |
28 <body> | 27 <body> |
29 <iframe srcdoc=""></iframe> | 28 <iframe srcdoc=""></iframe> |
30 </body> | 29 </body> |
31 </html> | 30 </html> |
OLD | NEW |