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

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: Created 4 years 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
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 viewport._contentElement.lastChild.innerText = "More than 3 line s: foo\n\n\nbar"; 97 viewport._contentElement.lastChild.innerText = "More than 3 line s: foo\n\n\nbar";
98 dumpAndContinue(next); 98 dumpAndContinue(next);
99 } 99 }
100 }, 100 },
101 101
102 function testMuteUpdatesWhileScrolling(next) 102 function testMuteUpdatesWhileScrolling(next)
103 { 103 {
104 consoleView._updateStickToBottomOnMouseDown(); 104 consoleView._updateStickToBottomOnMouseDown();
105 viewport.element.scrollTop -= 10; 105 viewport.element.scrollTop -= 10;
106 106
107 InspectorTest.addSniffer(Console.ConsoleView.prototype, "_scheduleVi ewportRefreshForTest", onMessageAdded); 107 InspectorTest.addSniffer(Console.ConsoleView.prototype, "scheduleVie wportRefreshForTest", onMessageAdded);
108 InspectorTest.evaluateInConsole("1 + 1"); 108 InspectorTest.evaluateInConsole("1 + 1");
109 109
110 /** 110 /**
111 * @param {boolean} muted 111 * @param {boolean} muted
112 */ 112 */
113 function onMessageAdded(muted) 113 function onMessageAdded(muted)
114 { 114 {
115 InspectorTest.addResult("New messages were muted: " + muted); 115 InspectorTest.addResult("New messages were muted: " + muted);
116 InspectorTest.addSniffer(Console.ConsoleView.prototype, "_schedu leViewportRefreshForTest", onMouseUpScheduledRefresh); 116 InspectorTest.addSniffer(Console.ConsoleView.prototype, "schedul eViewportRefreshForTest", onMouseUpScheduledRefresh);
117 InspectorTest.addSniffer(Console.ConsoleView.prototype, "_update ViewportStickinessForTest", onUpdateStickiness); 117 InspectorTest.addSniffer(Console.ConsoleView.prototype, "_update ViewportStickinessForTest", onUpdateStickiness);
118 consoleView._updateStickToBottomOnMouseUp(); 118 consoleView._updateStickToBottomOnMouseUp();
119 } 119 }
120 120
121 /** 121 /**
122 * @param {boolean} muted 122 * @param {boolean} muted
123 */ 123 */
124 function onMouseUpScheduledRefresh(muted) 124 function onMouseUpScheduledRefresh(muted)
125 { 125 {
126 InspectorTest.addResult("Refresh was scheduled after dirty state "); 126 InspectorTest.addResult("Refresh was scheduled after dirty state ");
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 } 180 }
181 </script> 181 </script>
182 </head> 182 </head>
183 <body onload="runTest()"> 183 <body onload="runTest()">
184 <p> 184 <p>
185 Verifies viewport stick-to-bottom behavior. 185 Verifies viewport stick-to-bottom behavior.
186 </p> 186 </p>
187 </body> 187 </body>
188 </html> 188 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698