OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "media/base/mock_callback.h" | |
13 #include "media/base/mock_data_source_host.h" | 12 #include "media/base/mock_data_source_host.h" |
| 13 #include "media/base/test_helpers.h" |
14 #include "media/filters/file_data_source.h" | 14 #include "media/filters/file_data_source.h" |
15 | 15 |
16 using ::testing::NiceMock; | 16 using ::testing::NiceMock; |
17 using ::testing::StrictMock; | 17 using ::testing::StrictMock; |
18 | 18 |
19 namespace media { | 19 namespace media { |
20 | 20 |
21 class ReadCBHandler { | 21 class ReadCBHandler { |
22 public: | 22 public: |
23 ReadCBHandler() {} | 23 ReadCBHandler() {} |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 EXPECT_CALL(handler, ReadCB(5)); | 92 EXPECT_CALL(handler, ReadCB(5)); |
93 filter->Read(5, 10, ten_bytes, base::Bind( | 93 filter->Read(5, 10, ten_bytes, base::Bind( |
94 &ReadCBHandler::ReadCB, base::Unretained(&handler))); | 94 &ReadCBHandler::ReadCB, base::Unretained(&handler))); |
95 EXPECT_EQ('5', ten_bytes[0]); | 95 EXPECT_EQ('5', ten_bytes[0]); |
96 | 96 |
97 filter->Stop(NewExpectedClosure()); | 97 filter->Stop(NewExpectedClosure()); |
98 } | 98 } |
99 | 99 |
100 } // namespace media | 100 } // namespace media |
OLD | NEW |