[Locked Fullscreen] Disable additional keyboard shortcuts in locked fullscreen
The find bar and zoom commands in locked fullscreen mode expose an escape hatch
that can be used to exit the mode so we're disabling them.
Bug: 904637
Change-Id: I367635fde3bbcc5aa74aecc9cc25d5d39ca041c7
Reviewed-on: https://chromium-review.googlesource.com/c/1375733
Commit-Queue: Ivan Ĺ andrk <[email protected]>
Reviewed-by: Karan Bhatia <[email protected]>
Reviewed-by: Michael Wasserman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#616662}
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc
index 1a4a8bc1..fbb1df01 100644
--- a/chrome/browser/extensions/window_open_apitest.cc
+++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -461,13 +461,17 @@
"updateWindowToLockedFullscreen"))
<< message_;
- // IDC_EXIT is not enabled in locked fullscreen.
+ // IDC_EXIT should always be disabled in locked fullscreen.
EXPECT_FALSE(browser()->command_controller()->IsCommandEnabled(IDC_EXIT));
+ // Some other disabled commands.
+ EXPECT_FALSE(browser()->command_controller()->IsCommandEnabled(IDC_FIND));
+ EXPECT_FALSE(
+ browser()->command_controller()->IsCommandEnabled(IDC_ZOOM_PLUS));
+
// Verify some whitelisted commands.
EXPECT_TRUE(browser()->command_controller()->IsCommandEnabled(IDC_COPY));
- EXPECT_TRUE(browser()->command_controller()->IsCommandEnabled(IDC_FIND));
- EXPECT_TRUE(browser()->command_controller()->IsCommandEnabled(IDC_ZOOM_PLUS));
+ EXPECT_TRUE(browser()->command_controller()->IsCommandEnabled(IDC_PASTE));
}
IN_PROC_BROWSER_TEST_F(WindowOpenApiTest,