| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 EXPECT_CALL(*mock_dbus_thread_manager_->mock_cryptohome_client(), | 168 EXPECT_CALL(*mock_dbus_thread_manager_->mock_cryptohome_client(), |
| 169 GetSanitizedUsername(_, _)) | 169 GetSanitizedUsername(_, _)) |
| 170 .WillRepeatedly(GetSanitizedUsername()); | 170 .WillRepeatedly(GetSanitizedUsername()); |
| 171 EXPECT_CALL(*mock_dbus_thread_manager_->mock_session_manager_client(), | 171 EXPECT_CALL(*mock_dbus_thread_manager_->mock_session_manager_client(), |
| 172 StoreUserPolicy(_, _)) | 172 StoreUserPolicy(_, _)) |
| 173 .WillRepeatedly(StoreUserPolicy(&session_manager_user_policy_, | 173 .WillRepeatedly(StoreUserPolicy(&session_manager_user_policy_, |
| 174 user_key_path)); | 174 user_key_path)); |
| 175 EXPECT_CALL(*mock_dbus_thread_manager_->mock_session_manager_client(), | 175 EXPECT_CALL(*mock_dbus_thread_manager_->mock_session_manager_client(), |
| 176 RetrieveUserPolicy(_)) | 176 RetrieveUserPolicy(_)) |
| 177 .WillRepeatedly(RetrieveUserPolicy(&session_manager_user_policy_)); | 177 .WillRepeatedly(RetrieveUserPolicy(&session_manager_user_policy_)); |
| 178 EXPECT_CALL(*mock_dbus_thread_manager_->mock_update_engine_client(), | |
| 179 GetLastStatus()) | |
| 180 .Times(1) | |
| 181 .WillOnce(Return(chromeos::MockUpdateEngineClient::Status())); | |
| 182 #endif // OS_CHROMEOS | 178 #endif // OS_CHROMEOS |
| 183 | 179 |
| 184 ExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); | 180 ExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 185 } | 181 } |
| 186 | 182 |
| 187 virtual void SetUpOnMainThread() OVERRIDE { | 183 virtual void SetUpOnMainThread() OVERRIDE { |
| 188 ASSERT_TRUE(PolicyServiceIsEmpty(g_browser_process->policy_service())) | 184 ASSERT_TRUE(PolicyServiceIsEmpty(g_browser_process->policy_service())) |
| 189 << "Pre-existing policies in this machine will make this test fail."; | 185 << "Pre-existing policies in this machine will make this test fail."; |
| 190 | 186 |
| 191 // Install the initial extension. | 187 // Install the initial extension. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 ASSERT_EQ(kTestExtension2, extension2->id()); | 317 ASSERT_EQ(kTestExtension2, extension2->id()); |
| 322 | 318 |
| 323 // This extension only sends the 'policy' signal once it receives the policy, | 319 // This extension only sends the 'policy' signal once it receives the policy, |
| 324 // and after verifying it has the expected value. Otherwise it sends 'fail'. | 320 // and after verifying it has the expected value. Otherwise it sends 'fail'. |
| 325 EXPECT_TRUE(result_listener.WaitUntilSatisfied()); | 321 EXPECT_TRUE(result_listener.WaitUntilSatisfied()); |
| 326 } | 322 } |
| 327 | 323 |
| 328 #endif // OS_CHROMEOS | 324 #endif // OS_CHROMEOS |
| 329 | 325 |
| 330 } // namespace policy | 326 } // namespace policy |
| OLD | NEW |