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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc

Issue 16512003: Configure networks requiring a certificate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update error strings Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/network_state.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
9 #include "chromeos/dbus/shill_manager_client.h" 9 #include "chromeos/dbus/shill_manager_client.h"
10 #include "chromeos/network/geolocation_handler.h" 10 #include "chromeos/network/geolocation_handler.h"
11 #include "content/browser/geolocation/wifi_data_provider_chromeos.h" 11 #include "content/browser/geolocation/wifi_data_provider_chromeos.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/cros_system_api/dbus/service_constants.h" 13 #include "third_party/cros_system_api/dbus/service_constants.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class GeolocationChromeOsWifiDataProviderTest : public testing::Test { 17 class GeolocationChromeOsWifiDataProviderTest : public testing::Test {
18 protected: 18 protected:
19 GeolocationChromeOsWifiDataProviderTest() { 19 GeolocationChromeOsWifiDataProviderTest() {
20 } 20 }
21 21
22 virtual void SetUp() OVERRIDE { 22 virtual void SetUp() OVERRIDE {
23 chromeos::DBusThreadManager::InitializeWithStub(); 23 chromeos::DBusThreadManager::InitializeWithStub();
24 chromeos::NetworkHandler::Initialize(); 24 chromeos::NetworkHandler::InitializeForTest();
25 manager_client_ = 25 manager_client_ =
26 chromeos::DBusThreadManager::Get()->GetShillManagerClient(); 26 chromeos::DBusThreadManager::Get()->GetShillManagerClient();
27 manager_test_ = manager_client_->GetTestInterface(); 27 manager_test_ = manager_client_->GetTestInterface();
28 provider_ = new WifiDataProviderChromeOs(); 28 provider_ = new WifiDataProviderChromeOs();
29 message_loop_.RunUntilIdle(); 29 message_loop_.RunUntilIdle();
30 } 30 }
31 31
32 virtual void TearDown() OVERRIDE { 32 virtual void TearDown() OVERRIDE {
33 provider_ = NULL; 33 provider_ = NULL;
34 chromeos::NetworkHandler::Shutdown(); 34 chromeos::NetworkHandler::Shutdown();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) { 90 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) {
91 message_loop_.RunUntilIdle(); 91 message_loop_.RunUntilIdle();
92 EXPECT_FALSE(GetAccessPointData()); 92 EXPECT_FALSE(GetAccessPointData());
93 93
94 AddAccessPoints(3, 4); 94 AddAccessPoints(3, 4);
95 EXPECT_TRUE(GetAccessPointData()); 95 EXPECT_TRUE(GetAccessPointData());
96 ASSERT_EQ(12u, ap_data_.size()); 96 ASSERT_EQ(12u, ap_data_.size());
97 } 97 }
98 98
99 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « chromeos/network/network_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698