ddkilzer@apple.com | 38ee48c | 2019-10-11 19:14:08 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <script> |
| 5 | function debug(str) { |
| 6 | var c = document.getElementById("console") |
| 7 | c.innerHTML += (str + "<br>") |
| 8 | } |
| 9 | |
| 10 | if (window.testRunner) { |
| 11 | testRunner.dumpAsText(); |
| 12 | testRunner.waitUntilDone(); |
| 13 | } |
| 14 | |
| 15 | function runTest() { |
| 16 | testRunner.setUseITPDatabase(true); |
| 17 | var testDiv = document.getElementById("test"); |
| 18 | var testFrame = document.createElement("iframe"); |
| 19 | testDiv.appendChild(testFrame); |
| 20 | var testFrameDocument = testFrame.contentDocument; |
| 21 | testFrame.outerHTML = testFrameDocument; |
| 22 | |
| 23 | testFrameDocument.requestStorageAccess(); |
| 24 | |
| 25 | debug("SUCCESS: Did not crash.") |
| 26 | if (window.testRunner) |
| 27 | testRunner.notifyDone(); |
| 28 | } |
| 29 | </script> |
| 30 | </head> |
| 31 | <body onload="runTest()"> |
| 32 | <div id="test"> |
| 33 | <p>Test that requesting storage access API on a detached frame doesn't crash.</p> |
| 34 | </div> |
| 35 | <pre id="console"></pre> |
| 36 | </body> |
| 37 | </html> |