From bdd7a12d4abc0b6456f679bb077045a0147c3dfc Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Wed, 20 Jan 2010 02:32:24 +0000 Subject: Revert 36589 - Still failing the reliability tests. Another try at landing this. It caused several tests to fails previously. There was a crasher in some Windows code in the CLD that has been removed by the port of the CLD code to Linux and Mac. That should hopefully make everything work now. Enabling language detection on page load. A memory error has been fixed in the CLD library in the meantime. This should hopefully fixes the crashers in the reliability tests. Note that this version is actually simpler than the original review since the detection is now performed in the renderer. (So the CLD code runs sandboxed.) Original review: http://codereview.chromium.org/492024/show BUG=30662 TEST=Run the unittests. TBR=brettw Review URL: http://codereview.chromium.org/552049 TBR=jcampan@chromium.org Review URL: http://codereview.chromium.org/554015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36603 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/ui_test_utils.cc | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'chrome/test/ui_test_utils.cc') diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index 4bb031e..add23d5 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -255,33 +255,6 @@ class SimpleNotificationObserver : public NotificationObserver { DISALLOW_COPY_AND_ASSIGN(SimpleNotificationObserver); }; -class LanguageDetectionNotificationObserver : public NotificationObserver { - public: - explicit LanguageDetectionNotificationObserver( - RenderViewHost* render_view_host) { - registrar_.Add(this, NotificationType::TAB_LANGUAGE_DETERMINED, - Source(render_view_host)); - ui_test_utils::RunMessageLoop(); - } - - virtual void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details) { - language_ = *(Details(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) @@ -512,11 +485,6 @@ void WaitForFocusInBrowser(Browser* browser) { browser); } -std::string WaitForLanguageDetection(TabContents* tab) { - LanguageDetectionNotificationObserver observer(tab->render_view_host()); - 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); -- cgit v1.1