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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r175140) Created 7 years, 11 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/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 class MockBrowserContext : public BrowserContext { 381 class MockBrowserContext : public BrowserContext {
382 public: 382 public:
383 MockBrowserContext() {} 383 MockBrowserContext() {}
384 ~MockBrowserContext() {} 384 ~MockBrowserContext() {}
385 385
386 MOCK_METHOD0(GetPath, FilePath()); 386 MOCK_METHOD0(GetPath, FilePath());
387 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); 387 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
388 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); 388 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
389 MOCK_METHOD1(GetRequestContextForRenderProcess, 389 MOCK_METHOD1(GetRequestContextForRenderProcess,
390 net::URLRequestContextGetter*(int renderer_child_id)); 390 net::URLRequestContextGetter*(int renderer_child_id));
391 MOCK_METHOD2(GetRequestContextForStoragePartition,
392 net::URLRequestContextGetter*(
393 const FilePath& partition_path, bool in_memory));
394 MOCK_METHOD0(GetMediaRequestContext, 391 MOCK_METHOD0(GetMediaRequestContext,
395 net::URLRequestContextGetter*()); 392 net::URLRequestContextGetter*());
396 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 393 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
397 net::URLRequestContextGetter*(int renderer_child_id)); 394 net::URLRequestContextGetter*(int renderer_child_id));
398 MOCK_METHOD2(GetMediaRequestContextForStoragePartition, 395 MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
399 net::URLRequestContextGetter*( 396 net::URLRequestContextGetter*(
400 const FilePath& partition_path, bool in_memory)); 397 const FilePath& partition_path, bool in_memory));
401 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 398 MOCK_METHOD0(GetResourceContext, ResourceContext*());
402 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 399 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
403 MOCK_METHOD0(GetGeolocationPermissionContext, 400 MOCK_METHOD0(GetGeolocationPermissionContext,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 callback_called_ = false; 641 callback_called_ = false;
645 DetermineDownloadTarget(&item); 642 DetermineDownloadTarget(&item);
646 EXPECT_TRUE(callback_called_); 643 EXPECT_TRUE(callback_called_);
647 EXPECT_EQ(path, target_path_); 644 EXPECT_EQ(path, target_path_);
648 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_); 645 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_);
649 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_); 646 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_);
650 EXPECT_EQ(path, intermediate_path_); 647 EXPECT_EQ(path, intermediate_path_);
651 } 648 }
652 649
653 } // namespace content 650 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698