OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/media/router/discovery/media_sink_internal.h" |
| 6 #include "testing/gmock/include/gmock/gmock.h" |
| 7 |
| 8 namespace media_router { |
| 9 |
| 10 TEST(MediaSinkInternalTest, TestIsValidSinkId) { |
| 11 EXPECT_FALSE(MediaSinkInternal::IsValidSinkId("")); |
| 12 EXPECT_FALSE(MediaSinkInternal::IsValidSinkId("@#$*&abc")); |
| 13 EXPECT_TRUE(MediaSinkInternal::IsValidSinkId("rjuKv_yxhY4jg7QBIp0kbngLjR6A")); |
| 14 } |
| 15 |
| 16 TEST(MediaSinkInternalTest, TestIsValidIPAddress) { |
| 17 EXPECT_FALSE(MediaSinkInternal::IsValidIPAddress("")); |
| 18 EXPECT_FALSE(MediaSinkInternal::IsValidIPAddress("www.google.com")); |
| 19 EXPECT_FALSE(MediaSinkInternal::IsValidIPAddress("256.256.300.1")); |
| 20 EXPECT_TRUE(MediaSinkInternal::IsValidIPAddress("192.168.1.3")); |
| 21 } |
| 22 |
| 23 } // namespace media_router |
OLD | NEW |