| OLD | NEW |
| 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/media_source.h" | 5 #include "chrome/common/media_router/media_source_helper.h" |
| 6 #include "chrome/browser/media/router/media_source_helper.h" | 6 |
| 7 #include "chrome/common/media_router/media_source.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 9 | 10 |
| 10 namespace media_router { | 11 namespace media_router { |
| 11 | 12 |
| 12 constexpr char kPresentationUrl[] = "http://www.example.com/presentation.html"; | 13 constexpr char kPresentationUrl[] = "http://www.example.com/presentation.html"; |
| 13 | 14 |
| 14 TEST(MediaSourcesTest, IsMirroringMediaSource) { | 15 TEST(MediaSourcesTest, IsMirroringMediaSource) { |
| 15 EXPECT_TRUE(IsTabMirroringMediaSource(MediaSourceForTab(123))); | 16 EXPECT_TRUE(IsTabMirroringMediaSource(MediaSourceForTab(123))); |
| 16 EXPECT_TRUE(IsDesktopMirroringMediaSource(MediaSourceForDesktop())); | 17 EXPECT_TRUE(IsDesktopMirroringMediaSource(MediaSourceForDesktop())); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 EXPECT_FALSE( | 59 EXPECT_FALSE( |
| 59 CanConnectToMediaSource(MediaSource(GURL("https://www.google.com")))); | 60 CanConnectToMediaSource(MediaSource(GURL("https://www.google.com")))); |
| 60 // false path | 61 // false path |
| 61 EXPECT_FALSE(CanConnectToMediaSource( | 62 EXPECT_FALSE(CanConnectToMediaSource( |
| 62 MediaSource(GURL("https://www.google.com/path")))); | 63 MediaSource(GURL("https://www.google.com/path")))); |
| 63 | 64 |
| 64 EXPECT_FALSE(CanConnectToMediaSource(MediaSource(GURL("")))); | 65 EXPECT_FALSE(CanConnectToMediaSource(MediaSource(GURL("")))); |
| 65 } | 66 } |
| 66 | 67 |
| 67 } // namespace media_router | 68 } // namespace media_router |
| 68 | |
| OLD | NEW |