Changeset 65267 in webkit
- Timestamp:
- Aug 12, 2010 2:28:24 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r65256 r65267 1 2010-08-12 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Alexey Proskuryakov. 4 5 WebKitTestRunner should be more aggressive about ensuring consistent state between tests 6 https://bugs.webkit.org/show_bug.cgi?id=43653 7 8 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: 9 (WTR::InjectedBundle::InjectedBundle): 10 (WTR::InjectedBundle::didReceiveMessage): 11 (WTR::InjectedBundle::beginTesting): 12 (WTR::InjectedBundle::done): 13 * WebKitTestRunner/InjectedBundle/InjectedBundle.h: 14 (WTR::InjectedBundle::isTestRunning): 15 (WTR::InjectedBundle::): 16 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 17 (WTR::InjectedBundlePage::stopLoading): 18 (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame): 19 (WTR::InjectedBundlePage::dump): 20 (WTR::InjectedBundlePage::didFinishLoadForFrame): 21 (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame): 22 (WTR::InjectedBundlePage::didReceiveTitleForFrame): 23 (WTR::InjectedBundlePage::didClearWindowForFrame): 24 (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): 25 (WTR::InjectedBundlePage::willAddMessageToConsole): 26 (WTR::InjectedBundlePage::willSetStatusbarText): 27 (WTR::InjectedBundlePage::willRunJavaScriptAlert): 28 (WTR::InjectedBundlePage::willRunJavaScriptConfirm): 29 (WTR::InjectedBundlePage::shouldBeginEditing): 30 (WTR::InjectedBundlePage::shouldEndEditing): 31 (WTR::InjectedBundlePage::shouldInsertNode): 32 (WTR::InjectedBundlePage::shouldInsertText): 33 (WTR::InjectedBundlePage::shouldDeleteRange): 34 (WTR::InjectedBundlePage::shouldChangeSelectedRange): 35 (WTR::InjectedBundlePage::shouldApplyStyle): 36 (WTR::InjectedBundlePage::didBeginEditing): 37 (WTR::InjectedBundlePage::didEndEditing): 38 (WTR::InjectedBundlePage::didChange): 39 (WTR::InjectedBundlePage::didChangeSelection): 40 Don't do any work if we are not currently running a test. 41 42 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: 43 * WebKitTestRunner/StringFunctions.h: 44 (WTR::toCF): 45 Add conversion function for WKURLRef -> CFURLRef 46 47 * WebKitTestRunner/TestController.cpp: 48 (WTR::TestController::TestController): 49 (WTR::TestController::initialize): 50 (WTR::TestController::resetStateToConsistentValues): 51 (WTR::TestController::runTest): 52 (WTR::TestController::didFinishLoadForFrame): 53 * WebKitTestRunner/TestController.h: 54 (WTR::TestController::): 55 * WebKitTestRunner/TestInvocation.cpp: 56 (WTR::TestInvocation::invoke): 57 * WebKitTestRunner/TestInvocation.h: 58 Move resetting code to TestController. 59 60 * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 61 * WebKitTestRunner/mac/TestControllerMac.mm: 62 (WTR::TestController::runUntil): 63 * WebKitTestRunner/mac/TestInvocationMac.mm: Removed. 64 * WebKitTestRunner/win/TestControllerWin.cpp: 65 (WTR::TestController::runUntil): 66 * WebKitTestRunner/win/TestInvocationWin.cpp: Removed. 67 * WebKitTestRunner/win/WebKitTestRunner.vcproj: 68 Move runUntil to TestController. 69 1 70 2010-08-12 Lucas De Marchi <lucas.demarchi@profusion.mobi> 2 71 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
r64985 r65267 50 50 : m_bundle(0) 51 51 , m_mainPage(0) 52 , m_state(Idle) 52 53 { 53 54 } … … 85 86 } 86 87 87 void InjectedBundle::done()88 {89 WKRetainPtr<WKStringRef> doneMessageName(AdoptWK, WKStringCreateWithCFString(CFSTR("Done")));90 91 std::string output = m_outputStream.str();92 RetainPtr<CFStringRef> outputCFString(AdoptCF, CFStringCreateWithCString(0, output.c_str(), kCFStringEncodingUTF8));93 WKRetainPtr<WKStringRef> doneMessageBody(AdoptWK, WKStringCreateWithCFString(outputCFString.get()));94 95 WKBundlePostMessage(m_bundle, doneMessageName.get(), doneMessageBody.get());96 }97 98 88 void InjectedBundle::didCreatePage(WKBundlePageRef page) 99 89 { … … 122 112 WKBundlePostMessage(m_bundle, ackMessageName.get(), ackMessageBody.get()); 123 113 124 reset();114 beginTesting(); 125 115 return; 126 116 } … … 131 121 } 132 122 133 void InjectedBundle:: reset()123 void InjectedBundle::beginTesting() 134 124 { 125 m_state = Testing; 126 135 127 m_outputStream.str(""); 136 128 … … 145 137 } 146 138 139 void InjectedBundle::done() 140 { 141 m_mainPage->stopLoading(); 142 143 WKRetainPtr<WKStringRef> doneMessageName(AdoptWK, WKStringCreateWithCFString(CFSTR("Done"))); 144 145 std::string output = m_outputStream.str(); 146 RetainPtr<CFStringRef> outputCFString(AdoptCF, CFStringCreateWithCString(0, output.c_str(), kCFStringEncodingUTF8)); 147 WKRetainPtr<WKStringRef> doneMessageBody(AdoptWK, WKStringCreateWithCFString(outputCFString.get())); 148 149 WKBundlePostMessage(m_bundle, doneMessageName.get(), doneMessageBody.get()); 150 151 m_state = Idle; 152 } 153 147 154 void InjectedBundle::closeOtherPages() 148 155 { -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
r64985 r65267 62 62 std::ostringstream& os() { return m_outputStream; } 63 63 64 bool isTestRunning() { return m_state == Testing; } 65 64 66 private: 65 67 InjectedBundle(); … … 74 76 void didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody); 75 77 76 void reset();78 void beginTesting(); 77 79 78 80 WKBundleRef m_bundle; … … 85 87 86 88 std::ostringstream m_outputStream; 89 90 enum State { 91 Idle, 92 Testing 93 }; 94 State m_state; 87 95 }; 88 96 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r65029 r65267 148 148 } 149 149 150 void InjectedBundlePage::stopLoading() 151 { 152 WKBundlePageStopLoading(m_page); 153 m_isLoading = false; 154 } 155 150 156 void InjectedBundlePage::reset() 151 157 { … … 236 242 void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame) 237 243 { 244 if (!InjectedBundle::shared().isTestRunning()) 245 return; 246 238 247 if (frame == WKBundlePageGetMainFrame(m_page)) 239 248 m_isLoading = true; … … 332 341 void InjectedBundlePage::dump() 333 342 { 343 ASSERT(InjectedBundle::shared().isTestRunning()); 344 334 345 InjectedBundle::shared().layoutTestController()->invalidateWaitToDumpWatchdog(); 335 346 … … 358 369 void InjectedBundlePage::didFinishLoadForFrame(WKBundleFrameRef frame) 359 370 { 371 if (!InjectedBundle::shared().isTestRunning()) 372 return; 373 360 374 if (!WKBundleFrameIsMainFrame(frame)) 361 375 return; … … 374 388 void InjectedBundlePage::didFailLoadWithErrorForFrame(WKBundleFrameRef frame) 375 389 { 390 if (!InjectedBundle::shared().isTestRunning()) 391 return; 392 376 393 if (!WKBundleFrameIsMainFrame(frame)) 377 394 return; … … 387 404 void InjectedBundlePage::didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef frame) 388 405 { 406 if (!InjectedBundle::shared().isTestRunning()) 407 return; 408 389 409 if (!InjectedBundle::shared().layoutTestController()->shouldDumpTitleChanges()) 390 410 return; … … 395 415 void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window) 396 416 { 417 if (!InjectedBundle::shared().isTestRunning()) 418 return; 419 397 420 JSValueRef exception = 0; 398 421 InjectedBundle::shared().layoutTestController()->makeWindowObject(context, window, &exception); … … 415 438 void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundleFrameRef frame) 416 439 { 440 if (!InjectedBundle::shared().isTestRunning()) 441 return; 442 417 443 unsigned pendingFrameUnloadEvents = WKBundleFrameGetPendingUnloadCount(frame); 418 444 if (pendingFrameUnloadEvents) … … 461 487 void InjectedBundlePage::willAddMessageToConsole(WKStringRef message, uint32_t lineNumber) 462 488 { 489 if (!InjectedBundle::shared().isTestRunning()) 490 return; 491 463 492 // FIXME: Strip file: urls. 464 493 InjectedBundle::shared().os() << "CONSOLE MESSAGE: line " << lineNumber << ": " << message << "\n"; … … 467 496 void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText) 468 497 { 498 if (!InjectedBundle::shared().isTestRunning()) 499 return; 500 469 501 if (!InjectedBundle::shared().layoutTestController()->shouldDumpStatusCallbacks()) 470 502 return; … … 475 507 void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef) 476 508 { 509 if (!InjectedBundle::shared().isTestRunning()) 510 return; 511 477 512 InjectedBundle::shared().os() << "ALERT: " << message << "\n"; 478 513 } … … 480 515 void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef) 481 516 { 517 if (!InjectedBundle::shared().isTestRunning()) 518 return; 519 482 520 InjectedBundle::shared().os() << "CONFIRM: " << message << "\n"; 483 521 } … … 547 585 bool InjectedBundlePage::shouldBeginEditing(WKBundleRangeRef range) 548 586 { 587 if (!InjectedBundle::shared().isTestRunning()) 588 return true; 589 549 590 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 550 591 InjectedBundle::shared().os() << "EDITING DELEGATE: shouldBeginEditingInDOMRange:" << range << "\n"; … … 554 595 bool InjectedBundlePage::shouldEndEditing(WKBundleRangeRef range) 555 596 { 597 if (!InjectedBundle::shared().isTestRunning()) 598 return true; 599 556 600 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 557 601 InjectedBundle::shared().os() << "EDITING DELEGATE: shouldEndEditingInDOMRange:" << range << "\n"; … … 561 605 bool InjectedBundlePage::shouldInsertNode(WKBundleNodeRef node, WKBundleRangeRef rangeToReplace, WKInsertActionType action) 562 606 { 607 if (!InjectedBundle::shared().isTestRunning()) 608 return true; 609 563 610 static const char* insertactionstring[] = { 564 611 "WebViewInsertActionTyped", … … 574 621 bool InjectedBundlePage::shouldInsertText(WKStringRef text, WKBundleRangeRef rangeToReplace, WKInsertActionType action) 575 622 { 623 if (!InjectedBundle::shared().isTestRunning()) 624 return true; 625 576 626 static const char *insertactionstring[] = { 577 627 "WebViewInsertActionTyped", … … 587 637 bool InjectedBundlePage::shouldDeleteRange(WKBundleRangeRef range) 588 638 { 639 if (!InjectedBundle::shared().isTestRunning()) 640 return true; 641 589 642 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 590 643 InjectedBundle::shared().os() << "EDITING DELEGATE: shouldDeleteDOMRange:" << range << "\n"; … … 594 647 bool InjectedBundlePage::shouldChangeSelectedRange(WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType affinity, bool stillSelecting) 595 648 { 649 if (!InjectedBundle::shared().isTestRunning()) 650 return true; 651 596 652 static const char *affinitystring[] = { 597 653 "NSSelectionAffinityUpstream", … … 610 666 bool InjectedBundlePage::shouldApplyStyle(WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range) 611 667 { 668 if (!InjectedBundle::shared().isTestRunning()) 669 return true; 670 612 671 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 613 672 InjectedBundle::shared().os() << "EDITING DELEGATE: shouldApplyStyle:" << style << " toElementsInDOMRange:" << range << "\n"; … … 617 676 void InjectedBundlePage::didBeginEditing(WKStringRef notificationName) 618 677 { 678 if (!InjectedBundle::shared().isTestRunning()) 679 return; 680 619 681 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 620 682 InjectedBundle::shared().os() << "EDITING DELEGATE: webViewDidBeginEditing:" << notificationName << "\n"; … … 623 685 void InjectedBundlePage::didEndEditing(WKStringRef notificationName) 624 686 { 687 if (!InjectedBundle::shared().isTestRunning()) 688 return; 689 625 690 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 626 691 InjectedBundle::shared().os() << "EDITING DELEGATE: webViewDidEndEditing:" << notificationName << "\n"; … … 629 694 void InjectedBundlePage::didChange(WKStringRef notificationName) 630 695 { 696 if (!InjectedBundle::shared().isTestRunning()) 697 return; 698 631 699 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 632 700 InjectedBundle::shared().os() << "EDITING DELEGATE: webViewDidChange:" << notificationName << "\n"; … … 635 703 void InjectedBundlePage::didChangeSelection(WKStringRef notificationName) 636 704 { 705 if (!InjectedBundle::shared().isTestRunning()) 706 return; 707 637 708 if (InjectedBundle::shared().layoutTestController()->shouldDumpEditingCallbacks()) 638 709 InjectedBundle::shared().os() << "EDITING DELEGATE: webViewDidChangeSelection:" << notificationName << "\n"; 639 710 } 640 711 641 642 712 } // namespace WTR -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
r64927 r65267 39 39 void dump(); 40 40 41 void stopLoading(); 41 42 bool isLoading() { return m_isLoading; } 42 43 -
trunk/WebKitTools/WebKitTestRunner/StringFunctions.h
r64576 r65267 51 51 { 52 52 return RetainPtr<CFStringRef>(AdoptCF, WKStringCopyCFString(0, string)); 53 } 54 55 inline RetainPtr<CFURLRef> toCF(WKURLRef url) 56 { 57 return RetainPtr<CFURLRef>(AdoptCF, WKURLCopyCFURL(0, url)); 58 } 59 60 inline RetainPtr<CFURLRef> toCF(const WKRetainPtr<WKURLRef>& url) 61 { 62 return toCF(url.get()); 53 63 } 54 64 -
trunk/WebKitTools/WebKitTestRunner/TestController.cpp
r64485 r65267 27 27 28 28 #include "PlatformWebView.h" 29 #include "StringFunctions.h" 29 30 #include "TestInvocation.h" 30 31 #include <WebKit2/WKContextPrivate.h> 32 #include <WebKit2/WKPreferencesPrivate.h> 31 33 #include <wtf/PassOwnPtr.h> 32 34 … … 46 48 , m_printSeparators(false) 47 49 , m_usingServerMode(false) 50 , m_state(Initial) 51 , m_doneResetting(false) 48 52 { 49 53 initialize(argc, argv); … … 144 148 }; 145 149 WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient); 150 151 WKPageLoaderClient pageLoaderClient = { 152 0, 153 this, 154 0, 155 0, 156 0, 157 0, 158 didFinishLoadForFrame, 159 0, 160 0, 161 0, 162 0, 163 0, 164 0, 165 0, 166 0, 167 0, 168 0, 169 0 170 }; 171 WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient); 172 } 173 174 void TestController::resetStateToConsistentValues() 175 { 176 m_state = Resetting; 177 178 // FIXME: This function should also ensure that there is only one page open. 179 180 // Reset preferences 181 WKPreferencesRef preferences = WKContextGetPreferences(m_context.get()); 182 WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true); 183 WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing); 184 185 // Reset main page back to about:blank 186 m_doneResetting = false; 187 m_resetResultedInError = false; 188 189 WKRetainPtr<WKURLRef> url(AdoptWK, createWKURL("about:blank")); 190 WKPageLoadURL(m_mainWebView->page(), url.get()); 191 TestController::runUntil(m_doneResetting); 146 192 } 147 193 148 194 void TestController::runTest(const char* test) 149 195 { 196 resetStateToConsistentValues(); 197 198 m_state = RunningTest; 150 199 m_currentInvocation.set(new TestInvocation(test)); 151 200 m_currentInvocation->invoke(); … … 178 227 } 179 228 229 // WKContextInjectedBundleClient 230 180 231 void TestController::didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo) 181 232 { … … 188 239 } 189 240 241 // WKPageLoaderClient 242 243 void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void* clientInfo) 244 { 245 static_cast<TestController*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(page, frame); 246 } 247 248 void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame) 249 { 250 if (m_state != Resetting) 251 return; 252 253 if (!WKFrameIsMainFrame(frame)) 254 return; 255 256 WKRetainPtr<WKURLRef> wkURL(AdoptWK, WKFrameCopyURL(frame)); 257 RetainPtr<CFURLRef> cfURL= toCF(wkURL); 258 CFStringRef cfURLString = CFURLGetString(cfURL.get()); 259 if (!CFEqual(cfURLString, CFSTR("about:blank"))) 260 return; 261 262 m_doneResetting = true; 263 } 264 190 265 } // namespace WTR -
trunk/WebKitTools/WebKitTestRunner/TestController.h
r64485 r65267 54 54 WKContextRef context() { return m_context.get(); } 55 55 56 // Helper 57 static void runUntil(bool& done); 58 56 59 private: 57 60 void initialize(int argc, const char* argv[]); … … 65 68 void initializeTestPluginDirectory(); 66 69 70 void resetStateToConsistentValues(); 71 67 72 // WKContextInjectedBundleClient 68 73 static void didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void*); 69 74 void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody); 75 76 // WKPageLoaderClient 77 static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void*); 78 void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame); 79 70 80 71 81 OwnPtr<TestInvocation> m_currentInvocation; … … 82 92 WKRetainPtr<WKContextRef> m_context; 83 93 WKRetainPtr<WKPageNamespaceRef> m_pageNamespace; 94 95 enum State { 96 Initial, 97 Resetting, 98 RunningTest 99 }; 100 State m_state; 101 bool m_doneResetting; 84 102 }; 85 103 -
trunk/WebKitTools/WebKitTestRunner/TestInvocation.cpp
r64888 r65267 30 30 #include "TestController.h" 31 31 #include <WebKit2/WKContextPrivate.h> 32 #include <WebKit2/WKPreferencesPrivate.h>33 32 #include <WebKit2/WKRetainPtr.h> 34 33 #include <wtf/RetainPtr.h> … … 68 67 } 69 68 70 void TestInvocation::resetPreferencesToConsistentValues()71 {72 WKPreferencesRef preferences = WKContextGetPreferences(TestController::shared().context());73 WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);74 WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing);75 }76 77 69 void TestInvocation::invoke() 78 70 { 79 71 sizeWebViewForCurrentTest(m_pathOrURL); 80 resetPreferencesToConsistentValues();81 72 82 73 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest"))); … … 84 75 WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), messageBody.get()); 85 76 86 runUntil(m_gotInitialResponse);77 TestController::runUntil(m_gotInitialResponse); 87 78 if (m_error) { 88 79 dump("FAIL\n"); … … 92 83 WKPageLoadURL(TestController::shared().mainWebView()->page(), m_url.get()); 93 84 94 runUntil(m_gotFinalMessage);85 TestController::runUntil(m_gotFinalMessage); 95 86 if (m_error) { 96 87 dump("FAIL\n"); -
trunk/WebKitTools/WebKitTestRunner/TestInvocation.h
r64396 r65267 43 43 void dump(const char*); 44 44 45 void resetPreferencesToConsistentValues();46 47 // Helper48 static void runUntil(bool& done);49 50 45 WKRetainPtr<WKURLRef> m_url; 51 46 char* m_pathOrURL; -
trunk/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
r64985 r65267 54 54 BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */; }; 55 55 BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD7D2F711921278006DB7EE /* TestInvocation.cpp */; }; 56 BCDA2ABF1190B51A00C3BC47 /* TestInvocationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCDA2ABE1190B51A00C3BC47 /* TestInvocationMac.mm */; };57 56 BCDA2B9A1191051F00C3BC47 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */; }; 58 57 /* End PBXBuildFile section */ … … 133 132 BCD7D2F611921278006DB7EE /* TestInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestInvocation.h; sourceTree = "<group>"; }; 134 133 BCD7D2F711921278006DB7EE /* TestInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestInvocation.cpp; sourceTree = "<group>"; }; 135 BCDA2ABE1190B51A00C3BC47 /* TestInvocationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestInvocationMac.mm; sourceTree = "<group>"; };136 134 BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 137 135 /* End PBXFileReference section */ … … 271 269 BC7933FF118F7C84005EA8E2 /* main.mm */, 272 270 BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */, 273 BCDA2ABE1190B51A00C3BC47 /* TestInvocationMac.mm */,274 271 BC8C795B11D2785D004535A1 /* TestControllerMac.mm */, 275 272 ); … … 427 424 BC793431118F7F19005EA8E2 /* TestController.cpp in Sources */, 428 425 BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */, 429 BCDA2ABF1190B51A00C3BC47 /* TestInvocationMac.mm in Sources */,430 426 BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */, 431 427 BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */, -
trunk/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
r64286 r65267 46 46 } 47 47 48 void TestController::runUntil(bool& done) 49 { 50 while (!done) 51 [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; 52 } 53 48 54 } // namespace WTR -
trunk/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
r64948 r65267 114 114 } 115 115 116 void TestController::runUntil(bool& done) 117 { 118 while (!done) { 119 MSG msg; 120 BOOL result = GetMessage(&msg, 0, 0, 0); 121 if (result == -1) 122 return; 123 TranslateMessage(&msg); 124 DispatchMessage(&msg); 125 } 126 } 127 116 128 } // namespace WTR -
trunk/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
r64948 r65267 318 318 > 319 319 </File> 320 <File321 RelativePath=".\TestInvocationWin.cpp"322 >323 </File>324 320 </Filter> 325 321 <File
Note: See TracChangeset
for help on using the changeset viewer.