summaryrefslogtreecommitdiffstats
path: root/content/browser/speech
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 19:48:37 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 19:48:37 +0000
commitae67374948bc8c9009025972683cb1ba15b3ef9d (patch)
treea2c838f7ff06304cf3ea260d82f8811ce0d5e0f4 /content/browser/speech
parente5f0856d2676944b01ecb2b01c4f18fe2bc0bd77 (diff)
downloadchromium_src-ae67374948bc8c9009025972683cb1ba15b3ef9d.zip
chromium_src-ae67374948bc8c9009025972683cb1ba15b3ef9d.tar.gz
chromium_src-ae67374948bc8c9009025972683cb1ba15b3ef9d.tar.bz2
Remove a couple racy functions from ui_test_utils.
Un-disable the ReservedAccelerators test. Now seems to pass linux debug. Get rid of usage of WaitForNavigationInCurrentTab R=phajdan.jr@chromium.org BUG=69475 TEST=browser_tests.*,interactive_ui_tests.*,ui_tests.* Review URL: http://codereview.chromium.org/7693013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech')
-rw-r--r--content/browser/speech/speech_input_browsertest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/content/browser/speech/speech_input_browsertest.cc b/content/browser/speech/speech_input_browsertest.cc
index e5c5a2e..4110a81 100644
--- a/content/browser/speech/speech_input_browsertest.cc
+++ b/content/browser/speech/speech_input_browsertest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -141,19 +141,21 @@ class SpeechInputBrowserTest : public InProcessBrowserTest {
mouse_event.y = 0;
mouse_event.clickCount = 1;
TabContents* tab_contents = browser()->GetSelectedTabContents();
+ ui_test_utils::WindowedNotificationObserver observer(
+ content::NOTIFICATION_LOAD_STOP,
+ Source<NavigationController>(&tab_contents->controller()));
tab_contents->render_view_host()->ForwardMouseEvent(mouse_event);
mouse_event.type = WebKit::WebInputEvent::MouseUp;
tab_contents->render_view_host()->ForwardMouseEvent(mouse_event);
+ observer.Wait();
}
void RunSpeechInputTest(const FilePath::CharType* filename) {
- LoadAndStartSpeechInputTest(filename);
-
// The fake speech input manager would receive the speech input
// request and return the test string as recognition result. The test page
// then sets the URL fragment as 'pass' if it received the expected string.
- TabContents* tab_contents = browser()->GetSelectedTabContents();
- ui_test_utils::WaitForNavigations(&tab_contents->controller(), 1);
+ LoadAndStartSpeechInputTest(filename);
+
EXPECT_EQ("pass", browser()->GetSelectedTabContents()->GetURL().ref());
}