OLD | NEW |
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 "chromeos/network/network_state.h" | 5 #include "chromeos/network/network_state.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> |
8 | 9 |
9 #include "base/i18n/streaming_utf8_validator.h" | 10 #include "base/i18n/streaming_utf8_validator.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
13 #include "base/values.h" | 14 #include "base/values.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/cros_system_api/dbus/service_constants.h" | 16 #include "third_party/cros_system_api/dbus/service_constants.h" |
16 | 17 |
17 namespace chromeos { | 18 namespace chromeos { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Third-party VPN provider. | 222 // Third-party VPN provider. |
222 TEST_F(NetworkStateTest, VPNThirdPartyProvider) { | 223 TEST_F(NetworkStateTest, VPNThirdPartyProvider) { |
223 EXPECT_TRUE(SetStringProperty(shill::kTypeProperty, shill::kTypeVPN)); | 224 EXPECT_TRUE(SetStringProperty(shill::kTypeProperty, shill::kTypeVPN)); |
224 EXPECT_TRUE(SetStringProperty(shill::kNameProperty, "VPN")); | 225 EXPECT_TRUE(SetStringProperty(shill::kNameProperty, "VPN")); |
225 | 226 |
226 scoped_ptr<base::DictionaryValue> provider(new base::DictionaryValue); | 227 scoped_ptr<base::DictionaryValue> provider(new base::DictionaryValue); |
227 provider->SetStringWithoutPathExpansion(shill::kTypeProperty, | 228 provider->SetStringWithoutPathExpansion(shill::kTypeProperty, |
228 shill::kProviderThirdPartyVpn); | 229 shill::kProviderThirdPartyVpn); |
229 provider->SetStringWithoutPathExpansion( | 230 provider->SetStringWithoutPathExpansion( |
230 shill::kHostProperty, "third-party-vpn-provider-extension-id"); | 231 shill::kHostProperty, "third-party-vpn-provider-extension-id"); |
231 EXPECT_TRUE(SetProperty(shill::kProviderProperty, provider.Pass())); | 232 EXPECT_TRUE(SetProperty(shill::kProviderProperty, std::move(provider))); |
232 SignalInitialPropertiesReceived(); | 233 SignalInitialPropertiesReceived(); |
233 EXPECT_EQ(network_state_.vpn_provider_type(), shill::kProviderThirdPartyVpn); | 234 EXPECT_EQ(network_state_.vpn_provider_type(), shill::kProviderThirdPartyVpn); |
234 EXPECT_EQ(network_state_.third_party_vpn_provider_extension_id(), | 235 EXPECT_EQ(network_state_.third_party_vpn_provider_extension_id(), |
235 "third-party-vpn-provider-extension-id"); | 236 "third-party-vpn-provider-extension-id"); |
236 } | 237 } |
237 | 238 |
238 } // namespace chromeos | 239 } // namespace chromeos |
OLD | NEW |