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

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

Issue 2750453002: Add DiscoveryNetworkMonitor implementation (Closed)
Patch Set: Respond to mfoltz' and imcheng's comments Created 3 years, 8 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 (c) 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/discovery_network_list.h"
6
7 #include <algorithm>
8 #include <iterator>
9 #include <set>
10
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 TEST(DiscoveryNetworkList, GetDiscoveryNetworkIdList) {
14 auto network_ids = GetDiscoveryNetworkIdList();
mark a. foltz 2017/04/18 20:37:00 It looks like you're not mocking anything out but
btolsch 2017/04/20 04:03:50 I am testing that the interface name and network I
15 for (const auto& network_id : network_ids) {
16 EXPECT_LT(0UL, network_id.interface_name.size());
17 EXPECT_LT(0UL, network_id.network_id.size());
18 }
19
20 auto interface_name_set = std::set<std::string>{};
21 std::transform(begin(network_ids), end(network_ids),
22 std::insert_iterator<std::set<std::string>>{
23 interface_name_set, end(interface_name_set)},
24 [](const DiscoveryNetworkId& network_id) {
25 return network_id.interface_name;
26 });
27
28 EXPECT_EQ(interface_name_set.size(), network_ids.size());
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698