Index: chrome/test/media_router/media_router_integration_ui_browsertest.cc |
diff --git a/chrome/test/media_router/media_router_integration_ui_browsertest.cc b/chrome/test/media_router/media_router_integration_ui_browsertest.cc |
index 0f8cd37c5e10daa5dd6834c35e16cbcb97b091ec..a77f86f777f2af875c8066b6fe9ddebf519d9ece 100644 |
--- a/chrome/test/media_router/media_router_integration_ui_browsertest.cc |
+++ b/chrome/test/media_router/media_router_integration_ui_browsertest.cc |
@@ -34,6 +34,12 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MANUAL_Dialog_Basic) { |
ChooseSink(web_contents, kTestSinkName); |
WaitUntilRouteCreated(); |
+ // Simulate a click on the dialog to prevent it from automatically closing |
+ // after the route has been created. Then, check that the dialog remains |
+ // open. |
+ ClickDialog(); |
+ CheckDialogRemainsOpen(web_contents); |
+ |
// Verify the route details page. |
std::string route_info_script = base::StringPrintf( |
"domAutomationController.send(" |
@@ -56,6 +62,10 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MANUAL_Dialog_Basic) { |
// Close route. |
CloseRouteOnUI(); |
+ |
+ // Do not simulate a click on the dialog. Confirm that the dialog closes |
+ // automatically after the route is closed. |
+ WaitUntilDialogClosed(web_contents); |
} |
IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, |