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 |
deleted file mode 100644 |
index 0ad3d5ebd72e27554d71a1448fd1f7a724fa5be0..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-async.html |
+++ /dev/null |
@@ -1,76 +0,0 @@ |
-<html> |
-<head> |
-<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> |
-<script> |
- |
-function createPromiseAndScheduleResolve() |
-{ |
- var resolveCallback; |
- var promise = new Promise((resolve) => resolveCallback = resolve); |
- setTimeout(resolveCallback.bind(null, { a : 239 }), 0); |
- return promise; |
-} |
- |
-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) => dumpResult(result.result)) |
- .then(() => next()); |
- }, |
- |
- function testRejectedPromise(next) |
- { |
- InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "Promise.reject(239)", awaitPromise: true }) |
- .then((result) => dumpResult(result.result)) |
- .then(() => next()); |
- }, |
- |
- function testPrimitiveValueInsteadOfPromise(next) |
- { |
- InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "true", awaitPromise: true }) |
- .then((result) => InspectorTest.logObject(result.error)) |
- .then(() => next()); |
- }, |
- |
- function testObjectInsteadOfPromise(next) |
- { |
- InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "({})", awaitPromise: true }) |
- .then((result) => InspectorTest.logObject(result.error)) |
- .then(() => next()); |
- }, |
- |
- function testPendingPromise(next) |
- { |
- InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "createPromiseAndScheduleResolve()", awaitPromise: true, returnByValue: true }) |
- .then((result) => dumpResult(result.result)) |
- .then(() => next()); |
- }, |
- |
- function testExceptionInEvaluate(next) |
- { |
- InspectorTest.sendCommandPromise("Runtime.evaluate", { expression: "throw 239", awaitPromise: true }) |
- .then((result) => dumpResult(result.result)) |
- .then(() => next()); |
- } |
- ]); |
-} |
-</script> |
-</head> |
-<body onLoad="runTest();"> |
-Tests that Runtime.evaluate works with awaitPromise flag. |
-</body> |
-</html> |
- |