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" |
(...skipping 14 matching lines...) Expand all Loading... | |
25 #include "chromeos/dbus/shill_manager_client.h" | 25 #include "chromeos/dbus/shill_manager_client.h" |
26 #include "chromeos/dbus/shill_profile_client.h" | 26 #include "chromeos/dbus/shill_profile_client.h" |
27 #include "chromeos/dbus/shill_service_client.h" | 27 #include "chromeos/dbus/shill_service_client.h" |
28 #include "chromeos/dbus/shill_stub_helper.h" | 28 #include "chromeos/dbus/shill_stub_helper.h" |
29 #include "chromeos/network/onc/onc_utils.h" | 29 #include "chromeos/network/onc/onc_utils.h" |
30 #include "components/onc/onc_constants.h" | 30 #include "components/onc/onc_constants.h" |
31 #include "policy/policy_constants.h" | 31 #include "policy/policy_constants.h" |
32 #include "third_party/cros_system_api/dbus/service_constants.h" | 32 #include "third_party/cros_system_api/dbus/service_constants.h" |
33 #endif // OS_CHROMEOS | 33 #endif // OS_CHROMEOS |
34 | 34 |
35 using testing::AnyNumber; | 35 using testing::AnyNumber; |
bartfab (slow)
2013/11/05 15:53:04
Nit: No longer used.
Joao da Silva
2013/11/07 13:15:00
Done.
| |
36 using testing::Return; | 36 using testing::Return; |
37 using testing::_; | 37 using testing::_; |
38 | 38 |
39 namespace chromeos { | 39 namespace chromeos { |
40 | 40 |
41 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
42 const char kUser1ProfilePath[] = "/profile/user1/shill"; | 42 const char kUser1ProfilePath[] = "/profile/user1/shill"; |
43 #endif // defined(OS_CHROMEOS) | 43 #endif // defined(OS_CHROMEOS) |
44 | 44 |
45 class ExtensionNetworkingPrivateApiTest : | 45 class ExtensionNetworkingPrivateApiTest : |
46 public ExtensionApiTest, | 46 public ExtensionApiTest, |
47 public testing::WithParamInterface<bool> { | 47 public testing::WithParamInterface<bool> { |
48 public: | 48 public: |
49 bool RunNetworkingSubtest(const std::string& subtest) { | 49 bool RunNetworkingSubtest(const std::string& subtest) { |
50 return RunExtensionSubtest( | 50 return RunExtensionSubtest( |
51 "networking", "main.html?" + subtest, | 51 "networking", "main.html?" + subtest, |
52 kFlagEnableFileAccess | kFlagLoadAsComponent); | 52 kFlagEnableFileAccess | kFlagLoadAsComponent); |
53 } | 53 } |
54 | 54 |
55 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 55 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
56 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
57 EXPECT_CALL(provider_, IsInitializationComplete(_)) | 57 EXPECT_CALL(provider_, IsInitializationComplete(_)) |
58 .WillRepeatedly(Return(true)); | 58 .WillRepeatedly(Return(true)); |
59 EXPECT_CALL(provider_, RegisterPolicyDomain(_)).Times(AnyNumber()); | |
60 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); | 59 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
61 #endif | 60 #endif |
62 | 61 |
63 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 62 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
64 } | 63 } |
65 | 64 |
66 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
67 static void AssignString(std::string* out, | 66 static void AssignString(std::string* out, |
68 DBusMethodCallStatus call_status, | 67 DBusMethodCallStatus call_status, |
69 const std::string& result) { | 68 const std::string& result) { |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, | 380 IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, |
382 VerifyAndEncryptData) { | 381 VerifyAndEncryptData) { |
383 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; | 382 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; |
384 } | 383 } |
385 | 384 |
386 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, | 385 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, |
387 ExtensionNetworkingPrivateApiTest, | 386 ExtensionNetworkingPrivateApiTest, |
388 testing::Bool()); | 387 testing::Bool()); |
389 | 388 |
390 } // namespace chromeos | 389 } // namespace chromeos |
OLD | NEW |