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

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

Issue 2627463003: Convert MediaRouter mojom apis to intake url::Origin objects instead of strings (Closed)
Patch Set: Fix chromeos browser tests Created 3 years, 11 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
Index: chrome/test/media_router/media_router_e2e_browsertest.cc
diff --git a/chrome/test/media_router/media_router_e2e_browsertest.cc b/chrome/test/media_router/media_router_e2e_browsertest.cc
index 01f0f53f19122187ac6a14fa03a2d506709dfa80..323cfeccdf903afb34188b9b8ff3778a8019e0b4 100644
--- a/chrome/test/media_router/media_router_e2e_browsertest.cc
+++ b/chrome/test/media_router/media_router_e2e_browsertest.cc
@@ -21,7 +21,7 @@
#include "media/base/test_data_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
-
+#include "url/origin.h"
// Use the following command to run e2e browser tests:
// ./out/Debug/browser_tests --user-data-dir=<empty user data dir>
@@ -42,7 +42,7 @@ const char kCastAppPresentationUrl[] =
const char kVideo[] = "video";
const char kBearVP9Video[] = "bear-vp9-opus.webm";
const char kPlayer[] = "player.html";
-const char kOriginUrl[] = "http://origin/";
+const url::Origin kOrigin = url::Origin(GURL("http://origin/"));
mark a. foltz 2017/01/17 21:30:45 Ditto
steimel 2017/01/18 01:52:35 Done.
} // namespace
@@ -77,7 +77,7 @@ void MediaRouterE2EBrowserTest::OnRouteResponseReceived(
void MediaRouterE2EBrowserTest::CreateMediaRoute(
const MediaSource& source,
- const GURL& origin,
+ const url::Origin& origin,
content::WebContents* web_contents) {
DCHECK(media_router_);
observer_.reset(new TestMediaSinksObserver(media_router_, source, origin));
@@ -146,8 +146,7 @@ IN_PROC_BROWSER_TEST_F(MediaRouterE2EBrowserTest, MANUAL_TabMirroring) {
int tab_id = SessionTabHelper::IdForTab(web_contents);
// Wait for 30 seconds to make sure the route is stable.
- CreateMediaRoute(
- MediaSourceForTab(tab_id), GURL(kOriginUrl), web_contents);
+ CreateMediaRoute(MediaSourceForTab(tab_id), kOrigin, web_contents);
Wait(base::TimeDelta::FromSeconds(30));
// Wait for 10 seconds to make sure route has been stopped.
@@ -158,7 +157,7 @@ IN_PROC_BROWSER_TEST_F(MediaRouterE2EBrowserTest, MANUAL_TabMirroring) {
IN_PROC_BROWSER_TEST_F(MediaRouterE2EBrowserTest, MANUAL_CastApp) {
// Wait for 30 seconds to make sure the route is stable.
CreateMediaRoute(MediaSourceForPresentationUrl(GURL(kCastAppPresentationUrl)),
- GURL(kOriginUrl), nullptr);
+ kOrigin, nullptr);
Wait(base::TimeDelta::FromSeconds(30));
// Wait for 10 seconds to make sure route has been stopped.

Powered by Google App Engine
This is Rietveld 408576698