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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html

Issue 1688053004: DevTools: [Console] fix viewport stick-to-bottom behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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-selection-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("Message #" + i); 9 console.log("Message #" + i);
10 console.log("hello %cworld", "color: blue"); 10 console.log("hello %cworld", "color: blue");
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 viewport.refresh(); 214 viewport.refresh();
215 var text = viewport._selectedText(); 215 var text = viewport._selectedText();
216 InspectorTest.addResult("Selected text:<<<EOL\n" + text + "\nEOL"); 216 InspectorTest.addResult("Selected text:<<<EOL\n" + text + "\nEOL");
217 } 217 }
218 218
219 function dumpViewportRenderedItems() 219 function dumpViewportRenderedItems()
220 { 220 {
221 viewport.refresh(); 221 viewport.refresh();
222 var firstVisibleIndex = viewport.firstVisibleIndex(); 222 var firstVisibleIndex = viewport.firstVisibleIndex();
223 var lastVisibleIndex = viewport.lastVisibleIndex(); 223 var lastVisibleIndex = viewport.lastVisibleIndex();
224 var renderedEnoughElements = viewportMessagesCount <= lastVisibleIndex - firstVisibleIndex + 1; 224 InspectorTest.addResult("first visible message index: " + firstVisibleIn dex);
225 InspectorTest.addResult("first visible message index: " + firstVisibleIn dex + " viewport is covered: " + (renderedEnoughElements ? "YES" : "NO"));
226 } 225 }
227 226
228 function emulateShiftClickOnMessage(messageIndex) 227 function emulateShiftClickOnMessage(messageIndex)
229 { 228 {
230 viewport.refresh(); 229 viewport.refresh();
231 var selection = window.getSelection(); 230 var selection = window.getSelection();
232 if (!selection || !selection.rangeCount) { 231 if (!selection || !selection.rangeCount) {
233 InspectorTest.addResult("FAILURE: There's no selection"); 232 InspectorTest.addResult("FAILURE: There's no selection");
234 return; 233 return;
235 } 234 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 271 }
273 } 272 }
274 </script> 273 </script>
275 </head> 274 </head>
276 <body onload="runTest()"> 275 <body onload="runTest()">
277 <p> 276 <p>
278 Tests that console viewport handles selection properly. 277 Tests that console viewport handles selection properly.
279 </p> 278 </p>
280 </body> 279 </body>
281 </html> 280 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698