Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var cleaner = new WebInspector.TempStorageCleaner(); | 8 InspectorTest.preloadPanel("timeline"); |
| 9 function finish() | 9 WebInspector.TempFile.ensureTempStorageCleared() |
| 10 { | 10 .then(function finish() |
| 11 InspectorTest.addResult("PASSED: we got a call from TempStorageCleaner t hat it had done the job."); | 11 { |
| 12 InspectorTest.completeTest(); | 12 InspectorTest.addResult("PASSED: we got a call from TempStorageClean er that it had done the job."); |
| 13 } | 13 InspectorTest.completeTest(); |
| 14 cleaner.ensureStorageCleared(finish); | 14 }) |
| 15 .catch(function(e) | |
|
yurys
2014/11/12 10:29:06
just pass it as second argument to "then" above
| |
| 16 { | |
| 17 InspectorTest.addResult("FAILED: we got a rejection: " + e); | |
| 18 InspectorTest.completeTest(); | |
| 19 }); | |
| 15 } | 20 } |
| 16 | 21 |
| 17 </script> | 22 </script> |
| 18 </head> | 23 </head> |
| 19 | 24 |
| 20 <body onload="runTest()"> | 25 <body onload="runTest()"> |
| 21 <p> | 26 <p> |
| 22 This test checks TempStorageCleaner which is used in HeapProfiler. | 27 This test checks TempStorageCleaner which is used in HeapProfiler. |
| 23 </p> | 28 </p> |
| 24 | 29 |
| 25 </body> | 30 </body> |
| 26 </html> | 31 </html> |
| OLD | NEW |