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

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

Issue 2352243002: Fix MANUAL_Fail_NoProvider failure on all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 f9e5640cba4e278c8fc7da9ebdaa10f5e0d1a787..f5b65cdd2ee7e4ded35c84f856969c3866620f2f 100644
--- a/chrome/test/media_router/media_router_integration_browsertest.cc
+++ b/chrome/test/media_router/media_router_integration_browsertest.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
@@ -173,7 +174,9 @@ void MediaRouterIntegrationBrowserTest::ChooseSink(
content::WebContents* dialog_contents = GetMRDialog(web_contents);
std::string script = base::StringPrintf(
kChooseSinkScript, sink_name.c_str());
- ASSERT_TRUE(content::ExecuteScript(dialog_contents, script));
+ // Execute javascript to choose sink, but don't wait until it finishes.
+ dialog_contents->GetMainFrame()->ExecuteJavaScriptWithUserGestureForTests(
+ base::UTF8ToUTF16(script));
}
void MediaRouterIntegrationBrowserTest::CheckStartFailed(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698