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

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

Issue 10909182: Make FileSystemContext respect StoragePartitions. filesystem:// urls will be properly isolated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch unittest fix from michael Created 8 years, 3 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 | Annotate | Revision Log
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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); 372 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
373 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); 373 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
374 MOCK_METHOD1(GetRequestContextForRenderProcess, 374 MOCK_METHOD1(GetRequestContextForRenderProcess,
375 net::URLRequestContextGetter*(int renderer_child_id)); 375 net::URLRequestContextGetter*(int renderer_child_id));
376 MOCK_METHOD1(GetRequestContextForStoragePartition, 376 MOCK_METHOD1(GetRequestContextForStoragePartition,
377 net::URLRequestContextGetter*(const std::string& id)); 377 net::URLRequestContextGetter*(const std::string& id));
378 MOCK_METHOD0(GetMediaRequestContext, 378 MOCK_METHOD0(GetMediaRequestContext,
379 net::URLRequestContextGetter*()); 379 net::URLRequestContextGetter*());
380 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 380 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
381 net::URLRequestContextGetter*(int renderer_child_id)); 381 net::URLRequestContextGetter*(int renderer_child_id));
382 MOCK_METHOD1(GetMediaRequestContextForStoragePartition,
383 net::URLRequestContextGetter*(const std::string& id));
382 MOCK_METHOD0(GetResourceContext, content::ResourceContext*()); 384 MOCK_METHOD0(GetResourceContext, content::ResourceContext*());
383 MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*()); 385 MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*());
384 MOCK_METHOD0(GetGeolocationPermissionContext, 386 MOCK_METHOD0(GetGeolocationPermissionContext,
385 content::GeolocationPermissionContext* ()); 387 content::GeolocationPermissionContext* ());
386 MOCK_METHOD0(GetSpeechRecognitionPreferences, 388 MOCK_METHOD0(GetSpeechRecognitionPreferences,
387 content::SpeechRecognitionPreferences* ()); 389 content::SpeechRecognitionPreferences* ());
388 MOCK_METHOD0(DidLastSessionExitCleanly, bool()); 390 MOCK_METHOD0(DidLastSessionExitCleanly, bool());
389 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); 391 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*());
390 }; 392 };
391 393
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 UpdateItemInPersistentStore(&item)); 649 UpdateItemInPersistentStore(&item));
648 EXPECT_CALL(item, GetState()) 650 EXPECT_CALL(item, GetState())
649 .WillRepeatedly(Return(DownloadItem::CANCELLED)); 651 .WillRepeatedly(Return(DownloadItem::CANCELLED));
650 EXPECT_CALL(item, GetDbHandle()) 652 EXPECT_CALL(item, GetDbHandle())
651 .WillRepeatedly(Return(db_handle)); 653 .WillRepeatedly(Return(db_handle));
652 654
653 EXPECT_CALL(item, OffThreadCancel()); 655 EXPECT_CALL(item, OffThreadCancel());
654 DownloadStopped(&item); 656 DownloadStopped(&item);
655 EXPECT_EQ(NULL, download_manager_->GetActiveDownloadItem(download_id)); 657 EXPECT_EQ(NULL, download_manager_->GetActiveDownloadItem(download_id));
656 } 658 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698