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

Unified Diff: chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc

Issue 2627463003: Convert MediaRouter mojom apis to intake url::Origin objects instead of strings (Closed)
Patch Set: Add missing dependency for extensions_renderer_resources target Created 3 years, 10 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/browser/media/router/presentation_service_delegate_impl_unittest.cc
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
index d4543441792de518df4871e07f4a0209dce89d5a..b8f6170303d72f4b073bce02438e359786573e2e 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
@@ -151,8 +151,9 @@ class PresentationServiceDelegateImplTest
EXPECT_TRUE(Mock::VerifyAndClearExpectations(this));
// Should not trigger callback since request doesn't match.
- PresentationRequest different_request(
- RenderFrameHostId(100, 200), {presentation_url2_}, GURL(kFrameUrl));
+ PresentationRequest different_request(RenderFrameHostId(100, 200),
+ {presentation_url2_},
+ url::Origin(GURL(kFrameUrl)));
MediaRoute* media_route = new MediaRoute("differentRouteId", source2_,
"mediaSinkId", "", true, "", true);
media_route->set_incognito(incognito);
@@ -321,7 +322,7 @@ TEST_F(PresentationServiceDelegateImplTest, SetDefaultPresentationUrl) {
EXPECT_EQ(presentation_url1_, request1.presentation_urls()[0]);
EXPECT_EQ(RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_),
request1.render_frame_host_id());
- EXPECT_EQ(frame_url, request1.frame_url());
+ EXPECT_EQ(url::Origin(frame_url), request1.frame_origin());
// Set to a new default presentation URL
std::vector<GURL> new_urls = {presentation_url2_};
@@ -333,7 +334,7 @@ TEST_F(PresentationServiceDelegateImplTest, SetDefaultPresentationUrl) {
EXPECT_EQ(presentation_url2_, request2.presentation_urls()[0]);
EXPECT_EQ(RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_),
request2.render_frame_host_id());
- EXPECT_EQ(frame_url, request2.frame_url());
+ EXPECT_EQ(url::Origin(frame_url), request2.frame_origin());
// Remove default presentation URL.
delegate_impl_->SetDefaultPresentationUrls(main_frame_process_id_,
@@ -367,7 +368,7 @@ TEST_F(PresentationServiceDelegateImplTest,
std::vector<GURL> request1_urls = {presentation_url1_};
PresentationRequest observed_request1(
RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_),
- request1_urls, frame_url);
+ request1_urls, url::Origin(frame_url));
EXPECT_CALL(observer, OnDefaultPresentationChanged(Equals(observed_request1)))
.Times(1);
delegate_impl_->SetDefaultPresentationUrls(
@@ -383,7 +384,7 @@ TEST_F(PresentationServiceDelegateImplTest,
std::vector<GURL> request2_urls = {presentation_url2_};
PresentationRequest observed_request2(
RenderFrameHostId(main_frame_process_id_, main_frame_routing_id_),
- request2_urls, frame_url);
+ request2_urls, url::Origin(frame_url));
EXPECT_CALL(observer, OnDefaultPresentationChanged(Equals(observed_request2)))
.Times(1);
delegate_impl_->SetDefaultPresentationUrls(
« no previous file with comments | « chrome/browser/media/router/presentation_service_delegate_impl.cc ('k') | chrome/browser/media/router/test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698