| Index: content/public/test/browser_test_utils.h
|
| diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
|
| index cb917f6f1e8e9cc13c3613cf97cacce85628e828..3c1f72541639fe73216753ef12eff1b816673eeb 100644
|
| --- a/content/public/test/browser_test_utils.h
|
| +++ b/content/public/test/browser_test_utils.h
|
| @@ -417,12 +417,18 @@ class RenderProcessHostWatcher : public RenderProcessHostObserver {
|
|
|
| // Watches for responses from the DOMAutomationController and keeps them in a
|
| // queue. Useful for waiting for a message to be received.
|
| -class DOMMessageQueue : public NotificationObserver {
|
| +class DOMMessageQueue : public NotificationObserver,
|
| + public WebContentsObserver {
|
| public:
|
| // Constructs a DOMMessageQueue and begins listening for messages from the
|
| // DOMAutomationController. Do not construct this until the browser has
|
| // started.
|
| DOMMessageQueue();
|
| +
|
| + // Same as the default constructor, but only listens for messages
|
| + // sent from a particular |web_contents|.
|
| + explicit DOMMessageQueue(WebContents* web_contents);
|
| +
|
| ~DOMMessageQueue() override;
|
|
|
| // Removes all messages in the message queue.
|
| @@ -437,6 +443,9 @@ class DOMMessageQueue : public NotificationObserver {
|
| const NotificationSource& source,
|
| const NotificationDetails& details) override;
|
|
|
| + // Overridden WebContentsObserver methods.
|
| + void RenderProcessGone(base::TerminationStatus status) override;
|
| +
|
| private:
|
| NotificationRegistrar registrar_;
|
| std::queue<std::string> message_queue_;
|
|
|