| Index: chrome/browser/prefs/pref_service_browsertest.cc
|
| diff --git a/chrome/browser/prefs/pref_service_browsertest.cc b/chrome/browser/prefs/pref_service_browsertest.cc
|
| index ba72e21885b265dbe21bc7f1552ee8befdc6c490..abbe7f38a894ce609c958c6fd25fa07bdd1bfc97 100644
|
| --- a/chrome/browser/prefs/pref_service_browsertest.cc
|
| +++ b/chrome/browser/prefs/pref_service_browsertest.cc
|
| @@ -164,69 +164,3 @@ IN_PROC_BROWSER_TEST_F(PreservedWindowPlacementIsLoaded, Test) {
|
| EXPECT_EQ(is_maximized, is_window_maximized);
|
| }
|
| #endif
|
| -
|
| -#if defined(OS_WIN) || defined(OS_MACOSX)
|
| -
|
| -class PreservedWindowPlacementIsMigrated : public PreferenceServiceTest {
|
| - public:
|
| - PreservedWindowPlacementIsMigrated() : PreferenceServiceTest(false) {
|
| - }
|
| -};
|
| -
|
| -IN_PROC_BROWSER_TEST_F(PreservedWindowPlacementIsMigrated, Test) {
|
| -#if defined(OS_WIN) && defined(USE_ASH)
|
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796).
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kAshBrowserTests))
|
| - return;
|
| -#endif
|
| -
|
| - // The window should open with the old reference profile, with window
|
| - // placement values stored in Local State.
|
| -
|
| - JSONFileValueSerializer deserializer(original_pref_file_);
|
| - scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, NULL));
|
| -
|
| - ASSERT_TRUE(root.get());
|
| - ASSERT_TRUE(root->IsType(base::Value::TYPE_DICTIONARY));
|
| -
|
| - // Retrieve the screen rect for the launched window
|
| - gfx::Rect bounds = browser()->window()->GetRestoredBounds();
|
| -
|
| - // Values from old reference profile in Local State should have been
|
| - // correctly migrated to the user's Preferences -- if so, the window
|
| - // should be set to values taken from the user's Local State.
|
| - base::DictionaryValue* root_dict =
|
| - static_cast<base::DictionaryValue*>(root.get());
|
| -
|
| - // Retrieve the expected rect values from User Preferences, where they
|
| - // should have been migrated from Local State.
|
| - int bottom = 0;
|
| - std::string kBrowserWindowPlacement(prefs::kBrowserWindowPlacement);
|
| - EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + ".bottom",
|
| - &bottom));
|
| - EXPECT_EQ(bottom, bounds.y() + bounds.height());
|
| -
|
| - int top = 0;
|
| - EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + ".top",
|
| - &top));
|
| - EXPECT_EQ(top, bounds.y());
|
| -
|
| - int left = 0;
|
| - EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + ".left",
|
| - &left));
|
| - EXPECT_EQ(left, bounds.x());
|
| -
|
| - int right = 0;
|
| - EXPECT_TRUE(root_dict->GetInteger(kBrowserWindowPlacement + ".right",
|
| - &right));
|
| - EXPECT_EQ(right, bounds.x() + bounds.width());
|
| -
|
| - // Find if launched window is maximized.
|
| - bool is_window_maximized = browser()->window()->IsMaximized();
|
| - bool is_maximized = false;
|
| - EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized",
|
| - &is_maximized));
|
| - EXPECT_EQ(is_maximized, is_window_maximized);
|
| -}
|
| -#endif
|
|
|