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

Side by Side Diff: test/inspector/debugger/script-parsed-for-runtime-evaluate.js

Issue 2499273003: [inspector] introduced Script::TYPE_INSPECTOR (Closed)
Patch Set: rebased Created 4 years, 1 month 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
« no previous file with comments | « src/objects.h ('k') | test/inspector/debugger/script-parsed-for-runtime-evaluate-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 print("Checks that inspector reports script compiled in Runtime.evaluate," +
6 "Runtime.callFunctionOn and Runtime.compileScript");
7
8 Promise.prototype.thenLog = function log(message) {
9 return this.then(() => InspectorTest.log(message));
10 }
11
12 var objectId;
13 Protocol.Runtime.enable();
14 Protocol.Debugger.enable()
15 .then(() => Protocol.Debugger.onScriptParsed(InspectorTest.logMessage))
16 .then(() => Protocol.Debugger.onScriptFailedToParse(InspectorTest.logMessage))
17
18 .thenLog('Runtime.evaluate with valid expression')
19 .then(() => Protocol.Runtime.evaluate({
20 expression: "({})//# sourceURL=evaluate.js"}))
21 .then(msg => objectId = msg.result.result.objectId)
22
23 .thenLog('Runtime.evaluate with syntax error')
24 .then(() => Protocol.Runtime.evaluate({
25 expression: "}//# sourceURL=evaluate-syntax-error.js"}))
26
27 .thenLog('Runtime.callFunctionOn with valid functionDeclaration')
28 .then(() => Protocol.Runtime.callFunctionOn({ objectId: objectId,
29 functionDeclaration: "function foo(){}"}))
30
31 .thenLog('Runtime.callFunctionOn with syntax error')
32 .then(() => Protocol.Runtime.callFunctionOn({ objectId: objectId,
33 functionDeclaration: "}"}))
34
35 .thenLog('Runtime.compileScript with valid expression')
36 .then(() => Protocol.Runtime.compileScript({ expression: "({})",
37 sourceURL: "compile-script.js", persistScript: true }))
38
39 .thenLog('Runtime.compileScript with syntax error')
40 .then(() => Protocol.Runtime.compileScript({ expression: "}",
41 sourceURL: "compile-script-syntax-error.js", persistScript: true }))
42
43 .thenLog('Runtime.compileScript persistScript: false (should be no script even ts)')
44 .then(() => Protocol.Runtime.compileScript({ expression: "({})",
45 sourceURL: "compile-script-syntax-error.js", persistScript: false }))
46 .then(() => Protocol.Runtime.compileScript({ expression: "}",
47 sourceURL: "compile-script-syntax-error.js", persistScript: false }))
48
49 .then(InspectorTest.completeTest);
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/inspector/debugger/script-parsed-for-runtime-evaluate-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698