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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables.html

Issue 2388903004: [DevTools] Fixed inline scope variables for object property (Closed)
Patch Set: addressed comments Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables.html
new file mode 100644
index 0000000000000000000000000000000000000000..80d94c9314b3dc7209e4c1860f229dfa8d24829b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables.html
@@ -0,0 +1,46 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function testFunction()
+{
+ var length = 123;
+ var a = [1, 2, 3];
+ if (a.length) {
+ var b = 42;
+ console.log(a.length);
+ debugger;
+ return b;
+ }
+}
+
+var test = function()
+{
+ InspectorTest.startDebuggerTest(step1, true);
+
+ function step1()
+ {
+ InspectorTest.addSnifferPromise(WebInspector.JavaScriptSourceFrame.prototype, "_renderDecorations").then(step2);
+ InspectorTest.runTestFunctionAndWaitUntilPaused();
+ }
+
+ function step2()
+ {
+ var currentFrame = WebInspector.panels.sources.visibleView;
+ var decorations = currentFrame.textEditor._decorations;
+ for (var line of decorations.keysArray()) {
+ var lineDecorations = Array.from(decorations.get(line)).map(decoration => decoration.element.textContent).join(", ");
+ InspectorTest.addResult(`${line + 1}: ${lineDecorations}`);
+ }
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests that inline scope variables are rendering correctly.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/inline-scope-variables-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698