| <script src="../../../resources/js-test-pre.js"></script> |
| testRunner.waitUntilDone(); |
| location.href = "../../resources/storage-close-idle-localstorage-databases-immediately.html"; |
| testRunner.setCacheModel(0); // WebCacheModelDocumentViewer. |
| // Test to make sure the storage values don't change after the database is closed. |
| if ("localStorage" in window) { |
| var loadCount = window.sessionStorage['testPageLoadCount']; |
| if (loadCount !== undefined) |
| window.sessionStorage['testPageLoadCount'] = loadCount; |
| window.localStorage.clear(); |
| window.localStorage['foo'] = 'FOO'; |
| window.localStorage['bar'] = 'BAR'; |
| setTimeout("loadNextPage()", 0); |
| // Test if we still have the right values. |
| if (window.localStorage['foo'] === 'FOO') |
| if (window.localStorage['bar'] === 'BAR') |
| window.sessionStorage.removeItem('testPageLoadCount'); |
| window.testRunner.notifyDone(); |
| <body onload="runTest();"> |