Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / bookmarks / bookmark_context_menu_controller_unittest.cc
index b8798c2..2d64f64 100644 (file)
@@ -240,14 +240,8 @@ TEST_F(BookmarkContextMenuControllerTest, MultipleFoldersWithURLs) {
 
 // Tests the enabled state of open incognito.
 TEST_F(BookmarkContextMenuControllerTest, DisableIncognito) {
-  // Create an incognito Profile. It must be associated with the original
-  // Profile, so that GetOriginalProfile() works as expected.
-  TestingProfile::Builder builder;
-  builder.SetIncognito();
-  scoped_ptr<TestingProfile> testing_incognito = builder.Build();
-  testing_incognito->SetOriginalProfile(profile_.get());
-  TestingProfile* incognito = testing_incognito.get();
-  profile_->SetOffTheRecordProfile(testing_incognito.PassAs<Profile>());
+  TestingProfile* incognito =
+      TestingProfile::Builder().BuildIncognito(profile_.get());
 
   incognito->CreateBookmarkModel(true);
   BookmarkModel* model = BookmarkModelFactory::GetForProfile(incognito);
@@ -349,19 +343,19 @@ TEST_F(BookmarkContextMenuControllerTest,
 
   // By default, the pref is not managed and the command is enabled.
   TestingPrefServiceSyncable* prefs = profile_->GetTestingPrefService();
-  EXPECT_FALSE(
-      prefs->IsManagedPreference(prefs::kShowAppsShortcutInBookmarkBar));
+  EXPECT_FALSE(prefs->IsManagedPreference(
+      bookmarks::prefs::kShowAppsShortcutInBookmarkBar));
   EXPECT_TRUE(
       controller.IsCommandIdEnabled(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT));
 
   // Disabling the shorcut by policy disables the command.
-  prefs->SetManagedPref(prefs::kShowAppsShortcutInBookmarkBar,
+  prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar,
                         new base::FundamentalValue(false));
   EXPECT_FALSE(
       controller.IsCommandIdEnabled(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT));
 
   // And enabling the shortcut by policy disables the command too.
-  prefs->SetManagedPref(prefs::kShowAppsShortcutInBookmarkBar,
+  prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar,
                         new base::FundamentalValue(true));
   EXPECT_FALSE(
       controller.IsCommandIdEnabled(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT));