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

Unified Diff: LayoutTests/inspector/profiler/temp-storage-cleaner.html

Issue 705063004: DevTools: Promisify WebInspector.TempFile (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: teste were fixed Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/profiler/temp-storage-cleaner.html
diff --git a/LayoutTests/inspector/profiler/temp-storage-cleaner.html b/LayoutTests/inspector/profiler/temp-storage-cleaner.html
index 57e67743345587516629a45797cdd30ace86ad74..7863a00653547b6985f34844c823692dac5f5ecc 100644
--- a/LayoutTests/inspector/profiler/temp-storage-cleaner.html
+++ b/LayoutTests/inspector/profiler/temp-storage-cleaner.html
@@ -5,13 +5,18 @@
function test()
{
- var cleaner = new WebInspector.TempStorageCleaner();
- function finish()
- {
- InspectorTest.addResult("PASSED: we got a call from TempStorageCleaner that it had done the job.");
- InspectorTest.completeTest();
- }
- cleaner.ensureStorageCleared(finish);
+ InspectorTest.preloadPanel("timeline");
+ WebInspector.TempFile.ensureTempStorageCleared()
+ .then(function finish()
+ {
+ InspectorTest.addResult("PASSED: we got a call from TempStorageCleaner that it had done the job.");
+ InspectorTest.completeTest();
+ })
+ .catch(function(e)
yurys 2014/11/12 10:29:06 just pass it as second argument to "then" above
+ {
+ InspectorTest.addResult("FAILED: we got a rejection: " + e);
+ InspectorTest.completeTest();
+ });
}
</script>

Powered by Google App Engine
This is Rietveld 408576698