summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 05:29:29 +0000
committersuzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 05:29:29 +0000
commit9709d140a2513bd9f8bdcb079cacc68264e7d9ea (patch)
treec200dfea3caaf2b975f4699139c929a96c829716 /chrome
parentf49295488d8e66a663458b1d58f72f730969112c (diff)
downloadchromium_src-9709d140a2513bd9f8bdcb079cacc68264e7d9ea.zip
chromium_src-9709d140a2513bd9f8bdcb079cacc68264e7d9ea.tar.gz
chromium_src-9709d140a2513bd9f8bdcb079cacc68264e7d9ea.tar.bz2
Try to fix AutocompleteEditViewTest failures on buildbot (issue 23213).
The failures must be caused by timing issue. This CL tries to fix the issue by initializing all necessary components before running tests. BUG=23213 AutocompleteEditViewTest tests are failing TEST=none Review URL: http://codereview.chromium.org/242047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc29
1 files changed, 15 insertions, 14 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc b/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
index e87ae0c..c0988c2 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
@@ -243,6 +243,12 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
host_resolver()->AddSimulatedFailure(kBlockedHostnames[i]);
}
+ void SetupComponents() {
+ ASSERT_NO_FATAL_FAILURE(SetupHostResolver());
+ ASSERT_NO_FATAL_FAILURE(SetupSearchEngine());
+ ASSERT_NO_FATAL_FAILURE(SetupHistory());
+ }
+
virtual void Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
@@ -278,7 +284,8 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
// Test if ctrl-* accelerators are workable in omnibox.
// See http://crbug.com/19193: omnibox blocks ctrl-* commands
// This test is disabled. See bug 23213.
-IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DISABLED_BrowserAccelerators) {
+IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BrowserAccelerators) {
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
browser()->FocusLocationBar();
AutocompleteEditView* edit_view = NULL;
ASSERT_NO_FATAL_FAILURE(GetAutocompleteEditView(&edit_view));
@@ -313,8 +320,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DISABLED_BrowserAccelerators) {
}
IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BackspaceInKeywordMode) {
- ASSERT_NO_FATAL_FAILURE(SetupHostResolver());
- ASSERT_NO_FATAL_FAILURE(SetupSearchEngine());
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
browser()->FocusLocationBar();
AutocompleteEditView* edit_view = NULL;
@@ -366,6 +372,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BackspaceInKeywordMode) {
}
IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, Escape) {
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIHistoryURL));
browser()->FocusLocationBar();
@@ -387,8 +394,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, Escape) {
}
IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DesiredTLD) {
- ASSERT_NO_FATAL_FAILURE(SetupHostResolver());
- ASSERT_NO_FATAL_FAILURE(SetupSearchEngine());
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
browser()->FocusLocationBar();
AutocompleteEditView* edit_view = NULL;
@@ -408,8 +414,8 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DesiredTLD) {
}
// This test is disabled. See bug 23213.
-IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DISABLED_AltEnter) {
- ASSERT_NO_FATAL_FAILURE(SetupHostResolver());
+IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, AltEnter) {
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
browser()->FocusLocationBar();
AutocompleteEditView* edit_view = NULL;
@@ -467,10 +473,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToSearch) {
// See http://crbug.com/20934: Omnibox keyboard behavior wrong for
// "See recent pages in history"
IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToOpenHistoryPage) {
- ASSERT_NO_FATAL_FAILURE(SetupHostResolver());
- ASSERT_NO_FATAL_FAILURE(SetupSearchEngine());
- ASSERT_NO_FATAL_FAILURE(SetupHistory());
-
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
browser()->FocusLocationBar();
AutocompleteEditView* edit_view = NULL;
@@ -507,9 +510,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToOpenHistoryPage) {
}
IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EscapeToDefaultMatch) {
- ASSERT_NO_FATAL_FAILURE(SetupHostResolver());
- ASSERT_NO_FATAL_FAILURE(SetupSearchEngine());
- ASSERT_NO_FATAL_FAILURE(SetupHistory());
+ ASSERT_NO_FATAL_FAILURE(SetupComponents());
browser()->FocusLocationBar();
AutocompleteEditView* edit_view = NULL;