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

Unified Diff: third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html
diff --git a/third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html b/third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html
index 64a099d6b93a0cc1aa5ae419027ab29c4e4dc8df..f7da92eae8a2b1cbd0d681b05ecfc9a5101aef51 100644
--- a/third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html
+++ b/third_party/WebKit/LayoutTests/inspector/uisourcecode-revisions.html
@@ -50,10 +50,14 @@ function test()
InspectorTest.addResult("Second revision added.");
dumpUISourceCodeWithRevisions(uiSourceCode);
- uiSourceCode.revertToOriginal();
- InspectorTest.addResult("Reverted to original.");
- dumpUISourceCodeWithRevisions(uiSourceCode);
- next();
+ uiSourceCode.revertToOriginal().then(onReverted);
+
+ function onReverted()
+ {
+ InspectorTest.addResult("Reverted to original.");
+ dumpUISourceCodeWithRevisions(uiSourceCode);
+ next();
+ }
},
function testAddRevisionsRevertAndClearHistory(next)
@@ -98,16 +102,20 @@ function test()
InspectorTest.addResult("Second revision added.");
dumpUISourceCodeWithRevisions(uiSourceCode);
- uiSourceCode.history[0].revertToThis();
- InspectorTest.addResult("Reverted to previous revision.");
- dumpUISourceCodeWithRevisions(uiSourceCode);
- next();
+ uiSourceCode.history[0].revertToThis().then(onReverted);
+
+ function onReverted()
+ {
+ InspectorTest.addResult("Reverted to previous revision.");
+ dumpUISourceCodeWithRevisions(uiSourceCode);
+ next();
+ }
},
function testRequestContentAddRevisionsRevertToOriginal(next)
{
var uiSourceCode = new WebInspector.UISourceCode(createMockProject(), "url4", WebInspector.resourceTypes.Script);
- uiSourceCode.requestContent(contentReceived);
+ uiSourceCode.requestContent().then(contentReceived);
function contentReceived()
{
@@ -125,17 +133,21 @@ function test()
InspectorTest.addResult("Second revision added.");
dumpUISourceCodeWithRevisions(uiSourceCode);
- uiSourceCode.revertToOriginal();
- InspectorTest.addResult("Reverted to original.");
- dumpUISourceCodeWithRevisions(uiSourceCode);
- next();
+ uiSourceCode.revertToOriginal().then(onReverted);
+
+ function onReverted()
+ {
+ InspectorTest.addResult("Reverted to original.");
+ dumpUISourceCodeWithRevisions(uiSourceCode);
+ next();
+ }
}
},
function testRequestContentAddRevisionsRevertAndClearHistory(next)
{
var uiSourceCode = new WebInspector.UISourceCode(createMockProject(), "url5", WebInspector.resourceTypes.Script);
- uiSourceCode.requestContent(contentReceived);
+ uiSourceCode.requestContent().then(contentReceived);
function contentReceived()
{
@@ -167,7 +179,7 @@ function test()
function testRequestContentAddRevisionsRevertToPrevious(next)
{
var uiSourceCode = new WebInspector.UISourceCode(createMockProject(), "url6", WebInspector.resourceTypes.Script);
- uiSourceCode.requestContent(contentReceived);
+ uiSourceCode.requestContent().then(contentReceived);
function contentReceived()
{
@@ -185,10 +197,14 @@ function test()
InspectorTest.addResult("Second revision added.");
dumpUISourceCodeWithRevisions(uiSourceCode);
- uiSourceCode.history[0].revertToThis();
- InspectorTest.addResult("Reverted to previous revision.");
- dumpUISourceCodeWithRevisions(uiSourceCode);
- next();
+ uiSourceCode.history[0].revertToThis().then(onReverted);
+
+ function onReverted()
+ {
+ InspectorTest.addResult("Reverted to previous revision.");
+ dumpUISourceCodeWithRevisions(uiSourceCode);
+ next();
+ }
}
},
]);

Powered by Google App Engine
This is Rietveld 408576698