Index: third_party/WebKit/LayoutTests/http/tests/inspector/network/json-preview.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/json-preview.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/json-preview.html |
index dc20622a8a74a2b7a7984414e25a72e8dbd1de20..576ae9322fac1868e345c3bf721ff218f56ad9db 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/json-preview.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/json-preview.html |
@@ -16,16 +16,20 @@ function test() |
function testPreviewer(request) |
{ |
- var previewView = new WebInspector.RequestPreviewView(request, null); |
- var previewer = previewView._createPreviewView(); |
- InspectorTest.addResult("Its previewer is the JSON previewer: " + (previewer && previewer instanceof WebInspector.JSONView)); |
+ return new Promise(function(done) { |
+ var previewView = new WebInspector.RequestPreviewView(request, null); |
+ |
+ previewView._createPreviewView(function(previewer) { |
+ InspectorTest.addResult("Its previewer is the JSON previewer: " + (previewer && previewer instanceof WebInspector.JSONView)); |
+ done(); |
+ }); |
+ }); |
} |
function testType(contentType, callback) |
{ |
var request = createNetworkRequestWithJSONMIMEType(contentType); |
- testPreviewer(request); |
- callback(); |
+ testPreviewer(request).then(callback); |
} |
InspectorTest.runTestSuite([ |
function test1(next) |