summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 04:10:59 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 04:10:59 +0000
commit19b6dad08234ef2727a7d2794542f353884e0e3b (patch)
tree4bd2902d0af0065ad1cd490da577c4007fbf1cbb /chrome/test/ui_test_utils.cc
parent4cdf120395ef61158c9e84e719929368ab919980 (diff)
downloadchromium_src-19b6dad08234ef2727a7d2794542f353884e0e3b.zip
chromium_src-19b6dad08234ef2727a7d2794542f353884e0e3b.tar.gz
chromium_src-19b6dad08234ef2727a7d2794542f353884e0e3b.tar.bz2
RSS feed subscription localization, part 2.
Re-enabling the tests that were disabled in the first pass. Also changing how we substitute localization values (using direct method that avoids flashing __MSG__const while the page is loading). Also made some minor fixes after testing various locales. BUG=37109 TEST=This CL is about enabling automated tests. Review URL: http://codereview.chromium.org/660328 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index d1cd7d3..fb1ec65 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -259,6 +259,26 @@ class SimpleNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(SimpleNotificationObserver);
};
+class TabParentedNotificationObserver : public NotificationObserver {
+ public:
+ TabParentedNotificationObserver() {
+ registrar_.Add(this, NotificationType::TAB_PARENTED,
+ NotificationService::AllSources());
+ ui_test_utils::RunMessageLoop();
+ }
+
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ MessageLoopForUI::current()->Quit();
+ }
+
+ private:
+ NotificationRegistrar registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(TabParentedNotificationObserver);
+};
+
class LanguageDetectionNotificationObserver : public NotificationObserver {
public:
explicit LanguageDetectionNotificationObserver(TabContents* tab) {
@@ -395,6 +415,10 @@ void WaitForNewTab(Browser* browser) {
new_tab_observer(NotificationType::TAB_ADDED, browser);
}
+void WaitForTabParented() {
+ TabParentedNotificationObserver new_tab_observer;
+}
+
void WaitForLoadStop(NavigationController* controller) {
SimpleNotificationObserver<NavigationController>
new_tab_observer(NotificationType::LOAD_STOP, controller);