diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 05:29:14 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 05:29:14 +0000 |
commit | eb3895186d79897fc17310cae771ce2d8df32066 (patch) | |
tree | c6423387ba3366c7503db22c4450e280e0d0375a /chrome/test/ui_test_utils.cc | |
parent | d6abb667e3ef8fcdf3a01e287e01bb3729b77f18 (diff) | |
download | chromium_src-eb3895186d79897fc17310cae771ce2d8df32066.zip chromium_src-eb3895186d79897fc17310cae771ce2d8df32066.tar.gz chromium_src-eb3895186d79897fc17310cae771ce2d8df32066.tar.bz2 |
Attempt at fixing flakyness of the browser test:
BrowserTest.PageLanguageDetection.
BUG=40962
TEST=The test should not be flaky anymore.
Review URL: http://codereview.chromium.org/1642002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r-- | chrome/test/ui_test_utils.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index 8b86ff8..dec305b 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -215,32 +215,6 @@ class DownloadsCompleteObserver : public DownloadManager::Observer, DISALLOW_COPY_AND_ASSIGN(DownloadsCompleteObserver); }; -class LanguageDetectionNotificationObserver : public NotificationObserver { - public: - explicit LanguageDetectionNotificationObserver(TabContents* tab) { - registrar_.Add(this, NotificationType::TAB_LANGUAGE_DETERMINED, - Source<TabContents>(tab)); - ui_test_utils::RunMessageLoop(); - } - - virtual void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details) { - language_ = *(Details<std::string>(details).ptr()); - MessageLoopForUI::current()->Quit(); - } - - std::string language() const { - return language_; - } - - private: - NotificationRegistrar registrar_; - std::string language_; - - DISALLOW_COPY_AND_ASSIGN(LanguageDetectionNotificationObserver); -}; - class FindInPageNotificationObserver : public NotificationObserver { public: explicit FindInPageNotificationObserver(TabContents* parent_tab) @@ -543,11 +517,6 @@ void WaitForFocusInBrowser(Browser* browser) { Source<Browser>(browser)); } -std::string WaitForLanguageDetection(TabContents* tab) { - LanguageDetectionNotificationObserver observer(tab); - return observer.language(); -} - int FindInPage(TabContents* tab_contents, const string16& search_string, bool forward, bool match_case, int* ordinal) { tab_contents->StartFinding(search_string, forward, match_case); |