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

Side by Side Diff: media/blink/key_system_config_selector_unittest.cc

Issue 1131753003: Plumb |use_secure_codecs| through to BrowserCdmFactoryAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unittest. Created 5 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 bool SelectConfigRequestsPermissionAndReturnsError() { 204 bool SelectConfigRequestsPermissionAndReturnsError() {
205 SelectConfig(); 205 SelectConfig();
206 EXPECT_EQ(1, media_permission_->requests); 206 EXPECT_EQ(1, media_permission_->requests);
207 EXPECT_EQ(0, succeeded_count_); 207 EXPECT_EQ(0, succeeded_count_);
208 EXPECT_EQ(1, not_supported_count_); 208 EXPECT_EQ(1, not_supported_count_);
209 return (media_permission_->requests != 0 && not_supported_count_ != 0); 209 return (media_permission_->requests != 0 && not_supported_count_ != 0);
210 } 210 }
211 211
212 void OnSucceeded(const blink::WebMediaKeySystemConfiguration& result, 212 void OnSucceeded(const blink::WebMediaKeySystemConfiguration& result,
213 bool are_secure_codecs_required) { 213 const CdmConfig& cdm_config) {
214 succeeded_count_++; 214 succeeded_count_++;
215 config_ = result; 215 config_ = result;
216 } 216 }
217 217
218 void OnNotSupported(const blink::WebString&) { not_supported_count_++; } 218 void OnNotSupported(const blink::WebString&) { not_supported_count_++; }
219 219
220 scoped_ptr<FakeKeySystems> key_systems_; 220 scoped_ptr<FakeKeySystems> key_systems_;
221 scoped_ptr<FakeMediaPermission> media_permission_; 221 scoped_ptr<FakeMediaPermission> media_permission_;
222 222
223 // Held values for the call to SelectConfig(). 223 // Held values for the call to SelectConfig().
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 758
759 blink::WebMediaKeySystemConfiguration config2; 759 blink::WebMediaKeySystemConfiguration config2;
760 config2.label = "b"; 760 config2.label = "b";
761 configs_.push_back(config2); 761 configs_.push_back(config2);
762 762
763 ASSERT_TRUE(SelectConfigRequestsPermissionAndReturnsConfig()); 763 ASSERT_TRUE(SelectConfigRequestsPermissionAndReturnsConfig());
764 ASSERT_EQ("b", config_.label); 764 ASSERT_EQ("b", config_.label);
765 } 765 }
766 766
767 } // namespace media 767 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698