OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script src="cache-storage-test.js"></script> |
| 5 <script> |
| 6 function test() |
| 7 { |
| 8 var cacheStorageModel = WebInspector.ServiceWorkerCacheModel.fromTarget(WebI
nspector.targetManager.mainTarget()); |
| 9 cacheStorageModel.enable(); |
| 10 |
| 11 function errorAndExit(error) |
| 12 { |
| 13 if (error) |
| 14 InspectorTest.addResult(error); |
| 15 InspectorTest.completeTest(); |
| 16 } |
| 17 |
| 18 function main() |
| 19 { |
| 20 InspectorTest.clearAllCaches() |
| 21 .then(InspectorTest.dumpCacheTree) |
| 22 .then(InspectorTest.createCache.bind(this, "testCache1")) |
| 23 .then(InspectorTest.dumpCacheTree) |
| 24 .then(InspectorTest.createCache.bind(this, "testCache2")) |
| 25 .then(InspectorTest.createCache.bind(this, "testCache3")) |
| 26 .then(InspectorTest.createCache.bind(this, "testCache4")) |
| 27 .then(InspectorTest.dumpCacheTree) |
| 28 .then(InspectorTest.clearAllCaches) |
| 29 .then(InspectorTest.completeTest) |
| 30 .catch(errorAndExit); |
| 31 } |
| 32 |
| 33 InspectorTest.waitForCacheRefresh(main); |
| 34 } |
| 35 </script> |
| 36 </head> |
| 37 <body onload="runTest()"> |
| 38 <p>Tests that cache names are correctly loaded and displayed in the inspector.</
p> |
| 39 </body> |
| 40 </html> |
OLD | NEW |