Rubber-stamped by Anders Carlsson.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jul 2011 22:23:16 +0000 (22:23 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jul 2011 22:23:16 +0000 (22:23 +0000)
Update DumpRenderTree and API tests for the pictograph font family preference.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91794 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp
Tools/WebKitTestRunner/TestController.cpp

index 1b8cb9d..bf65133 100644 (file)
@@ -1,3 +1,18 @@
+2011-07-26  Dan Bernstein  <mitz@apple.com>
+
+        Rubber-stamped by Anders Carlsson.
+
+        Update DumpRenderTree and API tests for the pictograph font family preference.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (resetDefaultsToConsistentValues):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetDefaultsToConsistentValues):
+        * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
+        (TestWebKitAPI::TEST):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetStateToConsistentValues):
+
 2011-07-26  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Replace SpecificityCalculator with TestConfiguration-driven logic.
index 2ab2d6a..4b93597 100644 (file)
@@ -434,6 +434,7 @@ static void resetDefaultsToConsistentValues()
     [preferences setSansSerifFontFamily:@"Helvetica"];
     [preferences setCursiveFontFamily:@"Apple Chancery"];
     [preferences setFantasyFontFamily:@"Papyrus"];
+    [preferences setPictographFontFamily:@"Apple Color Emoji"];
     [preferences setDefaultFontSize:16];
     [preferences setDefaultFixedFontSize:13];
     [preferences setMinimumFontSize:0];
index 3f9ff7c..9be1975 100644 (file)
@@ -821,12 +821,14 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
     static BSTR sansSerifFamily = SysAllocString(TEXT("Helvetica"));
     static BSTR cursiveFamily = SysAllocString(TEXT("Apple Chancery"));
     static BSTR fantasyFamily = SysAllocString(TEXT("Papyrus"));
+    static BSTR pictographFamily = SysAllocString(TEXT("Apple Color Emoji"));
 #else
     static BSTR standardFamily = SysAllocString(TEXT("Times New Roman"));
     static BSTR fixedFamily = SysAllocString(TEXT("Courier New"));
     static BSTR sansSerifFamily = SysAllocString(TEXT("Arial"));
     static BSTR cursiveFamily = SysAllocString(TEXT("Comic Sans MS")); // Not actually cursive, but it's what IE and Firefox use.
     static BSTR fantasyFamily = SysAllocString(TEXT("Times New Roman"));
+    static BSTR pictographFamily = SysAllocString(TEXT("Times New Roman"));
 #endif
 
     preferences->setStandardFontFamily(standardFamily);
@@ -835,6 +837,7 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
     preferences->setSansSerifFontFamily(sansSerifFamily);
     preferences->setCursiveFontFamily(cursiveFamily);
     preferences->setFantasyFontFamily(fantasyFamily);
+    preferences->setPictographFontFamily(pictographFamily);
 
     preferences->setAutosaves(FALSE);
     preferences->setDefaultFontSize(16);
index b0b813d..70122a0 100644 (file)
@@ -52,6 +52,7 @@ TEST(WebKit2, WKPreferencesDefaults)
     static const char* expectedSansSerifFontFamily = "Arial";
     static const char* expectedCursiveFontFamily = "Comic Sans MS";
     static const char* expectedFantasyFontFamily = "Comic Sans MS";
+    static const char* expectedPictographFontFamily = "Times New Roman";
 #elif PLATFORM(MAC)
     static const char* expectedStandardFontFamily = "Times";
     static const char* expectedFixedFontFamily = "Courier";
@@ -59,6 +60,7 @@ TEST(WebKit2, WKPreferencesDefaults)
     static const char* expectedSansSerifFontFamily = "Helvetica";
     static const char* expectedCursiveFontFamily = "Apple Chancery";
     static const char* expectedFantasyFontFamily = "Papyrus";
+    static const char* expectedPictographFontFamily = "Apple Color Emoji";
 #endif
 
     WKPreferencesRef preference = WKPreferencesCreate();
@@ -79,6 +81,7 @@ TEST(WebKit2, WKPreferencesDefaults)
     EXPECT_WK_STREQ(expectedSansSerifFontFamily, adoptWK(WKPreferencesCopySansSerifFontFamily(preference)));
     EXPECT_WK_STREQ(expectedCursiveFontFamily, adoptWK(WKPreferencesCopyCursiveFontFamily(preference)));
     EXPECT_WK_STREQ(expectedFantasyFontFamily, adoptWK(WKPreferencesCopyFantasyFontFamily(preference)));
+    EXPECT_WK_STREQ(expectedPictographFontFamily, adoptWK(WKPreferencesCopyPictographFontFamily(preference)));
     EXPECT_EQ(0u, WKPreferencesGetMinimumFontSize(preference));
     EXPECT_FALSE(WKPreferencesGetPrivateBrowsingEnabled(preference));
     EXPECT_FALSE(WKPreferencesGetDeveloperExtrasEnabled(preference));
index 3a38333..474f5d2 100644 (file)
@@ -390,6 +390,7 @@ bool TestController::resetStateToConsistentValues()
     static WKStringRef cursiveFontFamily = WKStringCreateWithUTF8CString("Apple Chancery");
     static WKStringRef fantasyFontFamily = WKStringCreateWithUTF8CString("Papyrus");
     static WKStringRef fixedFontFamily = WKStringCreateWithUTF8CString("Courier");
+    static WKStringRef pictographFontFamily = WKStringCreateWithUTF8CString("Apple Color Emoji");
     static WKStringRef sansSerifFontFamily = WKStringCreateWithUTF8CString("Helvetica");
     static WKStringRef serifFontFamily = WKStringCreateWithUTF8CString("Times");
 
@@ -397,6 +398,7 @@ bool TestController::resetStateToConsistentValues()
     WKPreferencesSetCursiveFontFamily(preferences, cursiveFontFamily);
     WKPreferencesSetFantasyFontFamily(preferences, fantasyFontFamily);
     WKPreferencesSetFixedFontFamily(preferences, fixedFontFamily);
+    WKPreferencesSetPictographFontFamily(preferences, pictographFontFamily);
     WKPreferencesSetSansSerifFontFamily(preferences, sansSerifFontFamily);
     WKPreferencesSetSerifFontFamily(preferences, serifFontFamily);
 #endif