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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 device_test->AddDevice(kWifiDevicePath, shill::kTypeWifi, | 95 device_test->AddDevice(kWifiDevicePath, shill::kTypeWifi, |
96 "stub_wifi_device1"); | 96 "stub_wifi_device1"); |
97 | 97 |
98 service_test->AddService(kWifi1ServicePath, kWifi1ServiceGUID, "wifi1", | 98 service_test->AddService(kWifi1ServicePath, kWifi1ServiceGUID, "wifi1", |
99 shill::kTypeWifi, shill::kStateOnline, | 99 shill::kTypeWifi, shill::kStateOnline, |
100 true /* add_to_visible */); | 100 true /* add_to_visible */); |
101 service_test->SetServiceProperty(kWifi1ServicePath, shill::kWifiBSsid, | 101 service_test->SetServiceProperty(kWifi1ServicePath, shill::kWifiBSsid, |
102 base::StringValue("01:02:ab:7f:90:00")); | 102 base::StringValue("01:02:ab:7f:90:00")); |
103 service_test->SetServiceProperty(kWifi1ServicePath, | 103 service_test->SetServiceProperty(kWifi1ServicePath, |
104 shill::kSignalStrengthProperty, | 104 shill::kSignalStrengthProperty, |
105 base::FundamentalValue(40)); | 105 base::Value(40)); |
106 profile_test->AddService(ShillProfileClient::GetSharedProfilePath(), | 106 profile_test->AddService(ShillProfileClient::GetSharedProfilePath(), |
107 kWifi1ServicePath); | 107 kWifi1ServicePath); |
108 | 108 |
109 content::RunAllPendingInMessageLoop(); | 109 content::RunAllPendingInMessageLoop(); |
110 | 110 |
111 network_portal_detector_ = new NetworkPortalDetectorImpl( | 111 network_portal_detector_ = new NetworkPortalDetectorImpl( |
112 g_browser_process->system_request_context(), | 112 g_browser_process->system_request_context(), |
113 true /* create_notification_controller */); | 113 true /* create_notification_controller */); |
114 chromeos::network_portal_detector::InitializeForTesting( | 114 chromeos::network_portal_detector::InitializeForTesting( |
115 network_portal_detector_); | 115 network_portal_detector_); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 extensions::ResultCatcher catcher; | 187 extensions::ResultCatcher catcher; |
188 EXPECT_TRUE(catcher.GetNextResult()); | 188 EXPECT_TRUE(catcher.GetNextResult()); |
189 | 189 |
190 // Simulate the captive portal vanishing. | 190 // Simulate the captive portal vanishing. |
191 SimulateSuccessfulCaptivePortalAuth(); | 191 SimulateSuccessfulCaptivePortalAuth(); |
192 | 192 |
193 ASSERT_EQ(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE, | 193 ASSERT_EQ(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE, |
194 GetCaptivePortalStatus(kWifi1ServiceGUID)); | 194 GetCaptivePortalStatus(kWifi1ServiceGUID)); |
195 } | 195 } |
OLD | NEW |