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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 2179123004: DevTools: fix stick to bottom in console viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Best attempt at tests Created 4 years, 4 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 var initialize_ConsoleTest = function() { 1 var initialize_ConsoleTest = function() {
2 2
3 InspectorTest.preloadModule("source_frame"); 3 InspectorTest.preloadModule("source_frame");
4 InspectorTest.preloadPanel("console"); 4 InspectorTest.preloadPanel("console");
5 5
6 InspectorTest.selectMainExecutionContext = function() 6 InspectorTest.selectMainExecutionContext = function()
7 { 7 {
8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts(); 8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts();
9 for (var context of executionContexts) { 9 for (var context of executionContexts) {
10 if (context.isDefault) { 10 if (context.isDefault) {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 function override() 373 function override()
374 { 374 {
375 if (--count === 0) 375 if (--count === 0)
376 InspectorTest.safeWrap(callback)(); 376 InspectorTest.safeWrap(callback)();
377 else 377 else
378 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", o verride, false); 378 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", o verride, false);
379 } 379 }
380 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", override, false); 380 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", override, false);
381 } 381 }
382 382
383 // /**
384 // * @param {Function} callback
385 // * @param {Number} timeout
386 // */
387 // InspectorTest.waitForUserScrollDelay = function(callback, timeout)
388 // {
389 // timeout = timeout || 400;
390 // setTimeout(afterDelay, timeout);
391 // InspectorTest.addSniffer(WebInspector.ConsoleView.prototype, "_scrollUpda tedByUserForTest", onUserScroll);
392 // var scrollReceivedOrTimeout = false;
393
394 // function onUserScroll()
395 // {
396 // if (!scrollReceivedOrTimeout) {
397 // scrollReceivedOrTimeout = true;
398 // callback(true);
399 // }
400 // }
401
402 // function afterDelay()
403 // {
404 // if (!scrollReceivedOrTimeout) {
405 // scrollReceivedOrTimeout = false;
406 // callback(false);
407 // }
408
409 // }
410 // }
411
383 InspectorTest.changeExecutionContext = function(namePrefix) 412 InspectorTest.changeExecutionContext = function(namePrefix)
384 { 413 {
385 var selector = WebInspector.ConsoleView.instance()._executionContextModel._s electElement; 414 var selector = WebInspector.ConsoleView.instance()._executionContextModel._s electElement;
386 var option = selector.firstChild; 415 var option = selector.firstChild;
387 while (option) { 416 while (option) {
388 if (option.textContent && option.textContent.startsWith(namePrefix)) 417 if (option.textContent && option.textContent.startsWith(namePrefix))
389 break; 418 break;
390 option = option.nextSibling; 419 option = option.nextSibling;
391 } 420 }
392 if (!option) { 421 if (!option) {
(...skipping 14 matching lines...) Expand all
407 if (consoleView._visibleViewMessages.length === expectedCount) { 436 if (consoleView._visibleViewMessages.length === expectedCount) {
408 InspectorTest.addResult("Message count: " + expectedCount); 437 InspectorTest.addResult("Message count: " + expectedCount);
409 callback(); 438 callback();
410 } else { 439 } else {
411 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn); 440 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn);
412 } 441 }
413 } 442 }
414 } 443 }
415 444
416 } 445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698