Changeset 164295 in webkit
- Timestamp:
- Feb 18, 2014, 9:36:07 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r164270 r164295 1 2014-02-18 Dan Bernstein <mitz@apple.com> 2 3 Stop using PLATFORM(MAC) except where it means “OS X but not iOS” 4 https://bugs.webkit.org/show_bug.cgi?id=128952 5 6 Reviewed by Anders Carlsson. 7 8 * TestWebKitAPI/JavaScriptTest.h: Changed PLATFORM(MAC) to PLATFORM(COCOA) and changed to 9 use OBJC_CLASS. 10 * TestWebKitAPI/PlatformUtilities.h: Changed PLATFORM(MAC) to USE(FOUNDATION) and changed 11 to use OBJC_CLASS. 12 * TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: Changed PLATFORM(MAC) to 13 PLATFORM(COCOA). 14 (TestWebKitAPI::TEST): 15 * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp: 16 (TestWebKitAPI::TEST): Added expected default font-family values for iOS. 17 * TestWebKitAPI/config.h: Changed PLATFORM(MAC) to PLATFORM(COCOA). 18 * WebKitTestRunner/EventSenderProxy.h: Ditto. 19 * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Ditto. 20 * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Ditto. 21 * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto. 22 (WTR::AccessibilityTextMarker::platformTextMarker): 23 * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h: Ditto. 24 * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto. 25 (WTR::AccessibilityTextMarkerRange::platformTextMarkerRange): 26 * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h: Ditto. 27 * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto. 28 * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: Ditto. 29 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Ditto. 30 * WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto. 31 * WebKitTestRunner/PlatformWebView.h: Ditto. 32 * WebKitTestRunner/TestController.cpp: Ditto. 33 (WTR::TestController::resetStateToConsistentValues): 34 (WTR::TestController::processDidCrash): 35 * WebKitTestRunner/TestInvocation.cpp: Ditto. 36 (WTR::updateThreadedScrollingForCurrentTest): 37 (WTR::TestInvocation::dumpWebProcessUnresponsiveness): 38 * WebKitTestRunner/cg/TestInvocationCG.cpp: Ditto. 39 (WTR::computeMD5HashStringForContext): 40 1 41 2014-02-17 Dan Bernstein <mitz@apple.com> 2 42 -
trunk/Tools/TestWebKitAPI/JavaScriptTest.h
r93404 r164295 24 24 */ 25 25 26 #if PLATFORM(MAC) 27 #ifdef __OBJC__ 28 @class WKView; 29 @class WebView; 30 #else 31 class WKView; 32 class WebView; 33 #endif 26 #if PLATFORM(COCOA) 27 OBJC_CLASS WKView; 28 OBJC_CLASS WebView; 34 29 #endif 35 30 … … 45 40 ::testing::AssertionResult compareJSResult(const char* script, const char* actualResult, const char* expectedResult); 46 41 47 #if PLATFORM( MAC)42 #if PLATFORM(COCOA) 48 43 ::testing::AssertionResult runJSTest(const char* webViewExpr, const char* scriptExpr, const char* expectedResultExpr, WebView *, const char* script, const char* expectedResult); 49 44 ::testing::AssertionResult runJSTest(const char* viewExpr, const char* scriptExpr, const char* expectedResultExpr, WKView *, const char* script, const char* expectedResult); -
trunk/Tools/TestWebKitAPI/PlatformUtilities.h
r121979 r164295 30 30 #include <string> 31 31 32 #if PLATFORM(MAC) 33 #if __OBJC__ 34 @class NSString; 35 #else 36 class NSString; 37 #endif 32 #if USE(FOUNDATION) 33 OBJC_CLASS NSString; 38 34 #endif 39 35 … … 64 60 std::string toSTD(WKRetainPtr<WKStringRef>); 65 61 std::string toSTD(const char*); 66 #if PLATFORM(MAC)62 #if USE(FOUNDATION) 67 63 std::string toSTD(NSString *); 68 64 #endif -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp
r160104 r164295 90 90 // down event only represents a raw key down. We expect the key press to be handled (because it 91 91 // inserts text into the text field). But the raw key down should not be handled. 92 #if PLATFORM( MAC)92 #if PLATFORM(COCOA) 93 93 EXPECT_FALSE(didNotHandleKeyDownEvent); 94 94 #elif PLATFORM(WIN) … … 108 108 EXPECT_JS_TRUE(webView.page(), "textFieldContainsSpace()"); 109 109 110 #if PLATFORM( MAC)110 #if PLATFORM(COCOA) 111 111 EXPECT_FALSE(didNotHandleKeyDownEvent); 112 112 #elif PLATFORM(WIN) -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp
r135702 r164295 58 58 static const char* expectedFantasyFontFamily = "Papyrus"; 59 59 static const char* expectedPictographFontFamily = "Apple Color Emoji"; 60 #elif PLATFORM(IOS) 61 static const char* expectedStandardFontFamily = "Times"; 62 static const char* expectedFixedFontFamily = "Courier"; 63 static const char* expectedSerifFontFamily = "Times"; 64 static const char* expectedSansSerifFontFamily = "Helvetica"; 65 static const char* expectedCursiveFontFamily = "Snell Roundhand"; 66 static const char* expectedFantasyFontFamily = "Papyrus"; 67 static const char* expectedPictographFontFamily = "AppleColorEmoji"; 60 68 #elif PLATFORM(GTK) || PLATFORM(EFL) 61 69 static const char* expectedStandardFontFamily = "Times"; -
trunk/Tools/TestWebKitAPI/config.h
r149446 r164295 88 88 #endif 89 89 90 #if PLATFORM( MAC) && defined(__OBJC__)90 #if PLATFORM(COCOA) && defined(__OBJC__) 91 91 #import <WebKit/WebKit.h> 92 92 #endif -
trunk/Tools/WebKitTestRunner/EventSenderProxy.h
r164105 r164295 113 113 WKPoint m_clickPosition; 114 114 WKEventMouseButton m_clickButton; 115 #if PLATFORM( MAC)115 #if PLATFORM(COCOA) 116 116 int eventNumber; 117 117 #elif PLATFORM(GTK) -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
r162538 r164295 88 88 // Unsupported methods on various platforms. 89 89 // As they're implemented on other platforms this list should be modified. 90 #if (!PLATFORM(GTK) && !PLATFORM( MAC) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)90 #if (!PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY) 91 91 bool AccessibilityController::addNotificationListener(JSValueRef) { return false; } 92 92 bool AccessibilityController::removeNotificationListener() { return false; } -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h
r161666 r164295 67 67 AccessibilityController(); 68 68 69 #if PLATFORM( MAC)69 #if PLATFORM(COCOA) 70 70 RetainPtr<NotificationHandler> m_globalNotificationHandler; 71 71 #endif -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp
r101700 r164295 61 61 PlatformTextMarker AccessibilityTextMarker::platformTextMarker() const 62 62 { 63 #if PLATFORM( MAC)63 #if PLATFORM(COCOA) 64 64 return m_textMarker.get(); 65 65 #else -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h
r100488 r164295 32 32 #include <wtf/Platform.h> 33 33 34 #if PLATFORM( MAC)34 #if PLATFORM(COCOA) 35 35 #include <wtf/RetainPtr.h> 36 36 typedef CFTypeRef PlatformTextMarker; … … 60 60 AccessibilityTextMarker(const AccessibilityTextMarker&); 61 61 62 #if PLATFORM( MAC)62 #if PLATFORM(COCOA) 63 63 RetainPtr<PlatformTextMarker> m_textMarker; 64 64 #else … … 67 67 }; 68 68 69 #if !PLATFORM( MAC)69 #if !PLATFORM(COCOA) 70 70 inline bool AccessibilityTextMarker::isEqual(AccessibilityTextMarker*) { return false; } 71 71 #endif -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp
r101700 r164295 61 61 PlatformTextMarkerRange AccessibilityTextMarkerRange::platformTextMarkerRange() const 62 62 { 63 #if PLATFORM( MAC)63 #if PLATFORM(COCOA) 64 64 return m_textMarkerRange.get(); 65 65 #else -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h
r100488 r164295 32 32 #include <wtf/Platform.h> 33 33 34 #if PLATFORM( MAC)34 #if PLATFORM(COCOA) 35 35 #include <wtf/RetainPtr.h> 36 36 typedef CFTypeRef PlatformTextMarkerRange; … … 58 58 AccessibilityTextMarkerRange(const AccessibilityTextMarkerRange&); 59 59 60 #if PLATFORM( MAC)60 #if PLATFORM(COCOA) 61 61 RetainPtr<PlatformTextMarkerRange> m_textMarkerRange; 62 62 #else … … 65 65 }; 66 66 67 #if !PLATFORM( MAC)67 #if !PLATFORM(COCOA) 68 68 inline bool AccessibilityTextMarkerRange::isEqual(AccessibilityTextMarkerRange*) { return false; } 69 69 #endif -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
r164189 r164295 62 62 #endif 63 63 64 #if (!PLATFORM( MAC) && !PLATFORM(GTK) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)64 #if (!PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY) 65 65 AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement) { } 66 66 AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement&) { } -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
r164165 r164295 36 36 #include <wtf/Vector.h> 37 37 38 #if PLATFORM( MAC)38 #if PLATFORM(COCOA) 39 39 #ifdef __OBJC__ 40 40 typedef id PlatformUIElement; … … 51 51 #endif 52 52 53 #if PLATFORM( MAC)53 #if PLATFORM(COCOA) 54 54 #ifdef __OBJC__ 55 55 typedef id NotificationHandler; … … 265 265 // A retained, platform specific object used to help manage notifications for this object. 266 266 #if HAVE(ACCESSIBILITY) 267 #if PLATFORM( MAC)267 #if PLATFORM(COCOA) 268 268 NotificationHandler m_notificationHandler; 269 269 … … 274 274 #endif 275 275 276 #if PLATFORM( MAC) || PLATFORM(GTK) || PLATFORM(EFL)276 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(EFL) 277 277 void getChildren(Vector<RefPtr<AccessibilityUIElement> >&); 278 278 void getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >&, unsigned location, unsigned length); -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r160104 r164295 1863 1863 } 1864 1864 1865 #if !PLATFORM( MAC)1865 #if !PLATFORM(COCOA) 1866 1866 void InjectedBundlePage::platformDidStartProvisionalLoadForFrame(WKBundleFrameRef) 1867 1867 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r161666 r164295 34 34 #include <wtf/PassRefPtr.h> 35 35 36 #if PLATFORM( MAC)36 #if PLATFORM(COCOA) 37 37 #include <wtf/RetainPtr.h> 38 38 #include <CoreFoundation/CFRunLoop.h> -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r158266 r164295 81 81 bool windowIsKey() const { return m_windowIsKey; } 82 82 83 #if PLATFORM( MAC) || PLATFORM(EFL)83 #if PLATFORM(COCOA) || PLATFORM(EFL) 84 84 bool viewSupportsOptions(WKDictionaryRef) const; 85 85 #else -
trunk/Tools/WebKitTestRunner/TestController.cpp
r164105 r164295 53 53 #include <wtf/text/CString.h> 54 54 55 #if PLATFORM( MAC)55 #if PLATFORM(COCOA) 56 56 #include <WebKit2/WKPagePrivateMac.h> 57 57 #endif 58 58 59 #if !PLATFORM( MAC)59 #if !PLATFORM(COCOA) 60 60 #include <WebKit2/WKTextChecker.h> 61 61 #endif … … 588 588 resetPreferencesToConsistentValues(); 589 589 590 #if !PLATFORM( MAC)590 #if !PLATFORM(COCOA) 591 591 WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true); 592 592 #endif … … 1172 1172 // ensure we only print the crashed message once. 1173 1173 if (!m_didPrintWebProcessCrashedMessage) { 1174 #if PLATFORM( MAC)1174 #if PLATFORM(COCOA) 1175 1175 pid_t pid = WKPageGetProcessIdentifier(m_mainWebView->page()); 1176 1176 fprintf(stderr, "#CRASHED - WebProcess (pid %ld)\n", static_cast<long>(pid)); -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r163821 r164295 42 42 #include <wtf/text/CString.h> 43 43 44 #if PLATFORM(MAC) 45 #if !PLATFORM(IOS) 44 #if PLATFORM(MAC) && !PLATFORM(IOS) 46 45 #include <Carbon/Carbon.h> 47 46 #endif 47 48 #if PLATFORM(COCOA) 48 49 #include <WebKit2/WKPagePrivateMac.h> 49 50 #endif … … 139 140 #endif 140 141 141 #if PLATFORM( MAC)142 #if PLATFORM(COCOA) 142 143 static bool shouldUseThreadedScrolling(const char* pathOrURL) 143 144 { … … 148 149 static void updateThreadedScrollingForCurrentTest(const char* pathOrURL) 149 150 { 150 #if PLATFORM( MAC)151 #if PLATFORM(COCOA) 151 152 WKRetainPtr<WKMutableDictionaryRef> viewOptions = adoptWK(WKMutableDictionaryCreate()); 152 153 WKRetainPtr<WKStringRef> useThreadedScrollingKey = adoptWK(WKStringCreateWithUTF8CString("ThreadedScrolling")); … … 275 276 { 276 277 const char* errorMessageToStderr = 0; 277 #if PLATFORM( MAC)278 #if PLATFORM(COCOA) 278 279 char buffer[64]; 279 280 pid_t pid = WKPageGetProcessIdentifier(TestController::shared().mainWebView()->page()); -
trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
r162729 r164295 87 87 MD5 md5; 88 88 unsigned char* bitmapData = static_cast<unsigned char*>(CGBitmapContextGetData(bitmapContext)); 89 #if PLATFORM( MAC)89 #if PLATFORM(COCOA) 90 90 if ((CGBitmapContextGetBitmapInfo(bitmapContext) & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Big) { 91 91 for (unsigned row = 0; row < pixelsHigh; row++) {
Note:
See TracChangeset
for help on using the changeset viewer.