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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html

Issue 2249743006: [DevTools] Fill ExceptionDetails with more details, unify usage across protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser test Created 4 years, 4 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-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);
- }
}
]);
}

Powered by Google App Engine
This is Rietveld 408576698