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

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: return an Origin instead of GURL for GetLastCommittedURLForFrame 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..694afa2a8ce3de311e92e6a5fe2bac1a815dd5d6 100644
--- a/chrome/test/media_router/media_router_e2e_browsertest.cc
+++ b/chrome/test/media_router/media_router_e2e_browsertest.cc
@@ -20,8 +20,7 @@
#include "content/public/test/test_utils.h"
#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 +41,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 char kOrigin[] = "http://origin/";
} // namespace
@@ -77,7 +76,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 +145,8 @@ 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), url::Origin(GURL(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);
+ url::Origin(GURL(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