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

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

Issue 209613002: Download shelf autohides on showing in shell, just same as regular open Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added browser and unit tests. Renamed 'UserActed' to 'OpenedOrShown'. Created 4 years, 1 month 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
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/download/download_manager_impl.h" 5 #include "content/browser/download/download_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 MOCK_CONST_METHOD0(GetOpenWhenComplete, bool()); 171 MOCK_CONST_METHOD0(GetOpenWhenComplete, bool());
172 MOCK_METHOD1(SetOpenWhenComplete, void(bool)); 172 MOCK_METHOD1(SetOpenWhenComplete, void(bool));
173 MOCK_CONST_METHOD0(GetFileExternallyRemoved, bool()); 173 MOCK_CONST_METHOD0(GetFileExternallyRemoved, bool());
174 MOCK_CONST_METHOD0(GetDangerType, DownloadDangerType()); 174 MOCK_CONST_METHOD0(GetDangerType, DownloadDangerType());
175 MOCK_CONST_METHOD0(IsDangerous, bool()); 175 MOCK_CONST_METHOD0(IsDangerous, bool());
176 MOCK_METHOD0(GetAutoOpened, bool()); 176 MOCK_METHOD0(GetAutoOpened, bool());
177 MOCK_CONST_METHOD0(GetForcedFilePath, const base::FilePath&()); 177 MOCK_CONST_METHOD0(GetForcedFilePath, const base::FilePath&());
178 MOCK_CONST_METHOD0(HasUserGesture, bool()); 178 MOCK_CONST_METHOD0(HasUserGesture, bool());
179 MOCK_CONST_METHOD0(GetTransitionType, ui::PageTransition()); 179 MOCK_CONST_METHOD0(GetTransitionType, ui::PageTransition());
180 MOCK_CONST_METHOD0(IsTemporary, bool()); 180 MOCK_CONST_METHOD0(IsTemporary, bool());
181 MOCK_METHOD1(SetOpened, void(bool));
182 MOCK_CONST_METHOD0(GetOpened, bool()); 181 MOCK_CONST_METHOD0(GetOpened, bool());
183 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&()); 182 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&());
184 MOCK_CONST_METHOD0(GetETag, const std::string&()); 183 MOCK_CONST_METHOD0(GetETag, const std::string&());
185 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason()); 184 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason());
186 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); 185 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
187 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); 186 MOCK_CONST_METHOD0(GetWebContents, WebContents*());
188 MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath()); 187 MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath());
189 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&)); 188 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&));
190 MOCK_METHOD0(NotifyRemoved, void()); 189 MOCK_METHOD0(NotifyRemoved, void());
191 // May be called when vlog is on. 190 // May be called when vlog is on.
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); 786 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0);
788 787
789 base::Callback<bool(const GURL&)> url_filter = 788 base::Callback<bool(const GURL&)> url_filter =
790 GetSingleURLFilter(download_urls_[0]); 789 GetSingleURLFilter(download_urls_[0]);
791 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( 790 int remove_count = download_manager_->RemoveDownloadsByURLAndTime(
792 url_filter, base::Time(), base::Time::Max()); 791 url_filter, base::Time(), base::Time::Max());
793 EXPECT_EQ(remove_count, 1); 792 EXPECT_EQ(remove_count, 1);
794 } 793 }
795 794
796 } // namespace content 795 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698