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

Side by Side Diff: Source/devtools/front_end/Tests.js

Issue 185713007: DevTools: Add timestamp support in the console (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed apavlov's comments Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.M essageAdded, firstConsoleMessageReceived, this); 503 WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.M essageAdded, firstConsoleMessageReceived, this);
504 504
505 function firstConsoleMessageReceived() { 505 function firstConsoleMessageReceived() {
506 WebInspector.console.removeEventListener(WebInspector.ConsoleModel.Event s.MessageAdded, firstConsoleMessageReceived, this); 506 WebInspector.console.removeEventListener(WebInspector.ConsoleModel.Event s.MessageAdded, firstConsoleMessageReceived, this);
507 this.evaluateInConsole_("clickLink();", didClickLink.bind(this)); 507 this.evaluateInConsole_("clickLink();", didClickLink.bind(this));
508 } 508 }
509 509
510 function didClickLink() { 510 function didClickLink() {
511 // Check that there are no new messages(command is not a message). 511 // Check that there are no new messages(command is not a message).
512 this.assertEquals(3, WebInspector.console.messages.length); 512 this.assertEquals(3, WebInspector.console.messages.length);
513 this.assertEquals(1, WebInspector.console.messages[0].totalRepeatCount); 513 this.assertEquals(1, WebInspector.console.messages[0].repeatCount);
514 this.evaluateInConsole_("history.back();", didNavigateBack.bind(this)); 514 this.evaluateInConsole_("history.back();", didNavigateBack.bind(this));
515 } 515 }
516 516
517 function didNavigateBack() 517 function didNavigateBack()
518 { 518 {
519 // Make sure navigation completed and possible console messages were pus hed. 519 // Make sure navigation completed and possible console messages were pus hed.
520 this.evaluateInConsole_("void 0;", didCompleteNavigation.bind(this)); 520 this.evaluateInConsole_("void 0;", didCompleteNavigation.bind(this));
521 } 521 }
522 522
523 function didCompleteNavigation() { 523 function didCompleteNavigation() {
524 this.assertEquals(7, WebInspector.console.messages.length); 524 this.assertEquals(7, WebInspector.console.messages.length);
525 this.assertEquals(1, WebInspector.console.messages[0].totalRepeatCount); 525 this.assertEquals(1, WebInspector.console.messages[0].repeatCount);
526 this.releaseControl(); 526 this.releaseControl();
527 } 527 }
528 528
529 this.takeControl(); 529 this.takeControl();
530 }; 530 };
531 531
532 532
533 TestSuite.prototype.testReattachAfterCrash = function() 533 TestSuite.prototype.testReattachAfterCrash = function()
534 { 534 {
535 this.evaluateInConsole_("1+1;", this.releaseControl.bind(this)); 535 this.evaluateInConsole_("1+1;", this.releaseControl.bind(this));
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 var oldLoadCompleted = InspectorFrontendAPI.loadCompleted; 961 var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;
962 InspectorFrontendAPI.loadCompleted = function() 962 InspectorFrontendAPI.loadCompleted = function()
963 { 963 {
964 oldLoadCompleted.call(InspectorFrontendAPI); 964 oldLoadCompleted.call(InspectorFrontendAPI);
965 runTests(); 965 runTests();
966 } 966 }
967 967
968 })(); 968 })();
969 969
970 } 970 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698