| Index: content/public/test/repeated_notification_observer.h | 
| diff --git a/content/public/test/repeated_notification_observer.h b/content/public/test/repeated_notification_observer.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..d7827f1c0b14be19919632afb8bd7c1760a76c3f | 
| --- /dev/null | 
| +++ b/content/public/test/repeated_notification_observer.h | 
| @@ -0,0 +1,36 @@ | 
| +// Copyright (c) 2017 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. | 
| + | 
| +#ifndef CONTENT_PUBLIC_BROWSER_REPEATED_NOTIFICATION_OBSERVER_H_ | 
| +#define CONTENT_PUBLIC_BROWSER_REPEATED_NOTIFICATION_OBSERVER_H_ | 
| + | 
| +#include "base/run_loop.h" | 
| +#include "content/public/browser/notification_observer.h" | 
| +#include "content/public/browser/notification_registrar.h" | 
| + | 
| +namespace content { | 
| + | 
| +// RepeatedNotificationObserver allows code to wait until specified number | 
| +// of notifications of particular type are posted. | 
| +class RepeatedNotificationObserver : public NotificationObserver { | 
| + public: | 
| +  explicit RepeatedNotificationObserver(int type, int count); | 
| + | 
| +  void Observe(int type, | 
| +               const NotificationSource& source, | 
| +               const NotificationDetails& details) override; | 
| +  void Wait(); | 
| + | 
| + private: | 
| +  int num_outstanding_; | 
| +  NotificationRegistrar registrar_; | 
| +  bool running_; | 
| +  base::RunLoop run_loop_; | 
| + | 
| +  DISALLOW_COPY_AND_ASSIGN(RepeatedNotificationObserver); | 
| +}; | 
| + | 
| +}  // namespace content | 
| + | 
| +#endif  // CONTENT_PUBLIC_BROWSER_REPEATED_NOTIFICATION_OBSERVER_H_ | 
|  |