OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/proxy_config_service_impl.h" | 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // tasks so that tests start fresh. | 235 // tasks so that tests start fresh. |
236 loop_.RunUntilIdle(); | 236 loop_.RunUntilIdle(); |
237 } | 237 } |
238 | 238 |
239 void SetUpNetwork() { | 239 void SetUpNetwork() { |
240 ShillProfileClient::TestInterface* profile_test = | 240 ShillProfileClient::TestInterface* profile_test = |
241 DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface(); | 241 DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface(); |
242 ShillServiceClient::TestInterface* service_test = | 242 ShillServiceClient::TestInterface* service_test = |
243 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface(); | 243 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface(); |
244 | 244 |
| 245 // Process any pending notifications before clearing services. |
| 246 loop_.RunUntilIdle(); |
245 service_test->ClearServices(); | 247 service_test->ClearServices(); |
246 | 248 |
247 // Sends a notification about the added profile. | 249 // Sends a notification about the added profile. |
248 profile_test->AddProfile(kUserProfilePath, "user_hash"); | 250 profile_test->AddProfile(kUserProfilePath, "user_hash"); |
249 | 251 |
250 service_test->AddService("stub_wifi2", "wifi2_PSK", | 252 service_test->AddService("stub_wifi2", "wifi2_PSK", |
251 shill::kTypeWifi, shill::kStateOnline, | 253 shill::kTypeWifi, shill::kStateOnline, |
252 true /* visible */, true /* watch */); | 254 true /* visible */, true /* watch */); |
253 service_test->SetServiceProperty("stub_wifi2", | 255 service_test->SetServiceProperty("stub_wifi2", |
254 shill::kGuidProperty, | 256 shill::kGuidProperty, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 pref_service_.RemoveRecommendedPref(prefs::kProxy); | 446 pref_service_.RemoveRecommendedPref(prefs::kProxy); |
445 SyncGetLatestProxyConfig(&actual_config); | 447 SyncGetLatestProxyConfig(&actual_config); |
446 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); | 448 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); |
447 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); | 449 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); |
448 EXPECT_TRUE(network_params.proxy_rules.Matches( | 450 EXPECT_TRUE(network_params.proxy_rules.Matches( |
449 actual_config.proxy_rules())); | 451 actual_config.proxy_rules())); |
450 } | 452 } |
451 } | 453 } |
452 | 454 |
453 } // namespace chromeos | 455 } // namespace chromeos |
OLD | NEW |