Index: content/test/content_browser_test_utils_internal.h |
diff --git a/content/test/content_browser_test_utils_internal.h b/content/test/content_browser_test_utils_internal.h |
index 4486d14b5c5dd20502f7f2fdb3e7dbba6f0f489b..05544b8a79c99a4e24c55fee7a7afe42db9fb7ac 100644 |
--- a/content/test/content_browser_test_utils_internal.h |
+++ b/content/test/content_browser_test_utils_internal.h |
@@ -20,7 +20,9 @@ class GURL; |
namespace content { |
class FrameTreeNode; |
+class Shell; |
class SiteInstance; |
+class ToRenderFrameHost; |
// Navigates the frame represented by |node| to |url|, blocking until the |
// navigation finishes. |
@@ -65,6 +67,15 @@ class FrameTreeVisualizer { |
DISALLOW_COPY_AND_ASSIGN(FrameTreeVisualizer); |
}; |
+// Uses window.open to open a popup from the frame |opener| with the specified |
+// |url| and |name|. Waits for the navigation to |url| to finish and then |
+// returns the new popup's Shell. Note that since this navigation to |url| is |
+// renderer-initiated, it won't cause a process swap unless used in |
+// --site-per-process mode. |
+Shell* OpenPopup(const ToRenderFrameHost& opener, |
+ const GURL& url, |
+ const std::string& name); |
+ |
} // namespace content |
#endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_INTERNAL_H_ |