Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7487)

Unified Diff: chrome/browser/ui/browser_command_controller_unittest.cc

Issue 2636013002: Disable browser key reservation in fullscreen mode (Closed)
Patch Set: Resolve review comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46198da7376293f7109127f445bf25f6083caa32..22a62f7fa9311ca61ae57882003d026b6d767e54 100644
--- a/chrome/browser/ui/browser_command_controller_unittest.cc
+++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -359,6 +359,17 @@ TEST_F(BrowserCommandControllerFullscreenTest,
EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_VIEW_PASSWORDS));
EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_ABOUT));
EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SHOW_APP_MENU));
+
+ // In fullscreen, only the exit fullscreen commands are reserved. All other
+ // shortcuts are unreserved. See https://goo.gl/4tJ32G.
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_CLOSE_TAB));
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_CLOSE_WINDOW));
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_INCOGNITO_WINDOW));
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_TAB));
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_NEW_WINDOW));
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SELECT_NEXT_TAB));
+ EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_SELECT_PREVIOUS_TAB));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_EXIT));
EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_FULLSCREEN));
// Exit fullscreen.
@@ -384,6 +395,14 @@ TEST_F(BrowserCommandControllerFullscreenTest,
EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_VIEW_PASSWORDS));
EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ABOUT));
EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_SHOW_APP_MENU));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_CLOSE_TAB));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_CLOSE_WINDOW));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_NEW_INCOGNITO_WINDOW));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_NEW_TAB));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_NEW_WINDOW));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_SELECT_NEXT_TAB));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_SELECT_PREVIOUS_TAB));
+ EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_EXIT));
EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_FULLSCREEN));
// Guest Profiles disallow some options.
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698