| 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/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/chromeos/login/user.h" | 8 #include "chrome/browser/chromeos/login/user.h" |
| 9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| 11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 | 14 |
| 15 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
| 16 #include "chromeos/chromeos_switches.h" | 16 #include "chromeos/chromeos_switches.h" |
| 17 #include "chromeos/dbus/cryptohome_client.h" | 17 #include "chromeos/dbus/cryptohome_client.h" |
| 18 #include "chromeos/dbus/dbus_thread_manager.h" | 18 #include "chromeos/dbus/dbus_thread_manager.h" |
| 19 #include "chromeos/dbus/shill_device_client.h" | 19 #include "chromeos/dbus/shill_device_client.h" |
| 20 #include "chromeos/dbus/shill_manager_client.h" | 20 #include "chromeos/dbus/shill_manager_client.h" |
| 21 #include "chromeos/dbus/shill_profile_client.h" | 21 #include "chromeos/dbus/shill_profile_client.h" |
| 22 #include "chromeos/dbus/shill_service_client.h" | 22 #include "chromeos/dbus/shill_service_client.h" |
| 23 #include "chromeos/dbus/shill_stub_helper.h" | |
| 24 #include "chromeos/network/onc/onc_utils.h" | 23 #include "chromeos/network/onc/onc_utils.h" |
| 25 #include "components/onc/onc_constants.h" | 24 #include "components/onc/onc_constants.h" |
| 26 #include "components/policy/core/browser/browser_policy_connector.h" | 25 #include "components/policy/core/browser/browser_policy_connector.h" |
| 27 #include "components/policy/core/common/external_data_fetcher.h" | 26 #include "components/policy/core/common/external_data_fetcher.h" |
| 28 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 27 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
| 29 #include "components/policy/core/common/policy_map.h" | 28 #include "components/policy/core/common/policy_map.h" |
| 30 #include "components/policy/core/common/policy_types.h" | 29 #include "components/policy/core/common/policy_types.h" |
| 31 #include "policy/policy_constants.h" | 30 #include "policy/policy_constants.h" |
| 32 #include "third_party/cros_system_api/dbus/service_constants.h" | 31 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 33 #else // !defined(OS_CHROMEOS) | 32 #else // !defined(OS_CHROMEOS) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 shill::kTypeCellular, "stub_cellular_device1"); | 163 shill::kTypeCellular, "stub_cellular_device1"); |
| 165 | 164 |
| 166 const bool add_to_watchlist = true; | 165 const bool add_to_watchlist = true; |
| 167 const bool add_to_visible = true; | 166 const bool add_to_visible = true; |
| 168 service_test->AddService("stub_ethernet", "eth0", | 167 service_test->AddService("stub_ethernet", "eth0", |
| 169 shill::kTypeEthernet, shill::kStateOnline, | 168 shill::kTypeEthernet, shill::kStateOnline, |
| 170 add_to_visible, add_to_watchlist); | 169 add_to_visible, add_to_watchlist); |
| 171 service_test->SetServiceProperty( | 170 service_test->SetServiceProperty( |
| 172 "stub_ethernet", | 171 "stub_ethernet", |
| 173 shill::kProfileProperty, | 172 shill::kProfileProperty, |
| 174 base::StringValue(chromeos::shill_stub_helper::kSharedProfilePath)); | 173 base::StringValue(ShillProfileClient::GetSharedProfilePath())); |
| 175 profile_test->AddService(chromeos::shill_stub_helper::kSharedProfilePath, | 174 profile_test->AddService(ShillProfileClient::GetSharedProfilePath(), |
| 176 "stub_ethernet"); | 175 "stub_ethernet"); |
| 177 | 176 |
| 178 service_test->AddService("stub_wifi1", "wifi1", | 177 service_test->AddService("stub_wifi1", "wifi1", |
| 179 shill::kTypeWifi, shill::kStateOnline, | 178 shill::kTypeWifi, shill::kStateOnline, |
| 180 add_to_visible, add_to_watchlist); | 179 add_to_visible, add_to_watchlist); |
| 181 service_test->SetServiceProperty("stub_wifi1", | 180 service_test->SetServiceProperty("stub_wifi1", |
| 182 shill::kSecurityProperty, | 181 shill::kSecurityProperty, |
| 183 base::StringValue(shill::kSecurityWep)); | 182 base::StringValue(shill::kSecurityWep)); |
| 184 service_test->SetServiceProperty("stub_wifi1", | 183 service_test->SetServiceProperty("stub_wifi1", |
| 185 shill::kProfileProperty, | 184 shill::kProfileProperty, |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 GetWifiTDLSStatus) { | 442 GetWifiTDLSStatus) { |
| 444 EXPECT_TRUE(RunNetworkingSubtest("getWifiTDLSStatus")) << message_; | 443 EXPECT_TRUE(RunNetworkingSubtest("getWifiTDLSStatus")) << message_; |
| 445 } | 444 } |
| 446 #endif | 445 #endif |
| 447 | 446 |
| 448 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, | 447 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, |
| 449 ExtensionNetworkingPrivateApiTest, | 448 ExtensionNetworkingPrivateApiTest, |
| 450 testing::Bool()); | 449 testing::Bool()); |
| 451 | 450 |
| 452 } // namespace | 451 } // namespace |
| OLD | NEW |