Changeset 96100 in webkit


Ignore:
Timestamp:
Sep 27, 2011 5:39:16 AM (13 years ago)
Author:
yurys@chromium.org
Message:

[Chromium] Web Inspector: Bug with console.log and popstate/hashchange events
https://bugs.webkit.org/show_bug.cgi?id=67732

Added WebKit part of a new interactive UI test for the bug with duplicated console messages after navigation back.

Reviewed by Pavel Feldman.

  • src/js/Tests.js:

(.TestSuite.prototype.testConsoleOnNavigateBack.firstConsoleMessageReceived):
(.TestSuite.prototype.testConsoleOnNavigateBack.didClickLink):
(.TestSuite.prototype.testConsoleOnNavigateBack.didNavigateBack):
(.TestSuite.prototype.testConsoleOnNavigateBack.didCompleteNavigation):
(.TestSuite.prototype.testConsoleOnNavigateBack):

Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r96092 r96100  
     12011-09-27  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        [Chromium] Web Inspector: Bug with console.log and popstate/hashchange events
     4        https://bugs.webkit.org/show_bug.cgi?id=67732
     5
     6        Added WebKit part of a new interactive UI test for the bug with duplicated console messages after navigation back.
     7
     8        Reviewed by Pavel Feldman.
     9
     10        * src/js/Tests.js:
     11        (.TestSuite.prototype.testConsoleOnNavigateBack.firstConsoleMessageReceived):
     12        (.TestSuite.prototype.testConsoleOnNavigateBack.didClickLink):
     13        (.TestSuite.prototype.testConsoleOnNavigateBack.didNavigateBack):
     14        (.TestSuite.prototype.testConsoleOnNavigateBack.didCompleteNavigation):
     15        (.TestSuite.prototype.testConsoleOnNavigateBack):
     16
    1172011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
    218
  • trunk/Source/WebKit/chromium/src/js/Tests.js

    r95287 r96100  
    537537
    538538
     539TestSuite.prototype.testConsoleOnNavigateBack = function()
     540{
     541    if (WebInspector.console.messages.length === 1)
     542        firstConsoleMessageReceived.call(this);
     543    else
     544        WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
     545
     546    function firstConsoleMessageReceived() {
     547        this.evaluateInConsole_("clickLink();", didClickLink.bind(this));
     548    }
     549
     550    function didClickLink() {
     551        // Check that there are no new messages(command is not a message).
     552        this.assertEquals(1, WebInspector.console.messages.length);
     553        this.assertEquals(1, WebInspector.console.messages[0].totalRepeatCount);
     554        this.evaluateInConsole_("history.back();", didNavigateBack.bind(this));
     555    }
     556
     557    function didNavigateBack()
     558    {
     559        // Make sure navigation completed and possible console messages were pushed.
     560        this.evaluateInConsole_("void 0;", didCompleteNavigation.bind(this));
     561    }
     562
     563    function didCompleteNavigation() {
     564        this.assertEquals(1, WebInspector.console.messages.length);
     565        this.assertEquals(1, WebInspector.console.messages[0].totalRepeatCount);
     566        this.releaseControl();
     567    }
     568
     569    this.takeControl();
     570};
     571
     572
    539573TestSuite.prototype.testSharedWorker = function()
    540574{
Note: See TracChangeset for help on using the changeset viewer.