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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const.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: 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
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("Console.enable", {});
9
10 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 42;" }, step2);
11
12 function step2(response)
13 {
14 failIfError(response);
15 InspectorTest.log("first \"let a = 1;\" result: wasThrown = " + response .result.wasThrown);
16
17 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 239 ;" }, step3);
18 }
19
20 function step3(response)
21 {
22 failIfError(response);
23
24 InspectorTest.log("second \"let a = 1;\" result: wasThrown = " + respons e.result.wasThrown);
25 if (response.result.wasThrown)
26 InspectorTest.log("exception message: " + response.result.exceptionD etails.text);
27
28 InspectorTest.sendCommand("Runtime.evaluate", { expression: "a" }, step4 );
29 }
30
31 function step4(response)
32 {
33 failIfError(response);
34
35 InspectorTest.log(JSON.stringify(response.result));
36
37 InspectorTest.completeTest();
38 }
39
40 function failIfError(response)
41 {
42 if (response && response.error) {
43 InspectorTest.log("FAIL: " + JSON.stringify(response.error));
44 }
45 }
46 }
47
48 </script>
49 </head>
50 <body onload="runTest()">
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698