Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/chromeos/login/signed_settings_unittest.cc

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixes comments by eroman Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/login/signed_settings.h" 5 #include "chrome/browser/chromeos/login/signed_settings.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_temp_dir.h" 9 #include "base/memory/scoped_temp_dir.h"
10 #include "base/nss_util.h"
11 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
12 #include "chrome/browser/chromeos/cros/cros_library.h" 11 #include "chrome/browser/chromeos/cros/cros_library.h"
13 #include "chrome/browser/chromeos/cros/mock_library_loader.h" 12 #include "chrome/browser/chromeos/cros/mock_library_loader.h"
14 #include "chrome/browser/chromeos/cros/mock_login_library.h" 13 #include "chrome/browser/chromeos/cros/mock_login_library.h"
15 #include "chrome/browser/chromeos/login/mock_owner_key_utils.h" 14 #include "chrome/browser/chromeos/login/mock_owner_key_utils.h"
16 #include "chrome/browser/chromeos/login/mock_ownership_service.h" 15 #include "chrome/browser/chromeos/login/mock_ownership_service.h"
17 #include "chrome/browser/chromeos/login/owner_manager_unittest.h" 16 #include "chrome/browser/chromeos/login/owner_manager_unittest.h"
18 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 17 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
19 #include "chrome/test/thread_test_helper.h" 18 #include "chrome/test/thread_test_helper.h"
20 #include "content/browser/browser_thread.h" 19 #include "content/browser/browser_thread.h"
20 #include "crypto/rsa_private_key.h"
21 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 using ::testing::AnyNumber; 24 using ::testing::AnyNumber;
25 using ::testing::InvokeArgument; 25 using ::testing::InvokeArgument;
26 using ::testing::Return; 26 using ::testing::Return;
27 using ::testing::StrEq; 27 using ::testing::StrEq;
28 using ::testing::_; 28 using ::testing::_;
29 29
30 namespace em = enterprise_management; 30 namespace em = enterprise_management;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 MockOwnershipService m_; 252 MockOwnershipService m_;
253 253
254 ScopedTempDir tmpdir_; 254 ScopedTempDir tmpdir_;
255 FilePath tmpfile_; 255 FilePath tmpfile_;
256 256
257 MessageLoop message_loop_; 257 MessageLoop message_loop_;
258 BrowserThread ui_thread_; 258 BrowserThread ui_thread_;
259 BrowserThread file_thread_; 259 BrowserThread file_thread_;
260 260
261 std::vector<uint8> fake_public_key_; 261 std::vector<uint8> fake_public_key_;
262 scoped_ptr<RSAPrivateKey> fake_private_key_; 262 scoped_ptr<crypto::RSAPrivateKey> fake_private_key_;
263 263
264 MockKeyUtils* mock_; 264 MockKeyUtils* mock_;
265 MockInjector injector_; 265 MockInjector injector_;
266 266
267 ScopedStubCrosEnabler stub_cros_enabler_; 267 ScopedStubCrosEnabler stub_cros_enabler_;
268 }; 268 };
269 269
270 TEST_F(SignedSettingsTest, CheckWhitelist) { 270 TEST_F(SignedSettingsTest, CheckWhitelist) {
271 NormalDelegate<bool> d(true); 271 NormalDelegate<bool> d(true);
272 d.expect_success(); 272 d.expect_success();
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 .Times(1); 610 .Times(1);
611 611
612 s->Execute(); 612 s->Execute();
613 message_loop_.RunAllPending(); 613 message_loop_.RunAllPending();
614 UnMockLoginLib(); 614 UnMockLoginLib();
615 615
616 s->OnKeyOpComplete(OwnerManager::OPERATION_FAILED, std::vector<uint8>()); 616 s->OnKeyOpComplete(OwnerManager::OPERATION_FAILED, std::vector<uint8>());
617 } 617 }
618 618
619 } // namespace chromeos 619 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/parallel_authenticator.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698