| Index: chrome/test/media_router/media_router_integration_browsertest.cc
|
| diff --git a/chrome/test/media_router/media_router_integration_browsertest.cc b/chrome/test/media_router/media_router_integration_browsertest.cc
|
| index 78b2abf74ad4469ddc8438bd301d1ab86efd54e2..d3d7ecf1c20294b3b97cfd316cba7e19eb07ad9e 100644
|
| --- a/chrome/test/media_router/media_router_integration_browsertest.cc
|
| +++ b/chrome/test/media_router/media_router_integration_browsertest.cc
|
| @@ -163,12 +163,16 @@ void MediaRouterIntegrationBrowserTest::ExecuteJavaScriptAPI(
|
| ASSERT_TRUE(passed) << error_message;
|
| }
|
|
|
| -WebContents* MediaRouterIntegrationBrowserTest::StartSessionWithTestPageNow() {
|
| +void MediaRouterIntegrationBrowserTest::StartSessionAndAssertNotFoundError() {
|
| OpenTestPage(FILE_PATH_LITERAL("basic_test.html"));
|
| WebContents* web_contents = GetActiveWebContents();
|
| CHECK(web_contents);
|
| StartSession(web_contents);
|
| - return web_contents;
|
| +
|
| + // Wait for any sinks to be displayed.
|
| + Wait(base::TimeDelta::FromSeconds(1));
|
| + GetControllerForShownDialog(web_contents)->HideMediaRouterDialog();
|
| + CheckStartFailed(web_contents, "NotFoundError", "No screens found.");
|
| }
|
|
|
| WebContents*
|
| @@ -628,18 +632,13 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest,
|
| IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest,
|
| MANUAL_Fail_StartCancelledNoSinks) {
|
| SetTestData(FILE_PATH_LITERAL("no_sinks.json"));
|
| - WebContents* web_contents = StartSessionWithTestPageNow();
|
| - GetControllerForShownDialog(web_contents)->HideMediaRouterDialog();
|
| - CheckStartFailed(web_contents, "NotFoundError", "No screens found.");
|
| + StartSessionAndAssertNotFoundError();
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest,
|
| MANUAL_Fail_StartCancelledNoSupportedSinks) {
|
| SetTestData(FILE_PATH_LITERAL("no_supported_sinks.json"));
|
| - WebContents* web_contents = StartSessionWithTestPageNow();
|
| - WaitUntilSinkDiscoveredOnUI();
|
| - GetControllerForShownDialog(web_contents)->HideMediaRouterDialog();
|
| - CheckStartFailed(web_contents, "NotFoundError", "No screens found.");
|
| + StartSessionAndAssertNotFoundError();
|
| }
|
|
|
| void MediaRouterIntegrationIncognitoBrowserTest::InstallAndEnableMRExtension() {
|
|
|