OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 // Supply our own profile so we use the correct profile data. The test | 362 // Supply our own profile so we use the correct profile data. The test |
363 // harness is not supposed to overwrite a profile if it's already created. | 363 // harness is not supposed to overwrite a profile if it's already created. |
364 | 364 |
365 // Set some (WebKit) user preferences. | 365 // Set some (WebKit) user preferences. |
366 TestingPrefService* pref_services = profile()->GetTestingPrefService(); | 366 TestingPrefService* pref_services = profile()->GetTestingPrefService(); |
367 #if defined(TOOLKIT_GTK) | 367 #if defined(TOOLKIT_GTK) |
368 pref_services->SetUserPref(prefs::kUsesSystemTheme, | 368 pref_services->SetUserPref(prefs::kUsesSystemTheme, |
369 Value::CreateBooleanValue(false)); | 369 Value::CreateBooleanValue(false)); |
370 #endif | 370 #endif |
371 pref_services->SetUserPref(prefs::kGlobalDefaultCharset, | 371 pref_services->SetUserPref(prefs::kDefaultCharset, |
372 Value::CreateStringValue("utf8")); | 372 Value::CreateStringValue("utf8")); |
373 pref_services->SetUserPref(prefs::kWebKitGlobalDefaultFontSize, | 373 pref_services->SetUserPref(prefs::kWebKitDefaultFontSize, |
374 Value::CreateIntegerValue(20)); | 374 Value::CreateIntegerValue(20)); |
375 pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable, | 375 pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable, |
376 Value::CreateBooleanValue(false)); | 376 Value::CreateBooleanValue(false)); |
377 pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector, | 377 pref_services->SetUserPref(prefs::kWebKitUsesUniversalDetector, |
378 Value::CreateBooleanValue(true)); | 378 Value::CreateBooleanValue(true)); |
379 pref_services->SetUserPref("webkit.webprefs.foo", | 379 pref_services->SetUserPref("webkit.webprefs.foo", |
380 Value::CreateStringValue("bar")); | 380 Value::CreateStringValue("bar")); |
381 } | 381 } |
382 | 382 |
383 private: | 383 private: |
(...skipping 17 matching lines...) Expand all Loading... |
401 const char kDefaultFont[] = "Times"; | 401 const char kDefaultFont[] = "Times"; |
402 #elif defined(OS_CHROMEOS) | 402 #elif defined(OS_CHROMEOS) |
403 const char kDefaultFont[] = "Tinos"; | 403 const char kDefaultFont[] = "Tinos"; |
404 #else | 404 #else |
405 const char kDefaultFont[] = "Times New Roman"; | 405 const char kDefaultFont[] = "Times New Roman"; |
406 #endif | 406 #endif |
407 EXPECT_EQ(ASCIIToUTF16(kDefaultFont), | 407 EXPECT_EQ(ASCIIToUTF16(kDefaultFont), |
408 webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]); | 408 webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]); |
409 EXPECT_TRUE(webkit_prefs.javascript_enabled); | 409 EXPECT_TRUE(webkit_prefs.javascript_enabled); |
410 } | 410 } |
OLD | NEW |