Chromium Code Reviews| Index: chrome/test/media_router/media_router_integration_browsertest.h |
| diff --git a/chrome/test/media_router/media_router_integration_browsertest.h b/chrome/test/media_router/media_router_integration_browsertest.h |
| index 37fd02f3ee8aa1f2fbc8e4ea254536286536241d..53b97dd2ac70f2287f5319f49f0589ef923c0b92 100644 |
| --- a/chrome/test/media_router/media_router_integration_browsertest.h |
| +++ b/chrome/test/media_router/media_router_integration_browsertest.h |
| @@ -74,6 +74,16 @@ class MediaRouterIntegrationBrowserTest : public MediaRouterBaseBrowserTest { |
| void CheckDialogRemainsOpen(content::WebContents* web_contents); |
| + // Opens "basic_test.html," waits for sinks to be available if |wait_for_sink| |
| + // is true, and starts a session. |
| + content::WebContents* StartSessionWithTestPage(bool wait_for_sink); |
|
mark a. foltz
2017/02/09 23:29:59
Slight preference for having explicit functions St
takumif
2017/02/14 19:11:48
It does result in a bit of code duplication, but t
|
| + |
| + // Opens "basic_test.html," waits for sinks to be available, starts a session, |
| + // and chooses a sink with the name |kTestSinkName|. Also checks that the |
| + // session has successfully started if |should_succeed| is true. |
| + content::WebContents* StartSessionWithTestPageAndChooseSink( |
|
mark a. foltz
2017/02/09 23:29:59
Maybe the caller could choose to call CheckSession
takumif
2017/02/14 19:11:48
Done.
|
| + bool should_succeed); |
| + |
| void OpenTestPage(base::FilePath::StringPieceType file); |
| void OpenTestPageInNewTab(base::FilePath::StringPieceType file); |
| @@ -125,6 +135,26 @@ class MediaRouterIntegrationBrowserTest : public MediaRouterBaseBrowserTest { |
| // Wait until media router dialog is fully loaded. |
| void WaitUntilDialogFullyLoaded(content::WebContents* dialog_contents); |
| + // Checks that the session started for |web_contents| has connected and is the |
| + // default session. |
| + void CheckSessionValidity(content::WebContents* web_contents); |
| + |
| + // Hides the dialog shown for |web_contents| after waiting for a sink to |
| + // appear if |wait_for_sink| is true, or immediately if false. |
| + void HideMediaRouterDialog(content::WebContents* web_contents, |
|
mark a. foltz
2017/02/09 23:29:59
HideMediaRouterDialogNow() and HideMediaRouterDial
takumif
2017/02/14 19:11:48
Factored out the common part into GetControllerFor
|
| + bool wait_for_sink); |
| + |
| + // Returns the active WebContents for the current window. |
| + content::WebContents* GetActiveWebContents(); |
| + |
| + // Runs a basic test in which a session is created through the MediaRouter |
| + // dialog, then terminated. |
| + void RunBasicTest(); |
| + |
| + // Runs a test in which we start a session and reconnect to it from another |
| + // tab. |
| + void RunReconnectSessionTest(); |
| + |
| std::string receiver() const { return receiver_; } |
| private: |
| @@ -141,6 +171,18 @@ class MediaRouterIntegrationBrowserTest : public MediaRouterBaseBrowserTest { |
| std::string receiver_; |
| }; |
| +class MediaRouterIntegrationIncognitoBrowserTest |
| + : public MediaRouterIntegrationBrowserTest { |
| + public: |
| + void InstallAndEnableMRExtension() override; |
| + void UninstallMRExtension() override; |
| + Browser* browser() override; |
| + |
| + private: |
| + Browser* browser_ = nullptr; |
|
mark a. foltz
2017/02/09 23:29:59
Does this hide a member in the superclass? Maybe
takumif
2017/02/14 19:11:48
Done. Also renaming extension_id_ to incognito_ext
|
| + std::string extension_id_; |
| +}; |
| + |
| } // namespace media_router |
| #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ |