OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "media/base/media_log.h" | 6 #include "media/base/media_log.h" |
7 #include "media/base/mock_callback.h" | 7 #include "media/base/mock_callback.h" |
8 #include "media/base/mock_filter_host.h" | 8 #include "media/base/mock_data_source_host.h" |
9 #include "media/base/mock_filters.h" | 9 #include "media/base/mock_filters.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" |
12 #include "webkit/media/buffered_data_source.h" | 12 #include "webkit/media/buffered_data_source.h" |
13 #include "webkit/mocks/mock_webframeclient.h" | 13 #include "webkit/mocks/mock_webframeclient.h" |
14 #include "webkit/mocks/mock_weburlloader.h" | 14 #include "webkit/mocks/mock_weburlloader.h" |
15 #include "webkit/media/test_response_generator.h" | 15 #include "webkit/media/test_response_generator.h" |
16 | 16 |
17 using ::testing::_; | 17 using ::testing::_; |
18 using ::testing::Assign; | 18 using ::testing::Assign; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 int loader_bitrate() { return loader()->bitrate_; } | 169 int loader_bitrate() { return loader()->bitrate_; } |
170 int loader_playback_rate() { return loader()->playback_rate_; } | 170 int loader_playback_rate() { return loader()->playback_rate_; } |
171 | 171 |
172 | 172 |
173 scoped_refptr<MockBufferedDataSource> data_source_; | 173 scoped_refptr<MockBufferedDataSource> data_source_; |
174 | 174 |
175 TestResponseGenerator response_generator_; | 175 TestResponseGenerator response_generator_; |
176 MockWebFrameClient client_; | 176 MockWebFrameClient client_; |
177 WebView* view_; | 177 WebView* view_; |
178 | 178 |
179 StrictMock<media::MockFilterHost> host_; | 179 StrictMock<media::MockDataSourceHost> host_; |
180 MessageLoop* message_loop_; | 180 MessageLoop* message_loop_; |
181 | 181 |
182 private: | 182 private: |
183 // Used for calling BufferedDataSource::Read(). | 183 // Used for calling BufferedDataSource::Read(). |
184 uint8 buffer_[kDataSize]; | 184 uint8 buffer_[kDataSize]; |
185 | 185 |
186 // Used for calling BufferedResourceLoader::didReceiveData(). | 186 // Used for calling BufferedResourceLoader::didReceiveData(). |
187 char data_[kDataSize]; | 187 char data_[kDataSize]; |
188 | 188 |
189 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceTest); | 189 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceTest); |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 // During teardown we'll also report our final network status. | 449 // During teardown we'll also report our final network status. |
450 EXPECT_CALL(host_, SetBufferedBytes(kDataSize)); | 450 EXPECT_CALL(host_, SetBufferedBytes(kDataSize)); |
451 //EXPECT_CALL(host_, SetNetworkActivity(false)); | 451 //EXPECT_CALL(host_, SetNetworkActivity(false)); |
452 | 452 |
453 EXPECT_TRUE(data_source_->loading()); | 453 EXPECT_TRUE(data_source_->loading()); |
454 Stop(); | 454 Stop(); |
455 } | 455 } |
456 | 456 |
457 } // namespace webkit_media | 457 } // namespace webkit_media |
OLD | NEW |