| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 248 |
| 249 // Supply our own profile so we use the correct profile data. The test | 249 // Supply our own profile so we use the correct profile data. The test |
| 250 // harness is not supposed to overwrite a profile if it's already created. | 250 // harness is not supposed to overwrite a profile if it's already created. |
| 251 | 251 |
| 252 // Set some (WebKit) user preferences. | 252 // Set some (WebKit) user preferences. |
| 253 TestingPrefService* pref_services = profile()->GetTestingPrefService(); | 253 TestingPrefService* pref_services = profile()->GetTestingPrefService(); |
| 254 #if defined(TOOLKIT_USES_GTK) | 254 #if defined(TOOLKIT_USES_GTK) |
| 255 pref_services->SetUserPref(prefs::kUsesSystemTheme, | 255 pref_services->SetUserPref(prefs::kUsesSystemTheme, |
| 256 Value::CreateBooleanValue(false)); | 256 Value::CreateBooleanValue(false)); |
| 257 #endif | 257 #endif |
| 258 pref_services->SetUserPref(prefs::kDefaultCharset, | 258 pref_services->SetUserPref(prefs::kGlobalDefaultCharset, |
| 259 Value::CreateStringValue("utf8")); | 259 Value::CreateStringValue("utf8")); |
| 260 pref_services->SetUserPref(prefs::kWebKitDefaultFontSize, | 260 pref_services->SetUserPref(prefs::kWebKitGlobalDefaultFontSize, |
| 261 Value::CreateIntegerValue(20)); | 261 Value::CreateIntegerValue(20)); |
| 262 pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable, | 262 pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable, |
| 263 Value::CreateBooleanValue(false)); | 263 Value::CreateBooleanValue(false)); |
| 264 pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector, | 264 pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector, |
| 265 Value::CreateBooleanValue(true)); | 265 Value::CreateBooleanValue(true)); |
| 266 pref_services->SetUserPref("webkit.webprefs.foo", | 266 pref_services->SetUserPref("webkit.webprefs.foo", |
| 267 Value::CreateStringValue("bar")); | 267 Value::CreateStringValue("bar")); |
| 268 } | 268 } |
| 269 | 269 |
| 270 private: | 270 private: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 286 #if defined(OS_MACOSX) | 286 #if defined(OS_MACOSX) |
| 287 const char kDefaultFont[] = "Times"; | 287 const char kDefaultFont[] = "Times"; |
| 288 #elif defined(OS_CHROMEOS) | 288 #elif defined(OS_CHROMEOS) |
| 289 const char kDefaultFont[] = "Tinos"; | 289 const char kDefaultFont[] = "Tinos"; |
| 290 #else | 290 #else |
| 291 const char kDefaultFont[] = "Times New Roman"; | 291 const char kDefaultFont[] = "Times New Roman"; |
| 292 #endif | 292 #endif |
| 293 EXPECT_EQ(ASCIIToUTF16(kDefaultFont), webkit_prefs.standard_font_family); | 293 EXPECT_EQ(ASCIIToUTF16(kDefaultFont), webkit_prefs.standard_font_family); |
| 294 EXPECT_TRUE(webkit_prefs.javascript_enabled); | 294 EXPECT_TRUE(webkit_prefs.javascript_enabled); |
| 295 } | 295 } |
| OLD | NEW |