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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html

Issue 2565113002: DevTools: update console viewport scroll when prompt is resized (Closed)
Patch Set: rebaseline Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 function populateConsoleWithMessages(count) 6 function populateConsoleWithMessages(count)
7 { 7 {
8 for (var i = 0; i < count - 1; ++i) 8 for (var i = 0; i < count - 1; ++i)
9 console.log("Multiline\nMessage #" + i); 9 console.log("Multiline\nMessage #" + i);
10 console.log("hello %cworld", "color: blue"); 10 console.log("hello %cworld", "color: blue");
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 }, 71 },
72 72
73 function testEscShouldNotJumpToBottom(next) 73 function testEscShouldNotJumpToBottom(next)
74 { 74 {
75 var keyEvent = InspectorTest.createKeyEvent("Escape"); 75 var keyEvent = InspectorTest.createKeyEvent("Escape");
76 viewport._contentElement.dispatchEvent(keyEvent); 76 viewport._contentElement.dispatchEvent(keyEvent);
77 dumpAndContinue(next); 77 dumpAndContinue(next);
78 }, 78 },
79 79
80 function testTypingShouldJumpToBottom(next) 80 function testChangingPromptTextShouldJumpToBottom(next)
81 { 81 {
82 var keyEvent = InspectorTest.createKeyEvent("a"); 82 InspectorTest.addSniffer(Console.ConsoleView.prototype, "_promptText ChangedForTest", onContentChanged);
83 viewport._contentElement.dispatchEvent(keyEvent); 83 var editorElement = consoleView._prompt.setText("a");
84 consoleView._promptElement.dispatchEvent(new Event('input'));
85 84
86 dumpAndContinue(next); 85 function onContentChanged() {
86 dumpAndContinue(next);
87 }
87 }, 88 },
88 89
89 function testViewportMutationsShouldPreserveStickToBottom(next) 90 function testViewportMutationsShouldPreserveStickToBottom(next)
90 { 91 {
91 viewport._contentElement.lastChild.innerText = "More than 2 lines: f oo\n\nbar"; 92 viewport._contentElement.lastChild.innerText = "More than 2 lines: f oo\n\nbar";
92 dumpAndContinue(onMessagesDumped); 93 dumpAndContinue(onMessagesDumped);
93 94
94 function onMessagesDumped() 95 function onMessagesDumped()
95 { 96 {
96 viewport.setStickToBottom(false); 97 viewport.setStickToBottom(false);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 180 }
180 } 181 }
181 </script> 182 </script>
182 </head> 183 </head>
183 <body onload="runTest()"> 184 <body onload="runTest()">
184 <p> 185 <p>
185 Verifies viewport stick-to-bottom behavior. 186 Verifies viewport stick-to-bottom behavior.
186 </p> 187 </p>
187 </body> 188 </body>
188 </html> 189 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698