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

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: Address awong's comments Created 7 years, 10 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 class MockBrowserContext : public BrowserContext { 377 class MockBrowserContext : public BrowserContext {
378 public: 378 public:
379 MockBrowserContext() {} 379 MockBrowserContext() {}
380 ~MockBrowserContext() {} 380 ~MockBrowserContext() {}
381 381
382 MOCK_METHOD0(GetPath, FilePath()); 382 MOCK_METHOD0(GetPath, FilePath());
383 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); 383 MOCK_CONST_METHOD0(IsOffTheRecord, bool());
384 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); 384 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
385 MOCK_METHOD1(GetRequestContextForRenderProcess, 385 MOCK_METHOD1(GetRequestContextForRenderProcess,
386 net::URLRequestContextGetter*(int renderer_child_id)); 386 net::URLRequestContextGetter*(int renderer_child_id));
387 MOCK_METHOD2(GetRequestContextForStoragePartition,
388 net::URLRequestContextGetter*(
389 const FilePath& partition_path, bool in_memory));
390 MOCK_METHOD0(GetMediaRequestContext, 387 MOCK_METHOD0(GetMediaRequestContext,
391 net::URLRequestContextGetter*()); 388 net::URLRequestContextGetter*());
392 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, 389 MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
393 net::URLRequestContextGetter*(int renderer_child_id)); 390 net::URLRequestContextGetter*(int renderer_child_id));
394 MOCK_METHOD2(GetMediaRequestContextForStoragePartition, 391 MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
395 net::URLRequestContextGetter*( 392 net::URLRequestContextGetter*(
396 const FilePath& partition_path, bool in_memory)); 393 const FilePath& partition_path, bool in_memory));
397 MOCK_METHOD0(GetResourceContext, ResourceContext*()); 394 MOCK_METHOD0(GetResourceContext, ResourceContext*());
398 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*()); 395 MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
399 MOCK_METHOD0(GetGeolocationPermissionContext, 396 MOCK_METHOD0(GetGeolocationPermissionContext,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 callback_called_ = false; 638 callback_called_ = false;
642 DetermineDownloadTarget(&item); 639 DetermineDownloadTarget(&item);
643 EXPECT_TRUE(callback_called_); 640 EXPECT_TRUE(callback_called_);
644 EXPECT_EQ(path, target_path_); 641 EXPECT_EQ(path, target_path_);
645 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_); 642 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_);
646 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_); 643 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_);
647 EXPECT_EQ(path, intermediate_path_); 644 EXPECT_EQ(path, intermediate_path_);
648 } 645 }
649 646
650 } // namespace content 647 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698