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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "media/base/media_log.h" | 7 #include "media/base/media_log.h" |
8 #include "media/base/mock_callback.h" | 8 #include "media/base/mock_callback.h" |
9 #include "media/base/mock_data_source_host.h" | 9 #include "media/base/mock_data_source_host.h" |
10 #include "media/base/mock_filters.h" | 10 #include "media/base/mock_filters.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 EXPECT_CALL(host_, AddBufferedByteRange(0, (kDataSize / 2) - 1)); | 444 EXPECT_CALL(host_, AddBufferedByteRange(0, (kDataSize / 2) - 1)); |
445 ReceiveData(kDataSize / 2); | 445 ReceiveData(kDataSize / 2); |
446 | 446 |
447 // Receive last half of the read. | 447 // Receive last half of the read. |
448 EXPECT_CALL(*this, ReadCallback(kDataSize)); | 448 EXPECT_CALL(*this, ReadCallback(kDataSize)); |
449 EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize - 1)); | 449 EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize - 1)); |
450 ReceiveData(kDataSize / 2); | 450 ReceiveData(kDataSize / 2); |
451 | 451 |
452 EXPECT_TRUE(data_source_->downloading()); | 452 EXPECT_TRUE(data_source_->downloading()); |
453 Stop(); | 453 Stop(); |
454 // XXXXXXXXXXXX Should we report something on didFail? The idea here is that | |
455 // by calling Stop() on the object no more CBs should execute | |
456 EXPECT_TRUE(data_source_->downloading()); | |
457 } | 454 } |
458 | 455 |
459 } // namespace webkit_media | 456 } // namespace webkit_media |
OLD | NEW |