Commit 9dadbf4a authored by mjs@apple.com's avatar mjs@apple.com

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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f59c5718
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):
2011-01-07 James Robinson <jamesr@chromium.org>
Revert "Implement mozilla's animationTime property"
......@@ -128,6 +128,9 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag
beginTesting();
return;
} else if (WKStringIsEqualToUTF8CString(messageName, "Reset")) {
m_state = Idle;
return;
}
WKRetainPtr<WKStringRef> errorMessageName(AdoptWK, WKStringCreateWithUTF8CString("Error"));
......
......@@ -129,6 +129,9 @@ void LayoutTestController::waitToDumpWatchdogTimerFired()
void LayoutTestController::notifyDone()
{
if (!InjectedBundle::shared().isTestRunning())
return;
if (m_waitToDump && !InjectedBundle::shared().page()->isLoading())
InjectedBundle::shared().page()->dump();
m_waitToDump = false;
......
......@@ -280,6 +280,9 @@ bool TestController::resetStateToConsistentValues()
{
m_state = Resetting;
WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("Reset"));
WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0);
// FIXME: This function should also ensure that there is only one page open.
// Reset preferences
......@@ -353,6 +356,7 @@ void TestController::run()
break;
}
}
}
void TestController::runUntil(bool& done, TimeoutDuration timeoutDuration)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment