| 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/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/test/test_file_util.h" | 8 #include "base/test/test_file_util.h" |
| 9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
| 10 #include "content/browser/download/byte_stream.h" | 10 #include "content/browser/download/byte_stream.h" |
| 11 #include "content/browser/download/download_create_info.h" | 11 #include "content/browser/download/download_create_info.h" |
| 12 #include "content/browser/download/download_file_impl.h" | 12 #include "content/browser/download/download_file_impl.h" |
| 13 #include "content/browser/download/download_request_handle.h" | 13 #include "content/browser/download/download_request_handle.h" |
| 14 #include "content/browser/power_save_blocker.h" | |
| 15 #include "content/public/browser/download_destination_observer.h" | 14 #include "content/public/browser/download_destination_observer.h" |
| 16 #include "content/public/browser/download_interrupt_reasons.h" | 15 #include "content/public/browser/download_interrupt_reasons.h" |
| 17 #include "content/public/browser/download_manager.h" | 16 #include "content/public/browser/download_manager.h" |
| 17 #include "content/public/browser/power_save_blocker.h" |
| 18 #include "content/public/test/mock_download_manager.h" | 18 #include "content/public/test/mock_download_manager.h" |
| 19 #include "net/base/file_stream.h" | 19 #include "net/base/file_stream.h" |
| 20 #include "net/base/mock_file_stream.h" | 20 #include "net/base/mock_file_stream.h" |
| 21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
| 22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 using ::testing::_; | 25 using ::testing::_; |
| 26 using ::testing::AnyNumber; | 26 using ::testing::AnyNumber; |
| 27 using ::testing::DoAll; | 27 using ::testing::DoAll; |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 596 |
| 597 EXPECT_EQ(static_cast<int64>(strlen(kTestData1) + strlen(kTestData2)), | 597 EXPECT_EQ(static_cast<int64>(strlen(kTestData1) + strlen(kTestData2)), |
| 598 bytes_); | 598 bytes_); |
| 599 EXPECT_EQ(download_file_->GetHashState(), hash_state_); | 599 EXPECT_EQ(download_file_->GetHashState(), hash_state_); |
| 600 | 600 |
| 601 FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true); | 601 FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true); |
| 602 DestroyDownloadFile(0); | 602 DestroyDownloadFile(0); |
| 603 } | 603 } |
| 604 | 604 |
| 605 } // namespace content | 605 } // namespace content |
| OLD | NEW |