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

Side by Side Diff: chrome/browser/media/router/presentation_request_unittest.cc

Issue 2264153002: [Presentation API] Add support for multiple URLs in PresentationRequest on Media Router UI side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Mark's comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/router/presentation_request.h" 5 #include "chrome/browser/media/router/presentation_request.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace media_router { 8 namespace media_router {
9 9
10 TEST(PresentationRequestTest, Equals) { 10 TEST(PresentationRequestTest, Equals) {
11 PresentationRequest request1(RenderFrameHostId(1, 2), 11 PresentationRequest request1(RenderFrameHostId(1, 2),
12 "http://presentationUrl", 12 {"http://presentationUrl"},
13 GURL("http://frameUrl")); 13 GURL("http://frameUrl"));
14 14
15 // Frame IDs are different. 15 // Frame IDs are different.
16 PresentationRequest request2(RenderFrameHostId(3, 4), 16 PresentationRequest request2(RenderFrameHostId(3, 4),
17 "http://presentationUrl", 17 {"http://presentationUrl"},
18 GURL("http://frameUrl")); 18 GURL("http://frameUrl"));
19 EXPECT_FALSE(request1.Equals(request2)); 19 EXPECT_FALSE(request1.Equals(request2));
20 20
21 // Presentation URLs are different. 21 // Presentation URLs are different.
22 PresentationRequest request3(RenderFrameHostId(1, 2), 22 PresentationRequest request3(RenderFrameHostId(1, 2),
23 "http://anotherPresentationUrl", 23 {"http://anotherPresentationUrl"},
24 GURL("http://frameUrl")); 24 GURL("http://frameUrl"));
25 EXPECT_FALSE(request1.Equals(request3)); 25 EXPECT_FALSE(request1.Equals(request3));
26 26
27 // Frame URLs are different. 27 // Frame URLs are different.
28 PresentationRequest request4(RenderFrameHostId(1, 2), 28 PresentationRequest request4(RenderFrameHostId(1, 2),
29 "http://presentationUrl", 29 {"http://presentationUrl"},
30 GURL("http://anotherFrameUrl")); 30 GURL("http://anotherFrameUrl"));
31 EXPECT_FALSE(request1.Equals(request4)); 31 EXPECT_FALSE(request1.Equals(request4));
32 32
33 PresentationRequest request5(RenderFrameHostId(1, 2), 33 PresentationRequest request5(RenderFrameHostId(1, 2),
34 "http://presentationUrl", 34 {"http://presentationUrl"},
35 GURL("http://frameUrl")); 35 GURL("http://frameUrl"));
36 EXPECT_TRUE(request1.Equals(request5)); 36 EXPECT_TRUE(request1.Equals(request5));
37 } 37 }
38 38
39 } // namespace media_router 39 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698