Changeset 171880 in webkit


Ignore:
Timestamp:
Jul 31, 2014 12:21:28 PM (10 years ago)
Author:
ap@apple.com
Message:

media/track/add-and-remove-track.html and media/media-fragments/TC0001.html are flaky
on Mac WK2 EWS, asserting under TestRunner::removeAllWebNotificationPermissions
https://bugs.webkit.org/show_bug.cgi?id=135418

Reviewed by Anders Carlsson.

This was only happening in shared web process mode, because WKBundlePostMessage
has different behavior then. When there is no process, the message is dropped on
the floor in multiple process mode, but it's stored to be delivered after launch
in shared process mode.

So, calling resetStateToConsistentValues() resulted in storing a Reset bundle message
that was delivered immediately after launch, when there was nothing to reset.

We don't actually need to reset anything at this point, as the previous call has
already reset everything UI process side, and web process is brand new. All we need
is to reattach the page to a process, as invoke() expects one to exist.

  • WebKitTestRunner/TestController.cpp: (WTR::TestController::reattachPageToWebProcess):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke):
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r171859 r171880  
     12014-07-31  Alexey Proskuryakov  <ap@apple.com>
     2
     3        media/track/add-and-remove-track.html and media/media-fragments/TC0001.html are flaky
     4        on Mac WK2 EWS, asserting under TestRunner::removeAllWebNotificationPermissions
     5        https://bugs.webkit.org/show_bug.cgi?id=135418
     6
     7        Reviewed by Anders Carlsson.
     8
     9        This was only happening in shared web process mode, because WKBundlePostMessage
     10        has different behavior then. When there is no process, the message is dropped on
     11        the floor in multiple process mode, but it's stored to be delivered after launch
     12        in shared process mode.
     13
     14        So, calling resetStateToConsistentValues() resulted in storing a Reset bundle message
     15        that was delivered immediately after launch, when there was nothing to reset.
     16
     17        We don't actually need to reset anything at this point, as the previous call has
     18        already reset everything UI process side, and web process is brand new. All we need
     19        is to reattach the page to a process, as invoke() expects one to exist.
     20
     21        * WebKitTestRunner/TestController.cpp: (WTR::TestController::reattachPageToWebProcess):
     22        * WebKitTestRunner/TestController.h:
     23        * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke):
     24
    1252014-07-31  Dan Bernstein  <mitz@apple.com>
    226
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r171859 r171880  
    664664}
    665665
     666void TestController::reattachPageToWebProcess()
     667{
     668    // Loading a web page is the only way to reattach an existing page to a process.
     669    m_doneResetting = false;
     670    WKPageLoadURL(m_mainWebView->page(), blankURL());
     671    runUntil(m_doneResetting, LongTimeout);
     672}
     673
    666674void TestController::updateWebViewSizeForTest(const TestInvocation& test)
    667675{
  • trunk/Tools/WebKitTestRunner/TestController.h

    r171167 r171880  
    9999
    100100    void terminateWebContentProcess();
     101    void reattachPageToWebProcess();
    101102
    102103    WorkQueueManager& workQueueManager() { return m_workQueueManager; }
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r171167 r171880  
    206206        // It would be nice to report that the previous test froze after dumping results, but we have no way to do that.
    207207        TestController::shared().terminateWebContentProcess();
    208         TestController::shared().resetStateToConsistentValues();
     208        // Make sure that we have a process, as invoke() will need one to send bundle messages for the next test.
     209        TestController::shared().reattachPageToWebProcess();
    209210    }
    210211}
Note: See TracChangeset for help on using the changeset viewer.