Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / permissionclient / storage-permission-detached.html
blobc656448f5a2c531603a8298fe9885ecf79f1b20e
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
8 description("Detaching a frame should bypass it's cached permissionclient state in StorageAreaProxy.");
10 if (window.testRunner && testRunner.setStorageAllowed)
11 testRunner.setStorageAllowed(true);
13 var frame, storage;
14 window.onload = function () {
15 frame = document.querySelector('iframe');
16 storage = frame.contentWindow.localStorage;
17 frame.parentElement.removeChild(frame);
18 shouldThrow("storage.length");
19 shouldThrow("storage.getItem('foo')");
20 shouldThrow("storage.setItem('foo', 'bar')");
21 shouldThrow("storage.key(0)");
22 shouldThrow("storage.clear()");
23 finishJSTest();
25 </script>
26 </head>
27 <body>
28 <iframe srcdoc=""></iframe>
29 </body>
30 </html>