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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const-with-api.html

Issue 1617393002: [DevTools] Not use with statement for evaluated console command (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix $1-$4, $_ Created 4 years, 11 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 | third_party/WebKit/LayoutTests/inspector-protocol/console/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 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script>
5
6 function test()
7 {
8 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 42;" }, step2);
9
10 function step2(response)
11 {
12 failIfError(response);
13 InspectorTest.log("first \"let a = 1;\" result: wasThrown = " + response .result.wasThrown);
14 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 239 ;" }, step3);
15 }
16
17 function step3(response)
18 {
19 failIfError(response);
20 InspectorTest.log("second \"let a = 1;\" result: wasThrown = " + respons e.result.wasThrown);
21 if (response.result.wasThrown)
22 InspectorTest.log("exception message: " + response.result.exceptionD etails.text);
23 InspectorTest.sendCommand("Runtime.evaluate", { expression: "a" }, step4 );
24 }
25
26 function step4(response)
27 {
28 failIfError(response);
29 InspectorTest.log(JSON.stringify(response.result));
30 checkMethod(null);
31 }
32
33 var methods = [ "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile ", "profileEnd",
34 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEven tListeners",
35 "debug", "undebug", "monitor", "unmonitor", "table" ];
36
37 function checkMethod(response)
38 {
39 failIfError(response);
40
41 if (response)
42 InspectorTest.log(response.result.result.description);
43
44 var method = methods.shift();
45 if (!method)
46 InspectorTest.completeTest();
47
48 InspectorTest.sendCommand("Runtime.evaluate", { expression: method, incl udeCommandLineAPI: true }, checkMethod);
49 }
50
51 function failIfError(response)
52 {
53 if (response && response.error) {
54 InspectorTest.log("FAIL: " + JSON.stringify(response.error));
55 }
56 }
57 }
58
59 </script>
60 </head>
61 <body onload="runTest()">
62 </body>
63 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const-with-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698