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

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

Issue 2157963002: Improve grammar in some comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maxiumum Created 4 years, 5 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
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 }; 251 };
252 } 252 }
253 charCount += length; 253 charCount += length;
254 } 254 }
255 return null; 255 return null;
256 } 256 }
257 257
258 function selectMessages(fromMessage, fromTextOffset, toMessage, toTextOffset ) 258 function selectMessages(fromMessage, fromTextOffset, toMessage, toTextOffset )
259 { 259 {
260 if (Math.abs(toMessage - fromMessage) > minimumViewportMessagesCount) { 260 if (Math.abs(toMessage - fromMessage) > minimumViewportMessagesCount) {
261 InspectorTest.addResult(String.sprintf("FAILURE: Cannot select more then %d messages (requested to select from %d to %d", minimumViewportMessagesCou nt, fromMessage, toMessage)); 261 InspectorTest.addResult(String.sprintf("FAILURE: Cannot select more than %d messages (requested to select from %d to %d", minimumViewportMessagesCou nt, fromMessage, toMessage));
262 InspectorTest.completeTest(); 262 InspectorTest.completeTest();
263 return; 263 return;
264 } 264 }
265 viewport.forceScrollItemToBeFirst(Math.min(fromMessage, toMessage)); 265 viewport.forceScrollItemToBeFirst(Math.min(fromMessage, toMessage));
266 266
267 var from = selectionContainerAndOffset(consoleView.itemElement(fromMessa ge).element(), fromTextOffset); 267 var from = selectionContainerAndOffset(consoleView.itemElement(fromMessa ge).element(), fromTextOffset);
268 var to = selectionContainerAndOffset(consoleView.itemElement(toMessage). element(), toTextOffset); 268 var to = selectionContainerAndOffset(consoleView.itemElement(toMessage). element(), toTextOffset);
269 window.getSelection().setBaseAndExtent(from.container, from.offset, to.c ontainer, to.offset); 269 window.getSelection().setBaseAndExtent(from.container, from.offset, to.c ontainer, to.offset);
270 viewport._innerRefresh(true); 270 viewport._innerRefresh(true);
271 } 271 }
272 } 272 }
273 </script> 273 </script>
274 </head> 274 </head>
275 <body onload="runTest()"> 275 <body onload="runTest()">
276 <p> 276 <p>
277 Tests that console viewport handles selection properly. 277 Tests that console viewport handles selection properly.
278 </p> 278 </p>
279 </body> 279 </body>
280 </html> 280 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698