summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 17:38:19 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 17:38:19 +0000
commitcf3f387e6dd8072cb884964923e978bb198bca12 (patch)
tree358fbdcfc310baba78a7b87bfc48a4a402ae968e /chrome/test/ui_test_utils.cc
parentae1b251286512eded9ff13561ea84a645878859b (diff)
downloadchromium_src-cf3f387e6dd8072cb884964923e978bb198bca12.zip
chromium_src-cf3f387e6dd8072cb884964923e978bb198bca12.tar.gz
chromium_src-cf3f387e6dd8072cb884964923e978bb198bca12.tar.bz2
Revert 36362 - It breaks NACLTests and Chrome Frame Tests
3rd attempt at landing the 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. Review URL: http://codereview.chromium.org/518075 TBR=jcampan@chromium.org Review URL: http://codereview.chromium.org/546062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc32
1 files changed, 0 insertions, 32 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index e4b5818..6723084 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -254,33 +254,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)
@@ -511,11 +484,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);