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

Side by Side Diff: media/cdm/ppapi/cdm_file_io_test.cc

Issue 562833002: Encrypted Media: Fix a typo in FileIOTest::MatchResult(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/cdm/ppapi/cdm_file_io_test.h" 5 #include "media/cdm/ppapi/cdm_file_io_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 357 }
358 358
359 bool FileIOTest::MatchesResult(const TestStep& a, const TestStep& b) { 359 bool FileIOTest::MatchesResult(const TestStep& a, const TestStep& b) {
360 DCHECK(IsResult(a) && IsResult(b)); 360 DCHECK(IsResult(a) && IsResult(b));
361 if (a.type != b.type || a.status != b.status) 361 if (a.type != b.type || a.status != b.status)
362 return false; 362 return false;
363 363
364 if (a.type != RESULT_READ || a.status != cdm::FileIOClient::kSuccess) 364 if (a.type != RESULT_READ || a.status != cdm::FileIOClient::kSuccess)
365 return true; 365 return true;
366 366
367 return (a.data_size == a.data_size && 367 return (a.data_size == b.data_size &&
368 std::equal(a.data, a.data + a.data_size, b.data)); 368 std::equal(a.data, a.data + a.data_size, b.data));
369 } 369 }
370 370
371 void FileIOTest::RunNextStep() { 371 void FileIOTest::RunNextStep() {
372 // Run all actions in the current action group. 372 // Run all actions in the current action group.
373 while (!test_steps_.empty()) { 373 while (!test_steps_.empty()) {
374 // Start to wait for test results when the next step is a test result. 374 // Start to wait for test results when the next step is a test result.
375 if (IsResult(test_steps_.front())) 375 if (IsResult(test_steps_.front()))
376 return; 376 return;
377 377
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 void FileIOTest::OnTestComplete(bool success) { 445 void FileIOTest::OnTestComplete(bool success) {
446 while (!file_io_stack_.empty()) { 446 while (!file_io_stack_.empty()) {
447 file_io_stack_.top()->Close(); 447 file_io_stack_.top()->Close();
448 file_io_stack_.pop(); 448 file_io_stack_.pop();
449 } 449 }
450 FILE_IO_DVLOG(3) << test_name_ << (success ? " PASSED" : " FAILED"); 450 FILE_IO_DVLOG(3) << test_name_ << (success ? " PASSED" : " FAILED");
451 base::ResetAndReturn(&completion_cb_).Run(success); 451 base::ResetAndReturn(&completion_cb_).Run(success);
452 } 452 }
453 453
454 } // namespace media 454 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698