diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-26 04:40:12 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-26 04:40:12 +0000 |
commit | 21bce9266b8f27e255cb496ae5caf34b541c31be (patch) | |
tree | 0089dfba4b95ac34a0b8754c810721d3ed5b3860 /chrome/browser/blocked_popup_container_interactive_uitest.cc | |
parent | 8835eb430eb64d35cc64edd069aaa300761b341b (diff) | |
download | chromium_src-21bce9266b8f27e255cb496ae5caf34b541c31be.zip chromium_src-21bce9266b8f27e255cb496ae5caf34b541c31be.tar.gz chromium_src-21bce9266b8f27e255cb496ae5caf34b541c31be.tar.bz2 |
Do not send some keyboard shortcuts to the renderers
Walking the whole menu on every keypress seems ridiculous. Linux does this too :-/ (Caching is made hard because the user can change key equivalents in system preferences at every point in time, and we're not notified of that. And people only hit max 5 keys/second, so it's not all that ridiculous).
There's a UI test for this, but the interactive UI tests are not enabled on OS X, so it's not executed.
Menu walking code based on code from CocoatechCore.
BUG=5496,15090,24877
TEST=Go to http://unixpapa.com/js/testkey.html , check "keydown", focus the textbox, and make sure that cmd-t still opens tabs, cmd-shift-[ still switches tabs, cmd-w still closes tabs. however, cmd-L should not focus url bar and cmd-1 should not go to the first tab.
Review URL: http://codereview.chromium.org/273032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/blocked_popup_container_interactive_uitest.cc')
-rw-r--r-- | chrome/browser/blocked_popup_container_interactive_uitest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/blocked_popup_container_interactive_uitest.cc b/chrome/browser/blocked_popup_container_interactive_uitest.cc index 9eb001a..86d6c13 100644 --- a/chrome/browser/blocked_popup_container_interactive_uitest.cc +++ b/chrome/browser/blocked_popup_container_interactive_uitest.cc @@ -251,7 +251,6 @@ TEST_F(BlockedPopupContainerInteractiveTest, DontBreakOnBlur) { ASSERT_FALSE(automation()->WaitForWindowCountToBecome(1, 1500)); } -#if !defined(OS_MACOSX) // see BrowserWindowCocoa::GetCommandId // Tests that tab related keyboard accelerators are reserved by the app. class BrowserInteractiveTest : public UITest { @@ -280,9 +279,10 @@ TEST_F(BrowserInteractiveTest, ReserveKeyboardAccelerators) { base::VKEY_TAB, views::Event::EF_CONTROL_DOWN)); ASSERT_TRUE(browser->WaitForTabToBecomeActive(0, action_max_timeout_ms())); +#if !defined(OS_MACOSX) // see BrowserWindowCocoa::GetCommandId ASSERT_TRUE(browser->ActivateTab(1)); ASSERT_TRUE(window->SimulateOSKeyPress( base::VKEY_W, views::Event::EF_CONTROL_DOWN)); ASSERT_TRUE(browser->WaitForTabCountToBecome(1, action_max_timeout_ms())); -} #endif +} |