| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 delegate, | 69 delegate, |
| 70 content::DownloadId(), | 70 content::DownloadId(), |
| 71 base::FilePath(), | 71 base::FilePath(), |
| 72 base::FilePath(), | 72 base::FilePath(), |
| 73 std::vector<GURL>(), | 73 std::vector<GURL>(), |
| 74 GURL(), | 74 GURL(), |
| 75 base::Time(), | 75 base::Time(), |
| 76 base::Time(), | 76 base::Time(), |
| 77 0, | 77 0, |
| 78 0, | 78 0, |
| 79 DownloadItem::IN_PROGRESS, | 79 DownloadItem::COMPLETE, |
| 80 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, | 80 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |
| 81 DOWNLOAD_INTERRUPT_REASON_NONE, | 81 DOWNLOAD_INTERRUPT_REASON_NONE, |
| 82 false, | 82 false, |
| 83 net::BoundNetLog()) {} | 83 net::BoundNetLog()) {} |
| 84 virtual ~MockDownloadItemImpl() {} | 84 virtual ~MockDownloadItemImpl() {} |
| 85 | 85 |
| 86 MOCK_METHOD4(OnDownloadTargetDetermined, | 86 MOCK_METHOD4(OnDownloadTargetDetermined, |
| 87 void(const base::FilePath&, TargetDisposition, | 87 void(const base::FilePath&, TargetDisposition, |
| 88 DownloadDangerType, const base::FilePath&)); | 88 DownloadDangerType, const base::FilePath&)); |
| 89 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*)); | 89 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*)); |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 callback_called_ = false; | 633 callback_called_ = false; |
| 634 DetermineDownloadTarget(&item); | 634 DetermineDownloadTarget(&item); |
| 635 EXPECT_TRUE(callback_called_); | 635 EXPECT_TRUE(callback_called_); |
| 636 EXPECT_EQ(path, target_path_); | 636 EXPECT_EQ(path, target_path_); |
| 637 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_); | 637 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_); |
| 638 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_); | 638 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_); |
| 639 EXPECT_EQ(path, intermediate_path_); | 639 EXPECT_EQ(path, intermediate_path_); |
| 640 } | 640 } |
| 641 | 641 |
| 642 } // namespace content | 642 } // namespace content |
| OLD | NEW |