Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: LayoutTests/http/tests/inspector/cache-storage/cache-entry-deletion.html

Issue 1111563006: [CacheStorage] Entry deletion and cache refresh in Inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test and comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/cache-storage/cache-entry-deletion-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="cache-storage-test.js"></script> 4 <script src="cache-storage-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var cacheStorageModel = WebInspector.ServiceWorkerCacheModel.fromTarget(WebI nspector.targetManager.mainTarget()); 8 var cacheStorageModel = WebInspector.ServiceWorkerCacheModel.fromTarget(WebI nspector.targetManager.mainTarget());
9 cacheStorageModel.enable(); 9 cacheStorageModel.enable();
10 10
11 function errorAndExit(error) 11 function errorAndExit(error)
12 { 12 {
13 if (error) 13 if (error)
14 InspectorTest.addResult(error); 14 InspectorTest.addResult(error);
15 InspectorTest.completeTest(); 15 InspectorTest.completeTest();
16 } 16 }
17 17
18 function main() 18 function main()
19 { 19 {
20 InspectorTest.clearAllCaches() 20 InspectorTest.clearAllCaches()
21 .then(InspectorTest.dumpCacheTree) 21 .then(InspectorTest.dumpCacheTree)
22 .then(InspectorTest.createCache.bind(this, "testCache1")) 22 .then(InspectorTest.createCache.bind(this, "testCache1"))
23 .then(InspectorTest.createCache.bind(this, "testCache2")) 23 .then(InspectorTest.createCache.bind(this, "testCache2"))
24 .then(InspectorTest.dumpCacheTree)
25 .then(InspectorTest.addCacheEntry.bind(this, "testCache1", "http://f ake.request.com/1", "OK")) 24 .then(InspectorTest.addCacheEntry.bind(this, "testCache1", "http://f ake.request.com/1", "OK"))
26 .then(InspectorTest.addCacheEntry.bind(this, "testCache1", "http://f ake.request.com/2", "Not Found")) 25 .then(InspectorTest.addCacheEntry.bind(this, "testCache1", "http://f ake.request.com/2", "Not Found"))
27 .then(InspectorTest.addCacheEntry.bind(this, "testCache2", "http://f ake.request2.com/1", "OK")) 26 .then(InspectorTest.addCacheEntry.bind(this, "testCache2", "http://f ake.request2.com/1", "OK"))
28 .then(InspectorTest.addCacheEntry.bind(this, "testCache2", "http://f ake.request2.com/2", "Not Found")) 27 .then(InspectorTest.addCacheEntry.bind(this, "testCache2", "http://f ake.request2.com/2", "Not Found"))
29 .then(InspectorTest.dumpCacheTree) 28 .then(InspectorTest.dumpCacheTree)
30 .then(InspectorTest.deleteCache.bind(this, "testCache1")) 29 .then(InspectorTest.deleteCacheEntry.bind(this, "testCache1", "http: //fake.request.com/2"))
31 .then(InspectorTest.deleteCacheFromInspector.bind(this, "testCache2" )) 30 .then(InspectorTest.deleteCacheFromInspector.bind(this, "testCache2" , "http://fake.request2.com/2"))
32 .then(InspectorTest.dumpCacheTree) 31 .then(InspectorTest.dumpCacheTree)
33 .then(InspectorTest.clearAllCaches) 32 .then(InspectorTest.clearAllCaches)
34 .then(InspectorTest.completeTest) 33 .then(InspectorTest.completeTest)
35 .catch(errorAndExit); 34 .catch(errorAndExit);
36 } 35 }
37 36
38 InspectorTest.waitForCacheRefresh(main); 37 InspectorTest.waitForCacheRefresh(main);
39 } 38 }
40 </script> 39 </script>
41 </head> 40 </head>
42 <body onload="runTest()"> 41 <body onload="runTest()">
43 <p>Tests that cache data is correctly deleted by the inspector.</p> 42 <p>Tests that cache entry data is correctly deleted by the inspector.</p>
44 </body> 43 </body>
45 </html> 44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/cache-storage/cache-entry-deletion-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698