Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html |
index b970f56d85f8b63fcd519e8c7395a7385342388c..892073f25c97c05bc13fa4e23df5f0b91f997a35 100644 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html |
@@ -13,18 +13,28 @@ function createPromiseAndScheduleResolve() |
function test() |
{ |
+ function dumpResult(result) |
+ { |
+ if (result.exceptionDetails) { |
+ result.exceptionDetails.scriptId = ""; |
+ result.exceptionDetails.exceptionId = 0; |
+ result.exceptionDetails.exception.objectId = 0; |
+ } |
+ InspectorTest.logObject(result); |
+ } |
+ |
InspectorTest.runTestSuite([ |
function testResolvedPromise(next) |
{ |
InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "Promise.resolve(239)", awaitPromise: true, generatePreview: true }) |
- .then((result) => InspectorTest.logObject(result.result)) |
+ .then((result) => dumpResult(result.result)) |
.then(() => next()); |
}, |
function testRejectedPromise(next) |
{ |
InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "Promise.reject(239)", awaitPromise: true }) |
- .then((result) => InspectorTest.logObject(result.result)) |
+ .then((result) => dumpResult(result.result)) |
.then(() => next()); |
}, |
@@ -45,7 +55,7 @@ function test() |
function testPendingPromise(next) |
{ |
InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "createPromiseAndScheduleResolve()", awaitPromise: true, returnByValue: true }) |
- .then((result) => InspectorTest.logObject(result.result)) |
+ .then((result) => dumpResult(result.result)) |
.then(() => next()); |
}, |
@@ -54,12 +64,6 @@ function test() |
InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "throw 239", awaitPromise: true }) |
.then((result) => dumpResult(result.result)) |
.then(() => next()); |
- |
- function dumpResult(result) |
- { |
- result.exceptionDetails.scriptId = ""; |
- InspectorTest.logObject(result); |
- } |
} |
]); |
} |