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

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

Issue 1418663010: Adding WebContent-free Download (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing Core. Created 5 years 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/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "content/browser/byte_stream.h" 10 #include "content/browser/byte_stream.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&)); 53 MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&));
54 MOCK_METHOD1(CheckForFileRemoval, void(DownloadItemImpl*)); 54 MOCK_METHOD1(CheckForFileRemoval, void(DownloadItemImpl*));
55 55
56 void ResumeInterruptedDownload( 56 void ResumeInterruptedDownload(
57 scoped_ptr<DownloadUrlParameters> params, uint32 id) override { 57 scoped_ptr<DownloadUrlParameters> params, uint32 id) override {
58 MockResumeInterruptedDownload(params.get(), id); 58 MockResumeInterruptedDownload(params.get(), id);
59 } 59 }
60 MOCK_METHOD2(MockResumeInterruptedDownload, 60 MOCK_METHOD2(MockResumeInterruptedDownload,
61 void(DownloadUrlParameters* params, uint32 id)); 61 void(DownloadUrlParameters* params, uint32 id));
62 62
63 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); 63 BrowserContext* GetBrowserContext() const override { return nullptr; }
64 MOCK_METHOD1(UpdatePersistence, void(DownloadItemImpl*)); 64 MOCK_METHOD1(UpdatePersistence, void(DownloadItemImpl*));
65 MOCK_METHOD1(DownloadOpened, void(DownloadItemImpl*)); 65 MOCK_METHOD1(DownloadOpened, void(DownloadItemImpl*));
66 MOCK_METHOD1(DownloadRemoved, void(DownloadItemImpl*)); 66 MOCK_METHOD1(DownloadRemoved, void(DownloadItemImpl*));
67 MOCK_CONST_METHOD1(AssertStateConsistent, void(DownloadItemImpl*)); 67 MOCK_CONST_METHOD1(AssertStateConsistent, void(DownloadItemImpl*));
68 68
69 void VerifyAndClearExpectations() { 69 void VerifyAndClearExpectations() {
70 ::testing::Mock::VerifyAndClearExpectations(this); 70 ::testing::Mock::VerifyAndClearExpectations(this);
71 SetDefaultExpectations(); 71 SetDefaultExpectations();
72 } 72 }
73 73
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 base::Unretained(&returned_path))); 1292 base::Unretained(&returned_path)));
1293 RunAllPendingInMessageLoops(); 1293 RunAllPendingInMessageLoops();
1294 EXPECT_TRUE(returned_path.empty()); 1294 EXPECT_TRUE(returned_path.empty());
1295 } 1295 }
1296 1296
1297 TEST(MockDownloadItem, Compiles) { 1297 TEST(MockDownloadItem, Compiles) {
1298 MockDownloadItem mock_item; 1298 MockDownloadItem mock_item;
1299 } 1299 }
1300 1300
1301 } // namespace content 1301 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698