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

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

Issue 1934703002: Fix keyboard focus for OOPIF-<webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test flakiness and comments in PS 7,8. Created 4 years, 6 months 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 0bf16be20617d7cfa0226a03de91a2f3ede496c7..8cc4e93717f4dfaa6d28421dedb3551a7b9ac71b 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -520,6 +520,24 @@ class InputMsgWatcher : public BrowserMessageFilter {
DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher);
};
+// This observer is used to wait for its owner Frame to become focused.
+class FrameFocusedObserver {
+ // Private impl struct which hides non public types including FrameTreeNode.
+ struct FrameTreeNodeObserverImpl;
+
+ public:
+ explicit FrameFocusedObserver(RenderFrameHost* owner_host);
+ ~FrameFocusedObserver();
+
+ void Wait();
+
+ private:
+ // FrameTreeNode::Observer
+ std::unique_ptr<FrameTreeNodeObserverImpl> impl_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameFocusedObserver);
+};
+
} // namespace content
#endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698