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

Unified Diff: LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html

Issue 738733006: DevTools: Support harmony variable scopes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 1 month 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: LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html
diff --git a/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html b/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html
new file mode 100644
index 0000000000000000000000000000000000000000..9c302a8703a6b397c5a7b3d2c173b7d7f4fb2f68
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/debugger-es6-harmony-scopes.html
@@ -0,0 +1,79 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+"use strict";
+
+let globalLet = 41;
+const globalConst = 42;
+
+function makeClosure(n)
+{
+ let makeClosureBlockVar = "block." + n;
+ var makeClosureLocalVar = "local." + n;
+ {
+ let makeClosureDeeperBlockVar = "block.deep." + n;
+ var makeClosureDeeperLocalVar = "local.deep." + n;
+ return function innerFunction(x)
+ {
+ let innerFunctionBlockVar = x + 102;
+ var innerFunctionLocalVar = x + 2;
+ var negInf = -Infinity;
+ var negZero = 1 / negInf;
+ {
+ let block1 = "block {...}";
+ const const1 = 1;
+ try {
+ throw new Error("An exception");
+ } catch (e) {
+ let block2 = "catch(e) {...}";
+ const const2 = 2;
+ e.toString();
+ debugger;
+ }
+ }
+ return n + makeClosureLocalVar + x + innerFunctionLocalVar + innerFunctionBlockVar +
+ makeClosureBlockVar + makeClosureDeeperBlockVar + makeClosureDeeperLocalVar;
+ }
+ }
+}
+
+function testFunction()
+{
+ var f = makeClosure("TextParam");
+ f(2014);
+}
+
+function test()
+{
+ InspectorTest.startDebuggerTest(step1);
+
+ function step1()
+ {
+ InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.expandScopeVariablesSidebarPane(step3);
+ }
+
+ function step3()
+ {
+ InspectorTest.addResult("");
+ InspectorTest.dumpScopeVariablesSidebarPane();
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<input type='button' onclick='testFunction()' value='Test'/>
+<p>
+Tests ES6 harmony scope sections.
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698