summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit.cc
diff options
context:
space:
mode:
authorjknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 08:57:13 +0000
committerjknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 08:57:13 +0000
commitf51411b225a29bfb3d97fc011fc181c2f2ddf021 (patch)
treee273d72719a3879e5b0daac5281ef4bb1035d66d /chrome/browser/autocomplete/autocomplete_edit.cc
parent34c2eee08d599451fb1d63af28944e9d355f1c92 (diff)
downloadchromium_src-f51411b225a29bfb3d97fc011fc181c2f2ddf021.zip
chromium_src-f51411b225a29bfb3d97fc011fc181c2f2ddf021.tar.gz
chromium_src-f51411b225a29bfb3d97fc011fc181c2f2ddf021.tar.bz2
Improve flaky ui_test AutomationProxyVisibleTest.AutocompleteMatchesTest
The omnibox requires that it is focused before text input to it will kick off the autocompletion providers. We add code (edit->WaitForFocus()) to the test to wait for the focus to be obtained before setting the omnibox’s text input and proceeding with the rest of the test. BUG=19876 TEST=Existing Review URL: http://codereview.chromium.org/3348021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 3201f2a..49b687b 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -448,6 +448,10 @@ const AutocompleteResult& AutocompleteEditModel::result() const {
void AutocompleteEditModel::OnSetFocus(bool control_down) {
has_focus_ = true;
control_key_state_ = control_down ? DOWN_WITHOUT_CHANGE : UP;
+ NotificationService::current()->Notify(
+ NotificationType::AUTOCOMPLETE_EDIT_FOCUSED,
+ Source<AutocompleteEditModel>(this),
+ NotificationService::NoDetails());
}
void AutocompleteEditModel::OnKillFocus() {