| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 dbus_manager->GetShillIPConfigClient()->GetTestInterface(); | 261 dbus_manager->GetShillIPConfigClient()->GetTestInterface(); |
| 262 ShillProfileClient::TestInterface* profile_test = | 262 ShillProfileClient::TestInterface* profile_test = |
| 263 dbus_manager->GetShillProfileClient()->GetTestInterface(); | 263 dbus_manager->GetShillProfileClient()->GetTestInterface(); |
| 264 | 264 |
| 265 device_test_->ClearDevices(); | 265 device_test_->ClearDevices(); |
| 266 service_test_->ClearServices(); | 266 service_test_->ClearServices(); |
| 267 | 267 |
| 268 // Sends a notification about the added profile. | 268 // Sends a notification about the added profile. |
| 269 profile_test->AddProfile(kUser1ProfilePath, userhash_); | 269 profile_test->AddProfile(kUser1ProfilePath, userhash_); |
| 270 | 270 |
| 271 // Enable technologies. |
| 272 manager_test_->AddTechnology("wimax", true); |
| 273 |
| 271 // Add IPConfigs | 274 // Add IPConfigs |
| 272 base::DictionaryValue ipconfig; | 275 base::DictionaryValue ipconfig; |
| 273 ipconfig.SetStringWithoutPathExpansion(shill::kAddressProperty, "0.0.0.0"); | 276 ipconfig.SetStringWithoutPathExpansion(shill::kAddressProperty, "0.0.0.0"); |
| 274 ipconfig.SetStringWithoutPathExpansion(shill::kGatewayProperty, "0.0.0.1"); | 277 ipconfig.SetStringWithoutPathExpansion(shill::kGatewayProperty, "0.0.0.1"); |
| 275 ipconfig.SetIntegerWithoutPathExpansion(shill::kPrefixlenProperty, 0); | 278 ipconfig.SetIntegerWithoutPathExpansion(shill::kPrefixlenProperty, 0); |
| 276 ipconfig.SetStringWithoutPathExpansion(shill::kMethodProperty, | 279 ipconfig.SetStringWithoutPathExpansion(shill::kMethodProperty, |
| 277 shill::kTypeIPv4); | 280 shill::kTypeIPv4); |
| 278 ip_config_test->AddIPConfig(kIPConfigPath, ipconfig); | 281 ip_config_test->AddIPConfig(kIPConfigPath, ipconfig); |
| 279 | 282 |
| 280 // Add Devices | 283 // Add Devices |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 service_test_->SetServiceProperty("stub_wifi2", | 331 service_test_->SetServiceProperty("stub_wifi2", |
| 329 shill::kSecurityProperty, | 332 shill::kSecurityProperty, |
| 330 base::StringValue(shill::kSecurityPsk)); | 333 base::StringValue(shill::kSecurityPsk)); |
| 331 service_test_->SetServiceProperty("stub_wifi2", | 334 service_test_->SetServiceProperty("stub_wifi2", |
| 332 shill::kSignalStrengthProperty, | 335 shill::kSignalStrengthProperty, |
| 333 base::FundamentalValue(80)); | 336 base::FundamentalValue(80)); |
| 334 service_test_->SetServiceProperty("stub_wifi2", | 337 service_test_->SetServiceProperty("stub_wifi2", |
| 335 shill::kConnectableProperty, | 338 shill::kConnectableProperty, |
| 336 base::FundamentalValue(true)); | 339 base::FundamentalValue(true)); |
| 337 | 340 |
| 341 AddService("stub_wimax", "wimax", shill::kTypeWimax, shill::kStateOnline); |
| 342 service_test_->SetServiceProperty("stub_wimax", |
| 343 shill::kSignalStrengthProperty, |
| 344 base::FundamentalValue(40)); |
| 345 service_test_->SetServiceProperty("stub_wimax", |
| 346 shill::kProfileProperty, |
| 347 base::StringValue(kUser1ProfilePath)); |
| 348 service_test_->SetServiceProperty("stub_wimax", |
| 349 shill::kConnectableProperty, |
| 350 base::FundamentalValue(true)); |
| 351 profile_test->AddService(kUser1ProfilePath, "stub_wimax"); |
| 352 |
| 338 base::ListValue frequencies2; | 353 base::ListValue frequencies2; |
| 339 frequencies2.AppendInteger(2400); | 354 frequencies2.AppendInteger(2400); |
| 340 frequencies2.AppendInteger(5000); | 355 frequencies2.AppendInteger(5000); |
| 341 service_test_->SetServiceProperty("stub_wifi2", | 356 service_test_->SetServiceProperty("stub_wifi2", |
| 342 shill::kWifiFrequencyListProperty, | 357 shill::kWifiFrequencyListProperty, |
| 343 frequencies2); | 358 frequencies2); |
| 344 service_test_->SetServiceProperty("stub_wifi2", | 359 service_test_->SetServiceProperty("stub_wifi2", |
| 345 shill::kWifiFrequency, | 360 shill::kWifiFrequency, |
| 346 base::FundamentalValue(5000)); | 361 base::FundamentalValue(5000)); |
| 347 service_test_->SetServiceProperty("stub_wifi2", | 362 service_test_->SetServiceProperty("stub_wifi2", |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 | 630 |
| 616 TestListener listener( | 631 TestListener listener( |
| 617 "notifyPortalDetectorObservers", | 632 "notifyPortalDetectorObservers", |
| 618 base::Bind(&NetworkPortalDetectorTestImpl::NotifyObserversForTesting, | 633 base::Bind(&NetworkPortalDetectorTestImpl::NotifyObserversForTesting, |
| 619 base::Unretained(detector()))); | 634 base::Unretained(detector()))); |
| 620 EXPECT_TRUE(RunNetworkingSubtest("captivePortalNotification")) << message_; | 635 EXPECT_TRUE(RunNetworkingSubtest("captivePortalNotification")) << message_; |
| 621 } | 636 } |
| 622 #endif // defined(OS_CHROMEOS) | 637 #endif // defined(OS_CHROMEOS) |
| 623 | 638 |
| 624 } // namespace | 639 } // namespace |
| OLD | NEW |