| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_ | 4 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_ |
| 5 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_ | 5 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_ |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/chromeos/login/login_manager_test.h" | 10 #include "chrome/browser/chromeos/login/login_manager_test_helper.h" |
| 11 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" | 11 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" |
| 12 #include "chrome/browser/managed_mode/managed_user_registration_utility_stub.h" | 12 #include "chrome/browser/managed_mode/managed_user_registration_utility_stub.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/test/base/in_process_browser_test.h" |
| 14 #include "chromeos/cryptohome/mock_async_method_caller.h" | 15 #include "chromeos/cryptohome/mock_async_method_caller.h" |
| 15 #include "chromeos/cryptohome/mock_homedir_methods.h" | 16 #include "chromeos/cryptohome/mock_homedir_methods.h" |
| 16 #include "sync/api/fake_sync_change_processor.h" | 17 #include "sync/api/fake_sync_change_processor.h" |
| 17 #include "sync/api/sync_change.h" | 18 #include "sync/api/sync_change.h" |
| 18 #include "sync/api/sync_error_factory_mock.h" | 19 #include "sync/api/sync_error_factory_mock.h" |
| 19 #include "sync/protocol/sync.pb.h" | 20 #include "sync/protocol/sync.pb.h" |
| 20 | 21 |
| 21 namespace chromeos { | 22 namespace chromeos { |
| 22 | 23 |
| 23 namespace testing { | 24 namespace testing { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const std::string& key, | 62 const std::string& key, |
| 62 const base::Value& value, | 63 const base::Value& value, |
| 63 bool acknowledged, | 64 bool acknowledged, |
| 64 bool update); | 65 bool update); |
| 65 | 66 |
| 66 syncer::FakeSyncChangeProcessor* processor_; | 67 syncer::FakeSyncChangeProcessor* processor_; |
| 67 ManagedUserSharedSettingsService* service_; | 68 ManagedUserSharedSettingsService* service_; |
| 68 int next_sync_data_id_; | 69 int next_sync_data_id_; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 class ManagedUserTestBase : public chromeos::LoginManagerTest { | 72 class ManagedUserTestBase : public InProcessBrowserTest { |
| 72 public: | 73 public: |
| 73 ManagedUserTestBase(); | 74 ManagedUserTestBase(); |
| 74 virtual ~ManagedUserTestBase(); | 75 virtual ~ManagedUserTestBase(); |
| 75 | 76 |
| 77 virtual void SetUpOnMainThread() OVERRIDE; |
| 78 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
| 76 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 79 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; |
| 77 virtual void CleanUpOnMainThread() OVERRIDE; | 80 virtual void CleanUpOnMainThread() OVERRIDE; |
| 78 | 81 |
| 79 protected: | 82 protected: |
| 80 virtual void TearDown() OVERRIDE; | 83 virtual void TearDown() OVERRIDE; |
| 81 | 84 |
| 82 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; | 85 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; |
| 83 | 86 |
| 84 void JSEval(const std::string& script); | 87 void JSEval(const std::string& script); |
| 85 | 88 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 98 const std::string& expected_display_name); | 101 const std::string& expected_display_name); |
| 99 void SigninAsManager(int user_index); | 102 void SigninAsManager(int user_index); |
| 100 void RemoveSupervisedUser(unsigned long original_user_count, | 103 void RemoveSupervisedUser(unsigned long original_user_count, |
| 101 int user_index, | 104 int user_index, |
| 102 const std::string& expected_display_name); | 105 const std::string& expected_display_name); |
| 103 | 106 |
| 104 cryptohome::MockAsyncMethodCaller* mock_async_method_caller_; | 107 cryptohome::MockAsyncMethodCaller* mock_async_method_caller_; |
| 105 cryptohome::MockHomedirMethods* mock_homedir_methods_; | 108 cryptohome::MockHomedirMethods* mock_homedir_methods_; |
| 106 NetworkPortalDetectorTestImpl* network_portal_detector_; | 109 NetworkPortalDetectorTestImpl* network_portal_detector_; |
| 107 ManagedUserRegistrationUtilityStub* registration_utility_stub_; | 110 ManagedUserRegistrationUtilityStub* registration_utility_stub_; |
| 111 scoped_ptr<LoginManagerTestHelper> login_manager_test_helper_; |
| 108 scoped_ptr<ScopedTestingManagedUserRegistrationUtility> scoped_utility_; | 112 scoped_ptr<ScopedTestingManagedUserRegistrationUtility> scoped_utility_; |
| 109 scoped_ptr<ManagedUsersSharedSettingsSyncTestAdapter> | 113 scoped_ptr<ManagedUsersSharedSettingsSyncTestAdapter> |
| 110 shared_settings_adapter_; | 114 shared_settings_adapter_; |
| 111 scoped_ptr<ManagedUsersSyncTestAdapter> managed_users_adapter_; | 115 scoped_ptr<ManagedUsersSyncTestAdapter> managed_users_adapter_; |
| 112 | 116 |
| 113 private: | 117 private: |
| 114 DISALLOW_COPY_AND_ASSIGN(ManagedUserTestBase); | 118 DISALLOW_COPY_AND_ASSIGN(ManagedUserTestBase); |
| 115 }; | 119 }; |
| 116 | 120 |
| 117 } // namespace testing | 121 } // namespace testing |
| 118 | 122 |
| 119 } // namespace chromeos | 123 } // namespace chromeos |
| 120 | 124 |
| 121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_ | 125 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_ |
| OLD | NEW |