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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 678343002: Default zoom was never read from chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test for reading default zoom from Settings 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
« chrome/test/base/testing_profile.h ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 2f540caa5e8191ed0db30fe0e70b07a57131821f..f5585b05bf1045cdf9e22cab4e01e149c5c869c3 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -61,6 +61,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
+#include "content/public/browser/zoom_level_delegate.h"
#include "content/public/test/mock_resource_context.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/constants.h"
@@ -636,7 +637,8 @@ base::FilePath TestingProfile::GetPath() const {
scoped_ptr<content::ZoomLevelDelegate> TestingProfile::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
- return nullptr;
+ return make_scoped_ptr(
+ new chrome::ChromeZoomLevelPrefs(GetPrefs(), GetPath(), partition_path));
}
scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() {
@@ -769,6 +771,11 @@ PrefService* TestingProfile::GetPrefs() {
return prefs_.get();
}
+chrome::ChromeZoomLevelPrefs* TestingProfile::GetZoomLevelPrefs() {
+ return static_cast<chrome::ChromeZoomLevelPrefs*>(
+ GetDefaultStoragePartition(this)->GetZoomLevelDelegate());
+}
+
history::TopSites* TestingProfile::GetTopSites() {
return top_sites_.get();
}
« chrome/test/base/testing_profile.h ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698