| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/download/download_ui_controller.h" | 5 #include "chrome/browser/download/download_ui_controller.h" | 
| 6 | 6 | 
| 7 #include <memory> | 7 #include <memory> | 
| 8 #include <utility> | 8 #include <utility> | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 214       .WillRepeatedly( | 214       .WillRepeatedly( | 
| 215           ReturnRefOfCopy(base::FilePath(FILE_PATH_LITERAL("foo")))); | 215           ReturnRefOfCopy(base::FilePath(FILE_PATH_LITERAL("foo")))); | 
| 216   EXPECT_CALL(*item, GetFullPath()).WillRepeatedly( | 216   EXPECT_CALL(*item, GetFullPath()).WillRepeatedly( | 
| 217       ReturnRefOfCopy(base::FilePath(FILE_PATH_LITERAL("foo")))); | 217       ReturnRefOfCopy(base::FilePath(FILE_PATH_LITERAL("foo")))); | 
| 218   EXPECT_CALL(*item, GetState()) | 218   EXPECT_CALL(*item, GetState()) | 
| 219       .WillRepeatedly(Return(content::DownloadItem::IN_PROGRESS)); | 219       .WillRepeatedly(Return(content::DownloadItem::IN_PROGRESS)); | 
| 220   EXPECT_CALL(*item, GetUrlChain()) | 220   EXPECT_CALL(*item, GetUrlChain()) | 
| 221       .WillRepeatedly(testing::ReturnRefOfCopy(std::vector<GURL>())); | 221       .WillRepeatedly(testing::ReturnRefOfCopy(std::vector<GURL>())); | 
| 222   EXPECT_CALL(*item, GetReferrerUrl()) | 222   EXPECT_CALL(*item, GetReferrerUrl()) | 
| 223       .WillRepeatedly(testing::ReturnRefOfCopy(GURL())); | 223       .WillRepeatedly(testing::ReturnRefOfCopy(GURL())); | 
|  | 224   EXPECT_CALL(*item, GetTabUrl()) | 
|  | 225       .WillRepeatedly(testing::ReturnRefOfCopy(GURL())); | 
|  | 226   EXPECT_CALL(*item, GetTabReferrerUrl()) | 
|  | 227       .WillRepeatedly(testing::ReturnRefOfCopy(GURL())); | 
| 224   EXPECT_CALL(*item, GetStartTime()).WillRepeatedly(Return(base::Time())); | 228   EXPECT_CALL(*item, GetStartTime()).WillRepeatedly(Return(base::Time())); | 
| 225   EXPECT_CALL(*item, GetEndTime()).WillRepeatedly(Return(base::Time())); | 229   EXPECT_CALL(*item, GetEndTime()).WillRepeatedly(Return(base::Time())); | 
| 226   EXPECT_CALL(*item, GetETag()).WillRepeatedly(ReturnRefOfCopy(std::string())); | 230   EXPECT_CALL(*item, GetETag()).WillRepeatedly(ReturnRefOfCopy(std::string())); | 
| 227   EXPECT_CALL(*item, GetLastModifiedTime()) | 231   EXPECT_CALL(*item, GetLastModifiedTime()) | 
| 228       .WillRepeatedly(ReturnRefOfCopy(std::string())); | 232       .WillRepeatedly(ReturnRefOfCopy(std::string())); | 
| 229   EXPECT_CALL(*item, GetDangerType()) | 233   EXPECT_CALL(*item, GetDangerType()) | 
| 230       .WillRepeatedly(Return(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)); | 234       .WillRepeatedly(Return(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)); | 
| 231   EXPECT_CALL(*item, GetLastReason()) | 235   EXPECT_CALL(*item, GetLastReason()) | 
| 232       .WillRepeatedly(Return(content::DOWNLOAD_INTERRUPT_REASON_NONE)); | 236       .WillRepeatedly(Return(content::DOWNLOAD_INTERRUPT_REASON_NONE)); | 
| 233   EXPECT_CALL(*item, GetReceivedBytes()).WillRepeatedly(Return(0)); | 237   EXPECT_CALL(*item, GetReceivedBytes()).WillRepeatedly(Return(0)); | 
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 349   // DownloadUIController. It should ignore the download since it's marked as | 353   // DownloadUIController. It should ignore the download since it's marked as | 
| 350   // being restored from history. | 354   // being restored from history. | 
| 351   ASSERT_TRUE(manager_observer()); | 355   ASSERT_TRUE(manager_observer()); | 
| 352   manager_observer()->OnDownloadCreated(manager(), item.get()); | 356   manager_observer()->OnDownloadCreated(manager(), item.get()); | 
| 353 | 357 | 
| 354   // Finally, the expectation we've been waiting for: | 358   // Finally, the expectation we've been waiting for: | 
| 355   EXPECT_FALSE(notified_item()); | 359   EXPECT_FALSE(notified_item()); | 
| 356 } | 360 } | 
| 357 | 361 | 
| 358 } // namespace | 362 } // namespace | 
| OLD | NEW | 
|---|