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

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

Issue 406483004: Initial implementation of API WakeLock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 410 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
411 net::URLRequestContextGetter*(int renderer_child_id)); 411 net::URLRequestContextGetter*(int renderer_child_id));
412 MOCK_METHOD2(GetMediaRequestContextForStoragePartition, 412 MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
413 net::URLRequestContextGetter*( 413 net::URLRequestContextGetter*(
414 const base::FilePath& partition_path, bool in_memory)); 414 const base::FilePath& partition_path, bool in_memory));
415 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 415 MOCK_METHOD0(GetResourceContext, ResourceContext*());
416 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 416 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
417 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ()); 417 MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ());
418 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); 418 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*());
419 MOCK_METHOD0(GetPushMessagingService, PushMessagingService*()); 419 MOCK_METHOD0(GetPushMessagingService, PushMessagingService*());
420 MOCK_METHOD0(GetWakeLockPermissionContext,
421 WakeLockPermissionContext* ());
420 }; 422 };
421 423
422 class MockDownloadManagerObserver : public DownloadManager::Observer { 424 class MockDownloadManagerObserver : public DownloadManager::Observer {
423 public: 425 public:
424 MockDownloadManagerObserver() {} 426 MockDownloadManagerObserver() {}
425 ~MockDownloadManagerObserver() {} 427 ~MockDownloadManagerObserver() {}
426 MOCK_METHOD2(OnDownloadCreated, void( 428 MOCK_METHOD2(OnDownloadCreated, void(
427 DownloadManager*, DownloadItem*)); 429 DownloadManager*, DownloadItem*));
428 MOCK_METHOD1(ManagerGoingDown, void(DownloadManager*)); 430 MOCK_METHOD1(ManagerGoingDown, void(DownloadManager*));
429 MOCK_METHOD2(SelectFileDialogDisplayed, void( 431 MOCK_METHOD2(SelectFileDialogDisplayed, void(
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 .WillOnce(Return()); 681 .WillOnce(Return());
680 EXPECT_CALL(GetMockDownloadItem(3), Remove()) 682 EXPECT_CALL(GetMockDownloadItem(3), Remove())
681 .Times(0); 683 .Times(0);
682 684
683 download_manager_->RemoveAllDownloads(); 685 download_manager_->RemoveAllDownloads();
684 // Because we're mocking the download item, the Remove call doesn't 686 // Because we're mocking the download item, the Remove call doesn't
685 // result in them being removed from the DownloadManager list. 687 // result in them being removed from the DownloadManager list.
686 } 688 }
687 689
688 } // namespace content 690 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698