| 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_filter_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" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 EXPECT_FALSE(data_source_->loading()); | 215 EXPECT_FALSE(data_source_->loading()); |
| 216 Stop(); | 216 Stop(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 TEST_F(BufferedDataSourceTest, Range_NotSupported) { | 219 TEST_F(BufferedDataSourceTest, Range_NotSupported) { |
| 220 Initialize(media::PIPELINE_OK); | 220 Initialize(media::PIPELINE_OK); |
| 221 | 221 |
| 222 // It'll try again. | 222 // It'll try again. |
| 223 // | 223 // |
| 224 // TODO(scherkus): try to reuse existing connection http://crbug.com/105231 | 224 // TODO(scherkus): try to reuse existing connection http://crbug.com/104783 |
| 225 ExpectCreateResourceLoader(); | 225 ExpectCreateResourceLoader(); |
| 226 Respond(response_generator_.Generate200()); | 226 Respond(response_generator_.Generate200()); |
| 227 | 227 |
| 228 // Now it'll succeed. | 228 // Now it'll succeed. |
| 229 EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length())); | 229 EXPECT_CALL(host_, SetTotalBytes(response_generator_.content_length())); |
| 230 EXPECT_CALL(host_, SetBufferedBytes(0)); | 230 EXPECT_CALL(host_, SetBufferedBytes(0)); |
| 231 Respond(response_generator_.Generate200()); | 231 Respond(response_generator_.Generate200()); |
| 232 | 232 |
| 233 EXPECT_TRUE(data_source_->loading()); | 233 EXPECT_TRUE(data_source_->loading()); |
| 234 EXPECT_TRUE(data_source_->IsStreaming()); | 234 EXPECT_TRUE(data_source_->IsStreaming()); |
| (...skipping 213 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 |