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

Side by Side Diff: chrome/browser/media/router/discovery/media_sink_internal_unittest.cc

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: resolve code review comments from Derek and Mark Created 3 years, 9 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698