Changeset 75291 in webkit


Ignore:
Timestamp:
Jan 7, 2011 4:21:52 PM (13 years ago)
Author:
mjs@apple.com
Message:

2011-01-07 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam Weinig.

Make WebKitTestRunner rest between loads more robust to avoid test crashes
https://bugs.webkit.org/show_bug.cgi?id=52086

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage):
  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::notifyDone):
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::run):
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r75276 r75291  
     12011-01-07  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Make WebKitTestRunner rest between loads more robust to avoid test crashes
     6        https://bugs.webkit.org/show_bug.cgi?id=52086
     7
     8        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     9        (WTR::InjectedBundle::didReceiveMessage):
     10        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     11        (WTR::LayoutTestController::notifyDone):
     12        * WebKitTestRunner/TestController.cpp:
     13        (WTR::TestController::resetStateToConsistentValues):
     14        (WTR::TestController::run):
     15
    1162011-01-07  James Robinson  <jamesr@chromium.org>
    217
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r73066 r75291  
    129129        beginTesting();
    130130        return;
     131    } else if (WKStringIsEqualToUTF8CString(messageName, "Reset")) {
     132        m_state = Idle;
     133        return;
    131134    }
    132135
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r73066 r75291  
    130130void LayoutTestController::notifyDone()
    131131{
     132    if (!InjectedBundle::shared().isTestRunning())
     133        return;
     134
    132135    if (m_waitToDump && !InjectedBundle::shared().page()->isLoading())
    133136        InjectedBundle::shared().page()->dump();
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r74418 r75291  
    281281    m_state = Resetting;
    282282
     283    WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("Reset"));
     284    WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0);
     285
    283286    // FIXME: This function should also ensure that there is only one page open.
    284287
     
    354357        }
    355358    }
     359
    356360}
    357361
Note: See TracChangeset for help on using the changeset viewer.