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

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

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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 <stdint.h>
6
5 #include "base/callback.h" 7 #include "base/callback.h"
6 #include "base/feature_list.h" 8 #include "base/feature_list.h"
7 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
8 #include "base/stl_util.h" 10 #include "base/stl_util.h"
9 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
10 #include "content/browser/byte_stream.h" 12 #include "content/browser/byte_stream.h"
11 #include "content/browser/download/download_create_info.h" 13 #include "content/browser/download/download_create_info.h"
12 #include "content/browser/download/download_file_factory.h" 14 #include "content/browser/download/download_file_factory.h"
13 #include "content/browser/download/download_item_impl.h" 15 #include "content/browser/download/download_item_impl.h"
14 #include "content/browser/download/download_item_impl_delegate.h" 16 #include "content/browser/download/download_item_impl_delegate.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 49
48 MOCK_METHOD2(DetermineDownloadTarget, void( 50 MOCK_METHOD2(DetermineDownloadTarget, void(
49 DownloadItemImpl*, const DownloadTargetCallback&)); 51 DownloadItemImpl*, const DownloadTargetCallback&));
50 MOCK_METHOD2(ShouldCompleteDownload, 52 MOCK_METHOD2(ShouldCompleteDownload,
51 bool(DownloadItemImpl*, const base::Closure&)); 53 bool(DownloadItemImpl*, const base::Closure&));
52 MOCK_METHOD2(ShouldOpenDownload, 54 MOCK_METHOD2(ShouldOpenDownload,
53 bool(DownloadItemImpl*, const ShouldOpenDownloadCallback&)); 55 bool(DownloadItemImpl*, const ShouldOpenDownloadCallback&));
54 MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&)); 56 MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&));
55 MOCK_METHOD1(CheckForFileRemoval, void(DownloadItemImpl*)); 57 MOCK_METHOD1(CheckForFileRemoval, void(DownloadItemImpl*));
56 58
57 void ResumeInterruptedDownload( 59 void ResumeInterruptedDownload(scoped_ptr<DownloadUrlParameters> params,
58 scoped_ptr<DownloadUrlParameters> params, uint32 id) override { 60 uint32_t id) override {
59 MockResumeInterruptedDownload(params.get(), id); 61 MockResumeInterruptedDownload(params.get(), id);
60 } 62 }
61 MOCK_METHOD2(MockResumeInterruptedDownload, 63 MOCK_METHOD2(MockResumeInterruptedDownload,
62 void(DownloadUrlParameters* params, uint32 id)); 64 void(DownloadUrlParameters* params, uint32_t id));
63 65
64 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); 66 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
65 MOCK_METHOD1(UpdatePersistence, void(DownloadItemImpl*)); 67 MOCK_METHOD1(UpdatePersistence, void(DownloadItemImpl*));
66 MOCK_METHOD1(DownloadOpened, void(DownloadItemImpl*)); 68 MOCK_METHOD1(DownloadOpened, void(DownloadItemImpl*));
67 MOCK_METHOD1(DownloadRemoved, void(DownloadItemImpl*)); 69 MOCK_METHOD1(DownloadRemoved, void(DownloadItemImpl*));
68 MOCK_CONST_METHOD1(AssertStateConsistent, void(DownloadItemImpl*)); 70 MOCK_CONST_METHOD1(AssertStateConsistent, void(DownloadItemImpl*));
69 71
70 void VerifyAndClearExpectations() { 72 void VerifyAndClearExpectations() {
71 ::testing::Mock::VerifyAndClearExpectations(this); 73 ::testing::Mock::VerifyAndClearExpectations(this);
72 SetDefaultExpectations(); 74 SetDefaultExpectations();
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 base::Unretained(&returned_path))); 1314 base::Unretained(&returned_path)));
1313 RunAllPendingInMessageLoops(); 1315 RunAllPendingInMessageLoops();
1314 EXPECT_TRUE(returned_path.empty()); 1316 EXPECT_TRUE(returned_path.empty());
1315 } 1317 }
1316 1318
1317 TEST(MockDownloadItem, Compiles) { 1319 TEST(MockDownloadItem, Compiles) {
1318 MockDownloadItem mock_item; 1320 MockDownloadItem mock_item;
1319 } 1321 }
1320 1322
1321 } // namespace content 1323 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_delegate.cc ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698