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

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

Issue 2108973002: [Media Router] Return NotFoundError on dialog exit if appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments, add no-sinks integration test, update test data json format 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
« no previous file with comments | « chrome/test/media_router/BUILD.gn ('k') | chrome/test/media_router/media_router_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8e984d62f0c3a075ca5907f951cfdee70e764679..e35d4efb13711ed70bdb670b2ef2b873b3d5f5af 100644
--- a/chrome/test/media_router/media_router_integration_browsertest.cc
+++ b/chrome/test/media_router/media_router_integration_browsertest.cc
@@ -568,4 +568,39 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest,
CheckStartFailed(web_contents, "AbortError", "Dialog closed.");
}
+IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest,
+ MANUAL_Fail_StartCancelledNoSinks) {
+ SetTestData(FILE_PATH_LITERAL("no_sinks.json"));
+ OpenTestPage(FILE_PATH_LITERAL("basic_test.html"));
+ content::WebContents* web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(web_contents);
+ content::TestNavigationObserver test_navigation_observer(web_contents, 1);
+ StartSession(web_contents);
+
+ MediaRouterDialogControllerImpl* controller =
+ MediaRouterDialogControllerImpl::GetOrCreateForWebContents(web_contents);
+ EXPECT_TRUE(controller->IsShowingMediaRouterDialog());
+ controller->HideMediaRouterDialog();
+ CheckStartFailed(web_contents, "NotFoundError", "No screens found.");
+}
+
+IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest,
+ MANUAL_Fail_StartCancelledNoSupportedSinks) {
+ SetTestData(FILE_PATH_LITERAL("no_supported_sinks.json"));
+ OpenTestPage(FILE_PATH_LITERAL("basic_test.html"));
+ content::WebContents* web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(web_contents);
+ content::TestNavigationObserver test_navigation_observer(web_contents, 1);
+ StartSession(web_contents);
+
+ MediaRouterDialogControllerImpl* controller =
+ MediaRouterDialogControllerImpl::GetOrCreateForWebContents(web_contents);
+ EXPECT_TRUE(controller->IsShowingMediaRouterDialog());
+ WaitUntilSinkDiscoveredOnUI();
+ controller->HideMediaRouterDialog();
+ CheckStartFailed(web_contents, "NotFoundError", "No screens found.");
+}
+
} // namespace media_router
« no previous file with comments | « chrome/test/media_router/BUILD.gn ('k') | chrome/test/media_router/media_router_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698