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

Side by Side Diff: test/inspector/console/let-const-with-api.js

Issue 2369753004: [inspector] added inspector test runner [part 5] (Closed)
Patch Set: addressed comments Created 4 years, 2 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
« no previous file with comments | « no previous file | test/inspector/console/let-const-with-api-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 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 42;" }, ste p2);
6
7 function step2(response)
8 {
9 failIfError(response);
10 InspectorTest.log("first \"let a = 1;\" result: wasThrown = " + !!response.res ult.exceptionDetails);
11 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 239;" }, step3);
12 }
13
14 function step3(response)
15 {
16 failIfError(response);
17 InspectorTest.log("second \"let a = 1;\" result: wasThrown = " + !!response.re sult.exceptionDetails);
18 if (response.result.exceptionDetails)
19 InspectorTest.log("exception message: " + response.result.exceptionDetails.t ext + " " + response.result.exceptionDetails.exception.description);
20 InspectorTest.sendCommand("Runtime.evaluate", { expression: "a" }, step4);
21 }
22
23 function step4(response)
24 {
25 failIfError(response);
26 InspectorTest.log(JSON.stringify(response.result));
27 checkMethod(null);
28 }
29
30 var methods = [ "dir", "dirxml", "keys", "values", "profile", "profileEnd",
31 "inspect", "copy", "clear",
32 "debug", "undebug", "monitor", "unmonitor", "table" ];
33
34 function checkMethod(response)
35 {
36 failIfError(response);
37
38 if (response)
39 InspectorTest.log(response.result.result.description);
40
41 var method = methods.shift();
42 if (!method)
43 InspectorTest.completeTest();
44
45 InspectorTest.sendCommand("Runtime.evaluate", { expression: method, includeCom mandLineAPI: true }, checkMethod);
46 }
47
48 function failIfError(response)
49 {
50 if (response && response.error)
51 InspectorTest.log("FAIL: " + JSON.stringify(response.error));
52 }
OLDNEW
« no previous file with comments | « no previous file | test/inspector/console/let-const-with-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698