WebKitTestRunner should be more aggressive about ensuring consistent state between...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Aug 2010 21:28:24 +0000 (21:28 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Aug 2010 21:28:24 +0000 (21:28 +0000)
commit24ad253b5e3329deb72273ba1eff179b290217b8
treee9b2bbc6905cbb9064fdc437a1ab9b3ba76c4df0
parentb02640ad75ff03ec0e86c65934f3a17355feead5
WebKitTestRunner should be more aggressive about ensuring consistent state between tests
https://bugs.webkit.org/show_bug.cgi?id=43653

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::InjectedBundle):
(WTR::InjectedBundle::didReceiveMessage):
(WTR::InjectedBundle::beginTesting):
(WTR::InjectedBundle::done):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::isTestRunning):
(WTR::InjectedBundle::):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::stopLoading):
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
(WTR::InjectedBundlePage::dump):
(WTR::InjectedBundlePage::didFinishLoadForFrame):
(WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
(WTR::InjectedBundlePage::didReceiveTitleForFrame):
(WTR::InjectedBundlePage::didClearWindowForFrame):
(WTR::InjectedBundlePage::didFinishDocumentLoadForFrame):
(WTR::InjectedBundlePage::willAddMessageToConsole):
(WTR::InjectedBundlePage::willSetStatusbarText):
(WTR::InjectedBundlePage::willRunJavaScriptAlert):
(WTR::InjectedBundlePage::willRunJavaScriptConfirm):
(WTR::InjectedBundlePage::shouldBeginEditing):
(WTR::InjectedBundlePage::shouldEndEditing):
(WTR::InjectedBundlePage::shouldInsertNode):
(WTR::InjectedBundlePage::shouldInsertText):
(WTR::InjectedBundlePage::shouldDeleteRange):
(WTR::InjectedBundlePage::shouldChangeSelectedRange):
(WTR::InjectedBundlePage::shouldApplyStyle):
(WTR::InjectedBundlePage::didBeginEditing):
(WTR::InjectedBundlePage::didEndEditing):
(WTR::InjectedBundlePage::didChange):
(WTR::InjectedBundlePage::didChangeSelection):
Don't do any work if we are not currently running a test.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/StringFunctions.h:
(WTR::toCF):
Add conversion function for WKURLRef -> CFURLRef

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::runTest):
(WTR::TestController::didFinishLoadForFrame):
* WebKitTestRunner/TestController.h:
(WTR::TestController::):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
* WebKitTestRunner/TestInvocation.h:
Move resetting code to TestController.

* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::runUntil):
* WebKitTestRunner/mac/TestInvocationMac.mm: Removed.
* WebKitTestRunner/win/TestControllerWin.cpp:
(WTR::TestController::runUntil):
* WebKitTestRunner/win/TestInvocationWin.cpp: Removed.
* WebKitTestRunner/win/WebKitTestRunner.vcproj:
Move runUntil to TestController.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
WebKitTools/ChangeLog
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
WebKitTools/WebKitTestRunner/StringFunctions.h
WebKitTools/WebKitTestRunner/TestController.cpp
WebKitTools/WebKitTestRunner/TestController.h
WebKitTools/WebKitTestRunner/TestInvocation.cpp
WebKitTools/WebKitTestRunner/TestInvocation.h
WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
WebKitTools/WebKitTestRunner/mac/TestInvocationMac.mm [deleted file]
WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp [deleted file]
WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj