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

Unified Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments; patch for landing. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | content/browser/host_zoom_level_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl_unittest.cc
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 0c5eb5239667568bd3d1f0be024fcc94ec7cf5c4..fc43b2c238acb44ba3c2426953d8ad341e7705c6 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -28,6 +28,7 @@
#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager_delegate.h"
+#include "content/public/browser/zoom_level_delegate.h"
#include "content/public/test/mock_download_item.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread.h"
@@ -53,6 +54,16 @@ ACTION_TEMPLATE(RunCallback,
return ::std::tr1::get<k>(args).Run(p0);
}
+// Create a specialization so we can mock an override for
+// scoped_ptr<content::ZoomLevelDelegate>
+// BrowserContext::CreateZoomLevelDelegate(const base::FilePath&).
+template<>
+class scoped_ptr<content::ZoomLevelDelegate> {
+ public:
+ scoped_ptr() {}
+ ~scoped_ptr() {}
+};
+
namespace content {
class ByteStreamReader;
@@ -401,6 +412,8 @@ class MockBrowserContext : public BrowserContext {
~MockBrowserContext() {}
MOCK_CONST_METHOD0(GetPath, base::FilePath());
+ MOCK_METHOD1(CreateZoomLevelDelegate,
+ scoped_ptr<ZoomLevelDelegate>(const base::FilePath&));
MOCK_CONST_METHOD0(IsOffTheRecord, bool());
MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
MOCK_METHOD1(GetRequestContextForRenderProcess,
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | content/browser/host_zoom_level_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698