diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-04 20:08:32 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-04 20:08:32 +0000 |
commit | 68a97d444675f8df230d28e53e4d2978cd56a3fa (patch) | |
tree | 5ebead93b82334e5bac94868b2fb1d54fdd32317 | |
parent | 7c6536a2757ceb31441f7cd0c4f4db2608b9a855 (diff) | |
download | chromium_src-68a97d444675f8df230d28e53e4d2978cd56a3fa.zip chromium_src-68a97d444675f8df230d28e53e4d2978cd56a3fa.tar.gz chromium_src-68a97d444675f8df230d28e53e4d2978cd56a3fa.tar.bz2 |
Make KeyboardAccessTest.ReserveKeyboardAccelerator not fail
BUG=50760
TEST=interactive_ui_tests --gtest_filter=KeyboardAccessTest.ReserveKeyboardAccelerator
Review URL: http://codereview.chromium.org/3527007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61411 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 6628cf1..c2873f3 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -365,7 +365,7 @@ void TabCountChangeObserver::TabInsertedAt(TabContents* contents, CheckTabCount(); } -void TabCountChangeObserver::TabClosingAt(TabContents* contents, int index) { +void TabCountChangeObserver::TabDetachedAt(TabContents* contents, int index) { CheckTabCount(); } diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index e03f8a3..842092a 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -205,7 +205,7 @@ class TabCountChangeObserver : public TabStripModelObserver { virtual void TabInsertedAt(TabContents* contents, int index, bool foreground); - virtual void TabClosingAt(TabContents* contents, int index); + virtual void TabDetachedAt(TabContents* contents, int index); virtual void TabStripModelDeleted(); private: diff --git a/chrome/test/interactive_ui/keyboard_access_uitest.cc b/chrome/test/interactive_ui/keyboard_access_uitest.cc index 8fb0f98..54054be 100644 --- a/chrome/test/interactive_ui/keyboard_access_uitest.cc +++ b/chrome/test/interactive_ui/keyboard_access_uitest.cc @@ -117,8 +117,9 @@ TEST_F(KeyboardAccessTest, TestShiftAltMenuKeyboardAccess) { TestMenuKeyboardAccess(true, views::Event::EF_SHIFT_DOWN); } -// Fails, http://crbug.com/50760. -TEST_F(KeyboardAccessTest, FAILS_ReserveKeyboardAccelerators) { +// Test that JavaScript cannot intercept reserved keyboard accelerators like +// ctrl-t to open a new tab or ctrl-f4 to close a tab. +TEST_F(KeyboardAccessTest, ReserveKeyboardAccelerators) { const std::string kBadPage = "<html><script>" "document.onkeydown = function() {" |