Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: content/browser/download/download_item_impl_unittest.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Converted new unittest. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698