| Index: content/public/test/test_notification_tracker.h
|
| diff --git a/content/public/test/test_notification_tracker.h b/content/public/test/test_notification_tracker.h
|
| index f34fdae614da5b8acd16eea4985cab6c5b41bda9..14735c898cd31c1ce350c52c6211e55e1790fa51 100644
|
| --- a/content/public/test/test_notification_tracker.h
|
| +++ b/content/public/test/test_notification_tracker.h
|
| @@ -61,6 +61,20 @@ class TestNotificationTracker : public NotificationObserver {
|
| int type2,
|
| int type3);
|
|
|
| + // Returns the types of the received notifications in order. Usable
|
| + // with EXPECT_THAT(ElementsAre):
|
| + // EXPECT_THAT(tracker.GetTypesAndReset(),
|
| + // testing::ElementsAre(content::NOTIFICATION_LOAD_START, ...));
|
| + std::vector<int> GetTypes() const;
|
| +
|
| + // Like GetTypes, but also calls Reset() so that the next call will
|
| + // only check for new notifications.
|
| + std::vector<int> GetTypesAndReset() {
|
| + std::vector<int> result = GetTypes();
|
| + Reset();
|
| + return result;
|
| + }
|
| +
|
| // Returns the number of notifications received since the last reset.
|
| size_t size() const { return events_.size(); }
|
|
|
|
|