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