diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 01:59:20 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 01:59:20 +0000 |
commit | 89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7 (patch) | |
tree | e893a2df5a13287114ac5e9411088e4e15677dea /chrome/test | |
parent | 8df1420fda46cf3dcfd8c4a6cb67446d92e81309 (diff) | |
download | chromium_src-89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7.zip chromium_src-89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7.tar.gz chromium_src-89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7.tar.bz2 |
Revert 36442 - Still causing test failures
4th attempt at landing this.
It caused several tests to fails previously.
Cannot repro any of the failure. I am suspecting a clobber would have probably fixed it. (there is a change in one of the IPC messages that probably messed up the build somehow).
No code change.
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/548057
TBR=jcampan@chromium.org
Review URL: http://codereview.chromium.org/536085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/data/english_page.html | 6 | ||||
-rw-r--r-- | chrome/test/data/french_page.html | 6 | ||||
-rw-r--r-- | chrome/test/ui_test_utils.cc | 32 | ||||
-rw-r--r-- | chrome/test/ui_test_utils.h | 4 |
4 files changed, 0 insertions, 48 deletions
diff --git a/chrome/test/data/english_page.html b/chrome/test/data/english_page.html deleted file mode 100644 index 539920d..0000000 --- a/chrome/test/data/english_page.html +++ /dev/null @@ -1,6 +0,0 @@ -<html> -<head><title>This page is in English</title></head> -<body> -No joke! This is a page written in English. Awesome don't you think? -</body> -</html> diff --git a/chrome/test/data/french_page.html b/chrome/test/data/french_page.html deleted file mode 100644 index 7fcf684..0000000 --- a/chrome/test/data/french_page.html +++ /dev/null @@ -1,6 +0,0 @@ -<html> -<head><title>Cette page est en Français</title></head> -<body> -Cette page a été rédigée en français. Saviez-vous que le Français est la langue officielle des jeux olympiques? Ça vous en bouche un coin, pas vrai? -</body> -</html> 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<RenderViewHost>(render_view_host)); - 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) @@ -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); diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h index 2c4cd95..89dc8fc 100644 --- a/chrome/test/ui_test_utils.h +++ b/chrome/test/ui_test_utils.h @@ -115,10 +115,6 @@ void WaitForFocusChange(RenderViewHost* rvh); // traversal). void WaitForFocusInBrowser(Browser* browser); -// Waits for the language of the page to have been detected and returns it. -// This should be called right after a navigation notification was received. -std::string WaitForLanguageDetection(TabContents* tab_contents); - // Performs a find in the page of the specified tab. Returns the number of // matches found. |ordinal| is an optional parameter which is set to the index // of the current match. |