| Index: chrome/browser/ui/browser_command_controller_unittest.cc
|
| diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc
|
| index 22a62f7fa9311ca61ae57882003d026b6d767e54..42fa30a3b22cd45de47ed71187883c78d946ed88 100644
|
| --- a/chrome/browser/ui/browser_command_controller_unittest.cc
|
| +++ b/chrome/browser/ui/browser_command_controller_unittest.cc
|
| @@ -161,20 +161,42 @@ TEST_F(BrowserCommandControllerTest, IncognitoCommands) {
|
| testprofile->SetGuestSession(true);
|
| chrome::BrowserCommandController
|
| ::UpdateSharedCommandsForIncognitoAvailability(
|
| - browser()->command_controller()->command_updater(), testprofile);
|
| + browser()->command_controller()->command_updater(), testprofile, false);
|
| EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_OPTIONS));
|
| EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_IMPORT_SETTINGS));
|
| EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SHOW_SIGNIN));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_INCOGNITO_WINDOW));
|
| + EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_NEW_WINDOW));
|
| +
|
| + chrome::BrowserCommandController
|
| + ::UpdateSharedCommandsForIncognitoAvailability(
|
| + browser()->command_controller()->command_updater(), testprofile, true);
|
| + EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_OPTIONS));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_IMPORT_SETTINGS));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SHOW_SIGNIN));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_INCOGNITO_WINDOW));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_WINDOW));
|
|
|
| testprofile->SetGuestSession(false);
|
| IncognitoModePrefs::SetAvailability(browser()->profile()->GetPrefs(),
|
| IncognitoModePrefs::FORCED);
|
| chrome::BrowserCommandController
|
| ::UpdateSharedCommandsForIncognitoAvailability(
|
| - browser()->command_controller()->command_updater(), testprofile);
|
| + browser()->command_controller()->command_updater(), testprofile, false);
|
| EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_OPTIONS));
|
| EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_IMPORT_SETTINGS));
|
| EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SHOW_SIGNIN));
|
| + EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_NEW_INCOGNITO_WINDOW));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_WINDOW));
|
| +
|
| + chrome::BrowserCommandController
|
| + ::UpdateSharedCommandsForIncognitoAvailability(
|
| + browser()->command_controller()->command_updater(), testprofile, true);
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_OPTIONS));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_IMPORT_SETTINGS));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SHOW_SIGNIN));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_INCOGNITO_WINDOW));
|
| + EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_WINDOW));
|
| }
|
|
|
| TEST_F(BrowserCommandControllerTest, AppFullScreen) {
|
|
|