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