Index: webkit/tools/test_shell/test_shell.cc |
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc |
index e277fcb65b89a6698d368ef954f80191fe4afeca..bd17a4dd458697f543c791e9801e1deb6894ead1 100644 |
--- a/webkit/tools/test_shell/test_shell.cc |
+++ b/webkit/tools/test_shell/test_shell.cc |
@@ -78,6 +78,8 @@ const int kTestWindowHeight = 600; |
const int kSVGTestWindowWidth = 480; |
const int kSVGTestWindowHeight = 360; |
+const char kWebKitCommonScript[] = "Zyyy"; |
darin (slow to review)
2012/04/23 17:00:35
it seems unfortunate for this magic string to be r
falken
2012/04/24 01:27:10
This patch adds kWebKitCommonScript in pref_names.
|
+ |
// URLRequestTestShellFileJob is used to serve the inspector |
class URLRequestTestShellFileJob : public net::URLRequestFileJob { |
public: |
@@ -300,13 +302,17 @@ void TestShell::ResetWebPreferences() { |
*web_prefs_ = WebPreferences(); |
#if defined(OS_MACOSX) |
- web_prefs_->serif_font_family = ASCIIToUTF16("Times"); |
- web_prefs_->cursive_font_family = ASCIIToUTF16("Apple Chancery"); |
- web_prefs_->fantasy_font_family = ASCIIToUTF16("Papyrus"); |
+ web_prefs_->serif_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Times"); |
+ web_prefs_->cursive_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Apple Chancery"); |
+ web_prefs_->fantasy_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Papyrus"); |
#else |
// NOTE: case matters here, this must be 'times new roman', else |
// some layout tests fail. |
- web_prefs_->serif_font_family = ASCIIToUTF16("times new roman"); |
+ web_prefs_->serif_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("times new roman"); |
// These two fonts are picked from the intersection of |
// Win XP font list and Vista font list : |
@@ -318,12 +324,17 @@ void TestShell::ResetWebPreferences() { |
// They (especially Impact for fantasy) are not typical cursive |
// and fantasy fonts, but it should not matter for layout tests |
// as long as they're available. |
- web_prefs_->cursive_font_family = ASCIIToUTF16("Comic Sans MS"); |
- web_prefs_->fantasy_font_family = ASCIIToUTF16("Impact"); |
+ web_prefs_->cursive_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Comic Sans MS"); |
+ web_prefs_->fantasy_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Impact"); |
#endif |
- web_prefs_->standard_font_family = web_prefs_->serif_font_family; |
- web_prefs_->fixed_font_family = ASCIIToUTF16("Courier"); |
- web_prefs_->sans_serif_font_family = ASCIIToUTF16("Helvetica"); |
+ web_prefs_->standard_font_family_map[kWebKitCommonScript] = |
+ web_prefs_->serif_font_family_map[kWebKitCommonScript]; |
+ web_prefs_->fixed_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Courier"); |
+ web_prefs_->sans_serif_font_family_map[kWebKitCommonScript] = |
+ ASCIIToUTF16("Helvetica"); |
web_prefs_->default_encoding = "ISO-8859-1"; |
web_prefs_->default_font_size = 16; |