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

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

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 years, 6 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
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>
-

Powered by Google App Engine
This is Rietveld 408576698