| 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>
|
|
|