summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-07 17:55:50 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-07 17:55:50 +0000
commitfadc607b6dd990f37f88be954ee8593ba3cc6a38 (patch)
treee256676526459af214e2be3c12d5fd2b3533f504 /chrome/test/ui_test_utils.cc
parent20532328921c20eeb6c49a8921bca8b044d73791 (diff)
downloadchromium_src-fadc607b6dd990f37f88be954ee8593ba3cc6a38.zip
chromium_src-fadc607b6dd990f37f88be954ee8593ba3cc6a38.tar.gz
chromium_src-fadc607b6dd990f37f88be954ee8593ba3cc6a38.tar.bz2
Clean up warnings found in our testing code.
Time wise, this only speeds things up by a minute, which I think is within the margin of error. I can't get a good size measurement since we aren't building .a files for a lot of this code. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6312137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index 873bfe1..436273b 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -873,6 +873,20 @@ TestWebSocketServer::~TestWebSocketServer() {
base::LaunchApp(*cmd_line.get(), true, false, NULL);
}
+TestNotificationObserver::TestNotificationObserver()
+ : source_(NotificationService::AllSources()) {
+}
+
+TestNotificationObserver::~TestNotificationObserver() {}
+
+void TestNotificationObserver::Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ source_ = source;
+ details_ = details;
+ MessageLoopForUI::current()->Quit();
+}
+
WindowedNotificationObserver::WindowedNotificationObserver(
NotificationType notification_type,
const NotificationSource& source)
@@ -882,6 +896,8 @@ WindowedNotificationObserver::WindowedNotificationObserver(
registrar_.Add(this, notification_type, waiting_for_);
}
+WindowedNotificationObserver::~WindowedNotificationObserver() {}
+
void WindowedNotificationObserver::Wait() {
if (waiting_for_ == NotificationService::AllSources()) {
LOG(FATAL) << "Wait called when monitoring all sources. You must use "
@@ -926,6 +942,8 @@ DOMMessageQueue::DOMMessageQueue() {
NotificationService::AllSources());
}
+DOMMessageQueue::~DOMMessageQueue() {}
+
void DOMMessageQueue::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {