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

Side by Side Diff: test/inspector/runtime/run-script-async.js

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 print("Tests that Runtime.compileScript and Runtime.runScript work with awaitPro mise flag."); 5 InspectorTest.log("Tests that Runtime.compileScript and Runtime.runScript work w ith awaitPromise flag.");
6 6
7 InspectorTest.runTestSuite([ 7 InspectorTest.runTestSuite([
8 function testRunAndCompileWithoutAgentEnable(next) 8 function testRunAndCompileWithoutAgentEnable(next)
9 { 9 {
10 Protocol.Runtime.compileScript({ expression: "", sourceURL: "", persistScrip t: true }) 10 Protocol.Runtime.compileScript({ expression: "", sourceURL: "", persistScrip t: true })
11 .then((result) => InspectorTest.logMessage(result)) 11 .then((result) => InspectorTest.logMessage(result))
12 .then(() => Protocol.Runtime.runScript({ scriptId: "1" })) 12 .then(() => Protocol.Runtime.runScript({ scriptId: "1" }))
13 .then((result) => InspectorTest.logMessage(result)) 13 .then((result) => InspectorTest.logMessage(result))
14 .then(() => next()); 14 .then(() => next());
15 }, 15 },
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 function testAwaitRejectedPromise(next) 101 function testAwaitRejectedPromise(next)
102 { 102 {
103 Protocol.Runtime.enable() 103 Protocol.Runtime.enable()
104 .then(() => Protocol.Runtime.compileScript({ expression: "Promise.reject({ a:1})", sourceURL: "boo.js", persistScript: true })) 104 .then(() => Protocol.Runtime.compileScript({ expression: "Promise.reject({ a:1})", sourceURL: "boo.js", persistScript: true }))
105 .then((result) => Protocol.Runtime.runScript({ scriptId: result.result.scr iptId, awaitPromise: true, returnByValue: true })) 105 .then((result) => Protocol.Runtime.runScript({ scriptId: result.result.scr iptId, awaitPromise: true, returnByValue: true }))
106 .then((result) => InspectorTest.logMessage(result)) 106 .then((result) => InspectorTest.logMessage(result))
107 .then(() => Protocol.Runtime.disable()) 107 .then(() => Protocol.Runtime.disable())
108 .then(() => next()); 108 .then(() => next());
109 } 109 }
110 ]); 110 ]);
OLDNEW
« no previous file with comments | « test/inspector/runtime/protocol-works-with-different-locale.js ('k') | test/inspector/runtime/runtime-restore.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698