Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1806)

Unified Diff: content/public/test/browser_test_utils.h

Issue 2453693003: Browser tests for OOPIF support for drag-n-drop. (Closed)
Patch Set: Addressed CR feedback from nick@. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « content/browser/web_contents/drag_and_drop_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698