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

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

Issue 10805020: Kill DownloadItem::IsOtr() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 4 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 | Annotate | Revision Log
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 info_->download_id = 186 info_->download_id =
187 content::DownloadId(kValidDownloadItemIdDomain, ++next_id); 187 content::DownloadId(kValidDownloadItemIdDomain, ++next_id);
188 info_->prompt_user_for_save_location = false; 188 info_->prompt_user_for_save_location = false;
189 info_->url_chain.push_back(GURL()); 189 info_->url_chain.push_back(GURL());
190 info_->state = state; 190 info_->state = state;
191 191
192 scoped_ptr<DownloadRequestHandleInterface> request_handle( 192 scoped_ptr<DownloadRequestHandleInterface> request_handle(
193 new testing::NiceMock<MockRequestHandle>); 193 new testing::NiceMock<MockRequestHandle>);
194 DownloadItemImpl* download = 194 DownloadItemImpl* download =
195 new DownloadItemImpl(&delegate_, *(info_.get()), 195 new DownloadItemImpl(&delegate_, *(info_.get()),
196 request_handle.Pass(), false, net::BoundNetLog()); 196 request_handle.Pass(), net::BoundNetLog());
197 allocated_downloads_.insert(download); 197 allocated_downloads_.insert(download);
198 return download; 198 return download;
199 } 199 }
200 200
201 // Destroy a previously created download item. 201 // Destroy a previously created download item.
202 void DestroyDownloadItem(DownloadItem* item) { 202 void DestroyDownloadItem(DownloadItem* item) {
203 allocated_downloads_.erase(item); 203 allocated_downloads_.erase(item);
204 delete item; 204 delete item;
205 } 205 }
206 206
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 DownloadItemImpl* item = CreateDownloadItem(DownloadItem::IN_PROGRESS); 563 DownloadItemImpl* item = CreateDownloadItem(DownloadItem::IN_PROGRESS);
564 564
565 EXPECT_FALSE(item->GetFileExternallyRemoved()); 565 EXPECT_FALSE(item->GetFileExternallyRemoved());
566 item->OnDownloadedFileRemoved(); 566 item->OnDownloadedFileRemoved();
567 EXPECT_TRUE(item->GetFileExternallyRemoved()); 567 EXPECT_TRUE(item->GetFileExternallyRemoved());
568 } 568 }
569 569
570 TEST(MockDownloadItem, Compiles) { 570 TEST(MockDownloadItem, Compiles) {
571 MockDownloadItem mock_item; 571 MockDownloadItem mock_item;
572 } 572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698