| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 Value::CreateStringValue("bar")); | 380 Value::CreateStringValue("bar")); |
| 381 } | 381 } |
| 382 | 382 |
| 383 private: | 383 private: |
| 384 content::TestBrowserThread ui_thread_; | 384 content::TestBrowserThread ui_thread_; |
| 385 }; | 385 }; |
| 386 | 386 |
| 387 // Tests to see that webkit preferences are properly loaded and copied over | 387 // Tests to see that webkit preferences are properly loaded and copied over |
| 388 // to a WebPreferences object. | 388 // to a WebPreferences object. |
| 389 TEST_F(PrefServiceWebKitPrefs, PrefsCopied) { | 389 TEST_F(PrefServiceWebKitPrefs, PrefsCopied) { |
| 390 WebPreferences webkit_prefs = | 390 webkit_glue::WebPreferences webkit_prefs = |
| 391 WebContentsTester::For(contents())->TestGetWebkitPrefs(); | 391 WebContentsTester::For(contents())->TestGetWebkitPrefs(); |
| 392 | 392 |
| 393 // These values have been overridden by the profile preferences. | 393 // These values have been overridden by the profile preferences. |
| 394 EXPECT_EQ("UTF-8", webkit_prefs.default_encoding); | 394 EXPECT_EQ("UTF-8", webkit_prefs.default_encoding); |
| 395 EXPECT_EQ(20, webkit_prefs.default_font_size); | 395 EXPECT_EQ(20, webkit_prefs.default_font_size); |
| 396 EXPECT_FALSE(webkit_prefs.text_areas_are_resizable); | 396 EXPECT_FALSE(webkit_prefs.text_areas_are_resizable); |
| 397 EXPECT_TRUE(webkit_prefs.uses_universal_detector); | 397 EXPECT_TRUE(webkit_prefs.uses_universal_detector); |
| 398 | 398 |
| 399 // These should still be the default values. | 399 // These should still be the default values. |
| 400 #if defined(OS_MACOSX) | 400 #if defined(OS_MACOSX) |
| 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), webkit_prefs.standard_font_family); | 407 EXPECT_EQ(ASCIIToUTF16(kDefaultFont), webkit_prefs.standard_font_family); |
| 408 EXPECT_TRUE(webkit_prefs.javascript_enabled); | 408 EXPECT_TRUE(webkit_prefs.javascript_enabled); |
| 409 } | 409 } |
| OLD | NEW |