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

Side by Side Diff: chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc

Issue 670953006: Componentize HostContentSettingsMap and content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win64 suppress warnings Created 6 years, 1 month 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
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h" 10 #include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h"
11 #include "chrome/browser/chromeos/attestation/fake_certificate.h" 11 #include "chrome/browser/chromeos/attestation/fake_certificate.h"
12 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" 12 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h"
13 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" 13 #include "chrome/browser/chromeos/login/users/mock_user_manager.h"
14 #include "chrome/browser/chromeos/settings/cros_settings.h" 14 #include "chrome/browser/chromeos/settings/cros_settings.h"
15 #include "chrome/browser/chromeos/settings/device_settings_service.h" 15 #include "chrome/browser/chromeos/settings/device_settings_service.h"
16 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" 16 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h"
17 #include "chrome/browser/content_settings/host_content_settings_map.h"
18 #include "chrome/browser/profiles/profile_impl.h" 17 #include "chrome/browser/profiles/profile_impl.h"
19 #include "chrome/browser/renderer_host/pepper/device_id_fetcher.h" 18 #include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
20 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/testing_pref_service_syncable.h" 20 #include "chrome/test/base/testing_pref_service_syncable.h"
22 #include "chromeos/attestation/mock_attestation_flow.h" 21 #include "chromeos/attestation/mock_attestation_flow.h"
23 #include "chromeos/cryptohome/mock_async_method_caller.h" 22 #include "chromeos/cryptohome/mock_async_method_caller.h"
24 #include "chromeos/dbus/fake_cryptohome_client.h" 23 #include "chromeos/dbus/fake_cryptohome_client.h"
25 #include "chromeos/settings/cros_settings_names.h" 24 #include "chromeos/settings/cros_settings_names.h"
25 #include "components/content_settings/core/browser/host_content_settings_map.h"
26 #include "components/content_settings/core/common/content_settings_pattern.h" 26 #include "components/content_settings/core/common/content_settings_pattern.h"
27 #include "content/public/test/test_browser_thread.h" 27 #include "content/public/test/test_browser_thread.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 29
30 using testing::_; 30 using testing::_;
31 using testing::DoAll; 31 using testing::DoAll;
32 using testing::Invoke; 32 using testing::Invoke;
33 using testing::Return; 33 using testing::Return;
34 using testing::SetArgumentPointee; 34 using testing::SetArgumentPointee;
35 using testing::StrictMock; 35 using testing::StrictMock;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 fake_delegate_.set_response(PlatformVerificationFlow::CONSENT_RESPONSE_DENY); 481 fake_delegate_.set_response(PlatformVerificationFlow::CONSENT_RESPONSE_DENY);
482 fake_cryptohome_client_.set_attestation_enrolled(false); 482 fake_cryptohome_client_.set_attestation_enrolled(false);
483 fake_cryptohome_client_.set_attestation_prepared(false); 483 fake_cryptohome_client_.set_attestation_prepared(false);
484 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_); 484 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_);
485 base::RunLoop().RunUntilIdle(); 485 base::RunLoop().RunUntilIdle();
486 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_); 486 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_);
487 } 487 }
488 488
489 } // namespace attestation 489 } // namespace attestation
490 } // namespace chromeos 490 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698