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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/stl_util.h" | 6 #include "base/stl_util.h" |
7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
8 #include "content/browser/download/byte_stream.h" | 8 #include "content/browser/download/byte_stream.h" |
9 #include "content/browser/download/download_create_info.h" | 9 #include "content/browser/download/download_create_info.h" |
10 #include "content/browser/download/download_file_manager.h" | 10 #include "content/browser/download/download_file_manager.h" |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 | 569 |
570 // Confirm cancel sets state properly. | 570 // Confirm cancel sets state properly. |
571 EXPECT_CALL(*mock_delegate(), DownloadCancelled(item)); | 571 EXPECT_CALL(*mock_delegate(), DownloadCancelled(item)); |
572 item->Cancel(true); | 572 item->Cancel(true); |
573 EXPECT_EQ(DownloadItem::CANCELLED, item->GetState()); | 573 EXPECT_EQ(DownloadItem::CANCELLED, item->GetState()); |
574 } | 574 } |
575 | 575 |
576 TEST_F(DownloadItemTest, FileRemoved) { | 576 TEST_F(DownloadItemTest, FileRemoved) { |
577 DownloadItem* item = CreateDownloadItem(DownloadItem::IN_PROGRESS); | 577 DownloadItem* item = CreateDownloadItem(DownloadItem::IN_PROGRESS); |
578 | 578 |
579 EXPECT_EQ(false, item->GetFileExternallyRemoved()); | 579 EXPECT_FALSE(item->GetFileExternallyRemoved()); |
580 item->OnDownloadedFileRemoved(); | 580 item->OnDownloadedFileRemoved(); |
581 EXPECT_EQ(true, item->GetFileExternallyRemoved()); | 581 EXPECT_TRUE(item->GetFileExternallyRemoved()); |
582 } | 582 } |
583 | 583 |
584 TEST(MockDownloadItem, Compiles) { | 584 TEST(MockDownloadItem, Compiles) { |
585 MockDownloadItem mock_item; | 585 MockDownloadItem mock_item; |
586 } | 586 } |
OLD | NEW |