From 397abd3643aa89424d75c051c411d6b705ed5a1c Mon Sep 17 00:00:00 2001 From: "nona@chromium.org" Date: Wed, 21 Aug 2013 05:44:19 +0000 Subject: Making back/forward/refresh keys as reserved key. The keys in first row are no longer assigned to F1-F10. BUG=276201 TEST=manually checked that event.preventDefault() can't cancel page refresh. Review URL: https://chromiumcodereview.appspot.com/23172009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218656 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/browser_command_controller_unittest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '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 b9e5516..d37dade 100644 --- a/chrome/browser/ui/browser_command_controller_unittest.cc +++ b/chrome/browser/ui/browser_command_controller_unittest.cc @@ -27,14 +27,14 @@ TEST_F(BrowserCommandControllerTest, IsReservedCommandOrKey) { #if defined(OS_CHROMEOS) // F1-3 keys are reserved Chrome accelerators on Chrome OS. EXPECT_TRUE(browser()->command_controller()->IsReservedCommandOrKey( - IDC_BACK, content::NativeWebKeyboardEvent(ui::ET_KEY_PRESSED, false, - ui::VKEY_F1, 0, 0))); + IDC_BACK, content::NativeWebKeyboardEvent( + ui::ET_KEY_PRESSED, false, ui::VKEY_BROWSER_BACK, 0, 0))); EXPECT_TRUE(browser()->command_controller()->IsReservedCommandOrKey( - IDC_FORWARD, content::NativeWebKeyboardEvent(ui::ET_KEY_PRESSED, false, - ui::VKEY_F2, 0, 0))); + IDC_FORWARD, content::NativeWebKeyboardEvent( + ui::ET_KEY_PRESSED, false, ui::VKEY_BROWSER_FORWARD, 0, 0))); EXPECT_TRUE(browser()->command_controller()->IsReservedCommandOrKey( - IDC_RELOAD, content::NativeWebKeyboardEvent(ui::ET_KEY_PRESSED, false, - ui::VKEY_F3, 0, 0))); + IDC_RELOAD, content::NativeWebKeyboardEvent( + ui::ET_KEY_PRESSED, false, ui::VKEY_BROWSER_REFRESH, 0, 0))); // When there are modifier keys pressed, don't reserve. EXPECT_FALSE(browser()->command_controller()->IsReservedCommandOrKey( -- cgit v1.1