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

Unified Diff: chrome/test/media_router/media_router_integration_browsertest.h

Issue 2634213002: [Media Router] Add integration browser tests (Closed)
Patch Set: Created 3 years, 11 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: 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..cd3a4e7fa70121438cc6f3905d94d221deff8203 100644
--- a/chrome/test/media_router/media_router_integration_browsertest.h
+++ b/chrome/test/media_router/media_router_integration_browsertest.h
@@ -74,8 +74,17 @@ class MediaRouterIntegrationBrowserTest : public MediaRouterBaseBrowserTest {
void CheckDialogRemainsOpen(content::WebContents* web_contents);
- void OpenTestPage(base::FilePath::StringPieceType file);
- void OpenTestPageInNewTab(base::FilePath::StringPieceType file);
+ // Opens "basic_test.html," waits for sinks to be available, and starts a
+ // session in |browser|.
+ void StartSessionWithTestPage(Browser* browser);
mark a. foltz 2017/01/20 19:00:09 Here's a thought. We could run all the test cases
takumif 2017/02/07 22:17:35 I made a subclass of MediaRouterIntegrationBrowser
+
+ // Opens "basic_test.html," waits for sinks to be available, starts a session,
+ // and chooses a sink with the name |kTestSinkName| in |browser|.
+ void StartSessionWithTestPageAndChooseSink(Browser* browser);
+
+ void OpenTestPage(base::FilePath::StringPieceType file, Browser* browser);
+ void OpenTestPageInNewTab(base::FilePath::StringPieceType file,
+ Browser* browser);
void SetTestData(base::FilePath::StringPieceType test_data_file);
@@ -93,7 +102,7 @@ class MediaRouterIntegrationBrowserTest : public MediaRouterBaseBrowserTest {
bool IsRouteClosedOnUI();
- bool IsSinkDiscoveredOnUI();
+ bool IsSinkDiscoveredOnUI(content::WebContents* web_contents);
// Close route through clicking 'Stop casting' button in route details dialog.
void CloseRouteOnUI();
@@ -115,9 +124,10 @@ class MediaRouterIntegrationBrowserTest : public MediaRouterBaseBrowserTest {
// Returns the route ID for the specific sink.
std::string GetRouteId(const std::string& sink_id);
- // Wait for the specific sink shows up in UI with a timeout. Fails if the sink
- // doesn't show up before the timeout.
- void WaitUntilSinkDiscoveredOnUI();
+ // Waits for the specific sink shows up in a media router dialog shown for
+ // |web_contents| with a timeout. Fails if the sink doesn't show up before the
+ // timeout.
+ void WaitUntilSinkDiscoveredOnUI(content::WebContents* web_contents);
// Checks if media router dialog is fully loaded.
bool IsDialogLoaded(content::WebContents* dialog_contents);
@@ -125,6 +135,14 @@ 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);
+
+ void RunBasicTest(Browser* browser);
+
+ void RunReconnectSessionTest(Browser* browser);
+
std::string receiver() const { return receiver_; }
private:

Powered by Google App Engine
This is Rietveld 408576698