Index: content/public/test/test_notification_tracker.cc |
diff --git a/content/public/test/test_notification_tracker.cc b/content/public/test/test_notification_tracker.cc |
index bf166e724ae2fdae6670e7383bc9d42b41bf1214..6ab7f2a0af8878d5dc05b45c269c1206ecb0ba87 100644 |
--- a/content/public/test/test_notification_tracker.cc |
+++ b/content/public/test/test_notification_tracker.cc |
@@ -34,6 +34,11 @@ void TestNotificationTracker::ListenFor( |
registrar_.Add(this, type, source); |
} |
+void TestNotificationTracker::ListenForAll(int type) { |
+ registrar_.Add(this, type, |
+ NotificationService::AllBrowserContextsAndSources()); |
+} |
+ |
void TestNotificationTracker::Reset() { |
events_.clear(); |
} |
@@ -73,6 +78,13 @@ bool TestNotificationTracker::Check3AndReset(int type1, |
return success; |
} |
+std::vector<int> TestNotificationTracker::GetTypes() const { |
+ std::vector<int> types; |
+ for (size_t i = 0; i < size(); ++i) |
+ types.push_back(at(i).type); |
+ return types; |
+} |
+ |
void TestNotificationTracker::Observe( |
int type, |
const NotificationSource& source, |