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

Side by Side Diff: chrome/browser/chromeos/net/network_portal_detector_impl_unittest.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/net/network_portal_detector_impl.h" 5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void set_delay_till_next_attempt(const base::TimeDelta& delta) { 226 void set_delay_till_next_attempt(const base::TimeDelta& delta) {
227 PortalDetectorStrategy::set_delay_till_next_attempt_for_testing(delta); 227 PortalDetectorStrategy::set_delay_till_next_attempt_for_testing(delta);
228 } 228 }
229 229
230 void set_time_ticks(const base::TimeTicks& time_ticks) { 230 void set_time_ticks(const base::TimeTicks& time_ticks) {
231 network_portal_detector()->set_time_ticks_for_testing(time_ticks); 231 network_portal_detector()->set_time_ticks_for_testing(time_ticks);
232 } 232 }
233 233
234 void SetBehindPortal(const std::string& service_path) { 234 void SetBehindPortal(const std::string& service_path) {
235 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( 235 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty(
236 dbus::ObjectPath(service_path), 236 dbus::ObjectPath(service_path), shill::kStateProperty,
237 shill::kStateProperty, 237 base::Value(shill::kStatePortal), base::Bind(&base::DoNothing),
238 base::StringValue(shill::kStatePortal),
239 base::Bind(&base::DoNothing),
240 base::Bind(&ErrorCallbackFunction)); 238 base::Bind(&ErrorCallbackFunction));
241 base::RunLoop().RunUntilIdle(); 239 base::RunLoop().RunUntilIdle();
242 } 240 }
243 241
244 void SetNetworkDeviceEnabled(const std::string& type, bool enabled) { 242 void SetNetworkDeviceEnabled(const std::string& type, bool enabled) {
245 NetworkHandler::Get()->network_state_handler()->SetTechnologyEnabled( 243 NetworkHandler::Get()->network_state_handler()->SetTechnologyEnabled(
246 NetworkTypePattern::Primitive(type), 244 NetworkTypePattern::Primitive(type),
247 enabled, 245 enabled,
248 network_handler::ErrorCallback()); 246 network_handler::ErrorCallback());
249 base::RunLoop().RunUntilIdle(); 247 base::RunLoop().RunUntilIdle();
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 ASSERT_FALSE(is_state_idle()); 1045 ASSERT_FALSE(is_state_idle());
1048 1046
1049 ASSERT_TRUE( 1047 ASSERT_TRUE(
1050 MakeResultHistogramChecker() 1048 MakeResultHistogramChecker()
1051 ->Expect(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_OFFLINE, 1) 1049 ->Expect(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_OFFLINE, 1)
1052 ->Expect(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE, 1) 1050 ->Expect(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE, 1)
1053 ->Check()); 1051 ->Check());
1054 } 1052 }
1055 1053
1056 } // namespace chromeos 1054 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698