Commit ec179066 authored by Derek Cheng's avatar Derek Cheng Committed by Commit Bot

[MR integration test] Speculative fix for Dialog_Basic test on Mac.

Remove the domAutomationController.send call in the scripts to dispatch
mouse events. Since the returned value isn't consumed by the C++ code,
we shouldn't call domAutomationController.send.

Bug: 742443
Change-Id: Ibd54468a68a96dd324897239b6196c1896906891
Reviewed-on: https://chromium-review.googlesource.com/571530Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486902}
parent 455a5fcd
...@@ -46,9 +46,8 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MANUAL_Dialog_Basic) { ...@@ -46,9 +46,8 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MANUAL_Dialog_Basic) {
// closing after the route has been created. Then, check that the dialog // closing after the route has been created. Then, check that the dialog
// remains open. // remains open.
std::string mouse_enter_script = base::StringPrintf( std::string mouse_enter_script = base::StringPrintf(
"domAutomationController.send(" "window.document.getElementById('media-router-container')"
"window.document.getElementById('media-router-container').dispatchEvent(" " .dispatchEvent(new Event('mouseenter'));");
"new Event('mouseenter')))");
ASSERT_TRUE(content::ExecuteScript(dialog_contents, mouse_enter_script)); ASSERT_TRUE(content::ExecuteScript(dialog_contents, mouse_enter_script));
#endif #endif
WaitUntilRouteCreated(); WaitUntilRouteCreated();
...@@ -121,9 +120,8 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MANUAL_Dialog_Basic) { ...@@ -121,9 +120,8 @@ IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, MANUAL_Dialog_Basic) {
// the timer started when the route is initially closed times out before the // the timer started when the route is initially closed times out before the
// mouseleave event is dispatched. In that case, the dialog remains open. // mouseleave event is dispatched. In that case, the dialog remains open.
std::string mouse_leave_script = base::StringPrintf( std::string mouse_leave_script = base::StringPrintf(
"domAutomationController.send(" "window.document.getElementById('media-router-container')"
"window.document.getElementById('media-router-container').dispatchEvent(" " .dispatchEvent(new Event('mouseleave'));");
"new Event('mouseleave')))");
ASSERT_TRUE(content::ExecuteScript(dialog_contents, mouse_leave_script)); ASSERT_TRUE(content::ExecuteScript(dialog_contents, mouse_leave_script));
#endif #endif
LOG(INFO) << "Closing route on UI"; LOG(INFO) << "Closing route on UI";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment