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

Side by Side Diff: media/cdm/cdm_adapter_unittest.cc

Issue 2086353002: Remove calls to deprecated MessageLoop methods in media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/cdm/cdm_adapter.h" 5 #include "media/cdm/cdm_adapter.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 std::unique_ptr<NewSessionCdmPromise> promise( 199 std::unique_ptr<NewSessionCdmPromise> promise(
200 new CdmCallbackPromise<std::string>( 200 new CdmCallbackPromise<std::string>(
201 base::Bind(&CdmAdapterTest::OnResolveWithSession, 201 base::Bind(&CdmAdapterTest::OnResolveWithSession,
202 base::Unretained(this)), 202 base::Unretained(this)),
203 base::Bind(&CdmAdapterTest::OnReject, base::Unretained(this)))); 203 base::Bind(&CdmAdapterTest::OnReject, base::Unretained(this))));
204 return promise; 204 return promise;
205 } 205 }
206 206
207 void RunUntilIdle() { message_loop_.RunUntilIdle(); } 207 void RunUntilIdle() { base::RunLoop().RunUntilIdle(); }
208 208
209 std::unique_ptr<CdmFileIO> CreateCdmFileIO(cdm::FileIOClient* client) { 209 std::unique_ptr<CdmFileIO> CreateCdmFileIO(cdm::FileIOClient* client) {
210 ADD_FAILURE() << "Should never be called"; 210 ADD_FAILURE() << "Should never be called";
211 return nullptr; 211 return nullptr;
212 } 212 }
213 213
214 // Methods used for promise resolved/rejected. 214 // Methods used for promise resolved/rejected.
215 MOCK_METHOD0(OnResolve, void()); 215 MOCK_METHOD0(OnResolve, void());
216 MOCK_METHOD1(OnResolveWithSession, void(const std::string& session_id)); 216 MOCK_METHOD1(OnResolveWithSession, void(const std::string& session_id));
217 MOCK_METHOD3(OnReject, 217 MOCK_METHOD3(OnReject,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 TEST_F(CdmAdapterTest, UpdateSessionWithBadData) { 323 TEST_F(CdmAdapterTest, UpdateSessionWithBadData) {
324 InitializeAndExpect(ExternalClearKeyLibrary(), SUCCESS); 324 InitializeAndExpect(ExternalClearKeyLibrary(), SUCCESS);
325 325
326 std::vector<uint8_t> key_id(kKeyId, kKeyId + arraysize(kKeyId)); 326 std::vector<uint8_t> key_id(kKeyId, kKeyId + arraysize(kKeyId));
327 CreateSessionAndExpect(EmeInitDataType::WEBM, key_id, SUCCESS); 327 CreateSessionAndExpect(EmeInitDataType::WEBM, key_id, SUCCESS);
328 328
329 UpdateSessionAndExpect(SessionId(), "random data", FAILURE, true); 329 UpdateSessionAndExpect(SessionId(), "random data", FAILURE, true);
330 } 330 }
331 331
332 } // namespace media 332 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698