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

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

Issue 2777063008: Connect BackgroundFetch to the OfflineItemCollection
Patch Set: Fixed incognito check and added tests Created 3 years, 8 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 "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 <map> 10 #include <map>
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 MOCK_METHOD1(CreateZoomLevelDelegateMock, 307 MOCK_METHOD1(CreateZoomLevelDelegateMock,
308 ZoomLevelDelegate*(const base::FilePath&)); 308 ZoomLevelDelegate*(const base::FilePath&));
309 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); 309 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
310 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 310 MOCK_METHOD0(GetResourceContext, ResourceContext*());
311 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 311 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
312 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ()); 312 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ());
313 MOCK_METHOD0(GetSpecialStoragePolicy, storage::SpecialStoragePolicy*()); 313 MOCK_METHOD0(GetSpecialStoragePolicy, storage::SpecialStoragePolicy*());
314 MOCK_METHOD0(GetPushMessagingService, PushMessagingService*()); 314 MOCK_METHOD0(GetPushMessagingService, PushMessagingService*());
315 MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*()); 315 MOCK_METHOD0(GetSSLHostStateDelegate, SSLHostStateDelegate*());
316 MOCK_METHOD0(GetPermissionManager, PermissionManager*()); 316 MOCK_METHOD0(GetPermissionManager, PermissionManager*());
317 MOCK_METHOD0(GetBackgroundFetchClient, BackgroundFetchClient*());
317 MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*()); 318 MOCK_METHOD0(GetBackgroundSyncController, BackgroundSyncController*());
318 MOCK_METHOD0(CreateMediaRequestContext, 319 MOCK_METHOD0(CreateMediaRequestContext,
319 net::URLRequestContextGetter*()); 320 net::URLRequestContextGetter*());
320 MOCK_METHOD2(CreateMediaRequestContextForStoragePartition, 321 MOCK_METHOD2(CreateMediaRequestContextForStoragePartition,
321 net::URLRequestContextGetter*( 322 net::URLRequestContextGetter*(
322 const base::FilePath& partition_path, bool in_memory)); 323 const base::FilePath& partition_path, bool in_memory));
323 324
324 // Define these two methods to avoid a 325 // Define these two methods to avoid a
325 // 'cannot access private member declared in class 326 // 'cannot access private member declared in class
326 // URLRequestInterceptorScopedVector' 327 // URLRequestInterceptorScopedVector'
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); 642 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0);
642 643
643 base::Callback<bool(const GURL&)> url_filter = 644 base::Callback<bool(const GURL&)> url_filter =
644 GetSingleURLFilter(download_urls_[0]); 645 GetSingleURLFilter(download_urls_[0]);
645 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( 646 int remove_count = download_manager_->RemoveDownloadsByURLAndTime(
646 url_filter, base::Time(), base::Time::Max()); 647 url_filter, base::Time(), base::Time::Max());
647 EXPECT_EQ(remove_count, 1); 648 EXPECT_EQ(remove_count, 1);
648 } 649 }
649 650
650 } // namespace content 651 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698