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

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

Issue 2386633003: [Media Router] Convert MediaRouter to use GURL for presentation URLs. (Closed)
Patch Set: Respond to dcheng@ comment Created 4 years, 2 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_request_unittest.cc
diff --git a/chrome/browser/media/router/presentation_request_unittest.cc b/chrome/browser/media/router/presentation_request_unittest.cc
index e04afdcecf0e1a5b83d9b13531654075296a7e23..9fe5a10afb4dbfb122f9347d70fa487c2482d93a 100644
--- a/chrome/browser/media/router/presentation_request_unittest.cc
+++ b/chrome/browser/media/router/presentation_request_unittest.cc
@@ -8,31 +8,33 @@
namespace media_router {
TEST(PresentationRequestTest, Equals) {
- PresentationRequest request1(RenderFrameHostId(1, 2),
- {"http://presentationUrl"},
- GURL("http://frameUrl"));
+ GURL frame_url("http://www.site.com/");
+ std::vector<GURL> presentation_urls =
+ {GURL("http://www.example.com/presentation.html")};
+
+ PresentationRequest request1(RenderFrameHostId(1, 2), presentation_urls,
+ frame_url);
// Frame IDs are different.
- PresentationRequest request2(RenderFrameHostId(3, 4),
- {"http://presentationUrl"},
- GURL("http://frameUrl"));
+ PresentationRequest request2(RenderFrameHostId(3, 4), presentation_urls,
+ frame_url);
EXPECT_FALSE(request1.Equals(request2));
// Presentation URLs are different.
- PresentationRequest request3(RenderFrameHostId(1, 2),
- {"http://anotherPresentationUrl"},
- GURL("http://frameUrl"));
+ PresentationRequest request3(
+ RenderFrameHostId(1, 2),
+ {GURL("http://www.example.net/presentation.html")}, frame_url);
EXPECT_FALSE(request1.Equals(request3));
// Frame URLs are different.
- PresentationRequest request4(RenderFrameHostId(1, 2),
- {"http://presentationUrl"},
- GURL("http://anotherFrameUrl"));
+ PresentationRequest request4(RenderFrameHostId(1, 2), presentation_urls,
+ GURL("http://www.site.net/"));
EXPECT_FALSE(request1.Equals(request4));
- PresentationRequest request5(RenderFrameHostId(1, 2),
- {"http://presentationUrl"},
- GURL("http://frameUrl"));
+ PresentationRequest request5(
+ RenderFrameHostId(1, 2),
+ {GURL("http://www.example.com/presentation.html")},
+ GURL("http://www.site.com/"));
EXPECT_TRUE(request1.Equals(request5));
}
« no previous file with comments | « chrome/browser/media/router/presentation_request.cc ('k') | chrome/browser/media/router/presentation_service_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698