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

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

Issue 881983003: media: Invoke PlatformVerificationDialog from ProtectedMediaIdentifierPermissionContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added todo + bug Created 5 years, 10 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
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"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 HostContentSettingsMap::RegisterProfilePrefs(pref_service_.registry()); 68 HostContentSettingsMap::RegisterProfilePrefs(pref_service_.registry());
69 content_settings_ = new HostContentSettingsMap(&pref_service_, false); 69 content_settings_ = new HostContentSettingsMap(&pref_service_, false);
70 } 70 }
71 71
72 void TearDown() { 72 void TearDown() {
73 content_settings_->ShutdownOnUIThread(); 73 content_settings_->ShutdownOnUIThread();
74 } 74 }
75 75
76 void ShowConsentPrompt( 76 void ShowConsentPrompt(
77 content::WebContents* web_contents, 77 content::WebContents* web_contents,
78 const GURL& requesting_origin,
78 const PlatformVerificationFlow::Delegate::ConsentCallback& callback) 79 const PlatformVerificationFlow::Delegate::ConsentCallback& callback)
79 override { 80 override {
80 num_consent_calls_++; 81 num_consent_calls_++;
81 callback.Run(response_); 82 callback.Run(response_);
82 } 83 }
83 84
84 PrefService* GetPrefs(content::WebContents* web_contents) override { 85 PrefService* GetPrefs(content::WebContents* web_contents) override {
85 return &pref_service_; 86 return &pref_service_;
86 } 87 }
87 88
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 fake_delegate_.set_response(PlatformVerificationFlow::CONSENT_RESPONSE_DENY); 481 fake_delegate_.set_response(PlatformVerificationFlow::CONSENT_RESPONSE_DENY);
481 fake_cryptohome_client_.set_attestation_enrolled(false); 482 fake_cryptohome_client_.set_attestation_enrolled(false);
482 fake_cryptohome_client_.set_attestation_prepared(false); 483 fake_cryptohome_client_.set_attestation_prepared(false);
483 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_); 484 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_);
484 base::RunLoop().RunUntilIdle(); 485 base::RunLoop().RunUntilIdle();
485 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_); 486 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_);
486 } 487 }
487 488
488 } // namespace attestation 489 } // namespace attestation
489 } // namespace chromeos 490 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698