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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const.html b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const.html
new file mode 100644
index 0000000000000000000000000000000000000000..b4182359391157c9213b5b36e55657bb6164618b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/console/console-let-const.html
@@ -0,0 +1,52 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+function test()
+{
+ InspectorTest.sendCommand("Console.enable", {});
+
+ InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 42;" }, step2);
+
+ function step2(response)
+ {
+ failIfError(response);
+ InspectorTest.log("first \"let a = 1;\" result: wasThrown = " + response.result.wasThrown);
+
+ InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 239;" }, step3);
+ }
+
+ function step3(response)
+ {
+ failIfError(response);
+
+ InspectorTest.log("second \"let a = 1;\" result: wasThrown = " + response.result.wasThrown);
+ if (response.result.wasThrown)
+ InspectorTest.log("exception message: " + response.result.exceptionDetails.text);
+
+ InspectorTest.sendCommand("Runtime.evaluate", { expression: "a" }, step4);
+ }
+
+ function step4(response)
+ {
+ failIfError(response);
+
+ InspectorTest.log(JSON.stringify(response.result));
+
+ InspectorTest.completeTest();
+ }
+
+ function failIfError(response)
+ {
+ if (response && response.error) {
+ InspectorTest.log("FAIL: " + JSON.stringify(response.error));
+ }
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698