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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 class MockBrowserContext : public content::BrowserContext { | 367 class MockBrowserContext : public content::BrowserContext { |
368 public: | 368 public: |
369 MockBrowserContext() {} | 369 MockBrowserContext() {} |
370 ~MockBrowserContext() {} | 370 ~MockBrowserContext() {} |
371 | 371 |
372 MOCK_METHOD0(GetPath, FilePath()); | 372 MOCK_METHOD0(GetPath, FilePath()); |
373 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); | 373 MOCK_CONST_METHOD0(IsOffTheRecord, bool()); |
374 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); | 374 MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*()); |
375 MOCK_METHOD1(GetRequestContextForRenderProcess, | 375 MOCK_METHOD1(GetRequestContextForRenderProcess, |
376 net::URLRequestContextGetter*(int renderer_child_id)); | 376 net::URLRequestContextGetter*(int renderer_child_id)); |
377 MOCK_METHOD0(GetRequestContextForMedia, net::URLRequestContextGetter*()); | 377 MOCK_METHOD0(GetMediaRequestContext, |
| 378 net::URLRequestContextGetter*()); |
| 379 MOCK_METHOD1(GetMediaRequestContextForRenderProcess, |
| 380 net::URLRequestContextGetter*(int renderer_child_id)); |
378 MOCK_METHOD0(GetResourceContext, content::ResourceContext*()); | 381 MOCK_METHOD0(GetResourceContext, content::ResourceContext*()); |
379 MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*()); | 382 MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*()); |
380 MOCK_METHOD0(GetGeolocationPermissionContext, | 383 MOCK_METHOD0(GetGeolocationPermissionContext, |
381 content::GeolocationPermissionContext* ()); | 384 content::GeolocationPermissionContext* ()); |
382 MOCK_METHOD0(GetSpeechRecognitionPreferences, | 385 MOCK_METHOD0(GetSpeechRecognitionPreferences, |
383 content::SpeechRecognitionPreferences* ()); | 386 content::SpeechRecognitionPreferences* ()); |
384 MOCK_METHOD0(DidLastSessionExitCleanly, bool()); | 387 MOCK_METHOD0(DidLastSessionExitCleanly, bool()); |
385 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); | 388 MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*()); |
386 }; | 389 }; |
387 | 390 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 UpdateItemInPersistentStore(&item)); | 646 UpdateItemInPersistentStore(&item)); |
644 EXPECT_CALL(item, GetState()) | 647 EXPECT_CALL(item, GetState()) |
645 .WillRepeatedly(Return(DownloadItem::CANCELLED)); | 648 .WillRepeatedly(Return(DownloadItem::CANCELLED)); |
646 EXPECT_CALL(item, GetDbHandle()) | 649 EXPECT_CALL(item, GetDbHandle()) |
647 .WillRepeatedly(Return(db_handle)); | 650 .WillRepeatedly(Return(db_handle)); |
648 | 651 |
649 EXPECT_CALL(item, OffThreadCancel()); | 652 EXPECT_CALL(item, OffThreadCancel()); |
650 DownloadStopped(&item); | 653 DownloadStopped(&item); |
651 EXPECT_EQ(NULL, download_manager_->GetActiveDownloadItem(download_id)); | 654 EXPECT_EQ(NULL, download_manager_->GetActiveDownloadItem(download_id)); |
652 } | 655 } |
OLD | NEW |