diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-07 18:25:51 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-07 18:25:51 +0000 |
commit | 445873cae45fd143a1f1fd936a578b576b6118ec (patch) | |
tree | 40fc63a337afcac36dfce98fabfdd184c26bddb7 /views/focus | |
parent | a3f3079c3fa68dc79831183af4aa7ef79854f2ec (diff) | |
download | chromium_src-445873cae45fd143a1f1fd936a578b576b6118ec.zip chromium_src-445873cae45fd143a1f1fd936a578b576b6118ec.tar.gz chromium_src-445873cae45fd143a1f1fd936a578b576b6118ec.tar.bz2 |
Fixes two related focus bugs on views/gtk:
. Focus was inadvertently getting cleared when a window was shown
because the focus-in event is received asynchronously.
. In some situations we get multiple focus-out events in a row, this
caused us to clear out who we thought would have focus.
BUG=31140, 31130
TEST=see bugs
Review URL: http://codereview.chromium.org/521045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35714 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/focus_manager_unittest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc index bab3cf1..548989a 100644 --- a/views/focus/focus_manager_unittest.cc +++ b/views/focus/focus_manager_unittest.cc @@ -839,6 +839,9 @@ TEST_F(FocusManagerTest, FocusNativeControls) { // Test that when activating/deactivating the top window, the focus is stored/ // restored properly. TEST_F(FocusManagerTest, FocusStoreRestore) { + // Simulate an activate, otherwise the deactivate isn't going to do anything. + SimulateActivateWindow(); + NativeButton* button = new NativeButton(NULL, L"Press me"); View* view = new View(); view->SetFocusable(true); |