OLD | NEW |
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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
12 | 13 |
13 namespace media { | 14 namespace media { |
14 | 15 |
15 #define FILE_IO_DVLOG(level) DVLOG(level) << "File IO Test: " | 16 #define FILE_IO_DVLOG(level) DVLOG(level) << "File IO Test: " |
16 | 17 |
17 const uint8_t kData[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, | 18 const uint8_t kData[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
18 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; | 19 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; |
19 const uint32_t kDataSize = arraysize(kData); | 20 const uint32_t kDataSize = arraysize(kData); |
20 | 21 |
21 const uint8_t kBigData[] = { | 22 const uint8_t kBigData[] = { |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 void FileIOTest::OnTestComplete(bool success) { | 608 void FileIOTest::OnTestComplete(bool success) { |
608 while (!file_io_stack_.empty()) { | 609 while (!file_io_stack_.empty()) { |
609 file_io_stack_.top()->Close(); | 610 file_io_stack_.top()->Close(); |
610 file_io_stack_.pop(); | 611 file_io_stack_.pop(); |
611 } | 612 } |
612 FILE_IO_DVLOG(3) << test_name_ << (success ? " PASSED" : " FAILED"); | 613 FILE_IO_DVLOG(3) << test_name_ << (success ? " PASSED" : " FAILED"); |
613 base::ResetAndReturn(&completion_cb_).Run(success); | 614 base::ResetAndReturn(&completion_cb_).Run(success); |
614 } | 615 } |
615 | 616 |
616 } // namespace media | 617 } // namespace media |
OLD | NEW |