OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ui/webui/media_router/cast_modes_with_media_sources.h" | 5 #include "chrome/browser/ui/webui/media_router/cast_modes_with_media_sources.h" |
6 | 6 |
7 #include "chrome/browser/media/router/media_source_helper.h" | 7 #include "chrome/common/media_router/media_source_helper.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 namespace media_router { | 12 namespace media_router { |
13 | 13 |
14 TEST(MediaRouterCastModesWithMediaSourcesTest, AddAndRemoveSources) { | 14 TEST(MediaRouterCastModesWithMediaSourcesTest, AddAndRemoveSources) { |
15 const MediaSource defaultSource1(MediaSourceForPresentationUrl( | 15 const MediaSource defaultSource1(MediaSourceForPresentationUrl( |
16 GURL("http://www.example.com/presentation.html"))); | 16 GURL("http://www.example.com/presentation.html"))); |
17 const MediaSource defaultSource2(MediaSourceForPresentationUrl( | 17 const MediaSource defaultSource2(MediaSourceForPresentationUrl( |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // [] | 69 // [] |
70 sources.RemoveSource(MediaCastMode::TAB_MIRROR, tabSourceA); | 70 sources.RemoveSource(MediaCastMode::TAB_MIRROR, tabSourceA); |
71 EXPECT_FALSE(sources.HasSource(MediaCastMode::DEFAULT, defaultSource1)); | 71 EXPECT_FALSE(sources.HasSource(MediaCastMode::DEFAULT, defaultSource1)); |
72 EXPECT_FALSE(sources.HasSource(MediaCastMode::DEFAULT, defaultSource2)); | 72 EXPECT_FALSE(sources.HasSource(MediaCastMode::DEFAULT, defaultSource2)); |
73 EXPECT_FALSE(sources.HasSource(MediaCastMode::TAB_MIRROR, tabSourceA)); | 73 EXPECT_FALSE(sources.HasSource(MediaCastMode::TAB_MIRROR, tabSourceA)); |
74 EXPECT_TRUE(sources.IsEmpty()); | 74 EXPECT_TRUE(sources.IsEmpty()); |
75 EXPECT_EQ(sources.GetCastModes(), castModeSetEmpty); | 75 EXPECT_EQ(sources.GetCastModes(), castModeSetEmpty); |
76 } | 76 } |
77 | 77 |
78 } // namespace media_router | 78 } // namespace media_router |
OLD | NEW |