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

Unified Diff: content/browser/host_zoom_map_unittest.cc

Issue 8528011: Page zoom improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: One last(?) tweak. Created 9 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
Index: content/browser/host_zoom_map_unittest.cc
===================================================================
--- content/browser/host_zoom_map_unittest.cc (revision 0)
+++ content/browser/host_zoom_map_unittest.cc (revision 0)
@@ -0,0 +1,32 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/host_zoom_map.h"
+
+#include "base/memory/ref_counted.h"
+#include "base/message_loop.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/test/test_browser_thread.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+class HostZoomMapTest : public testing::Test {
+ public:
+ HostZoomMapTest() : ui_thread_(content::BrowserThread::UI, &message_loop_) {
+ }
+
+ protected:
+ MessageLoop message_loop_;
+ content::TestBrowserThread ui_thread_;
+};
+
+TEST_F(HostZoomMapTest, GetSetZoomLevel) {
+ scoped_refptr<HostZoomMap> host_zoom_map = new HostZoomMap;
+
+ double zoomed = 2.5;
+ host_zoom_map->SetZoomLevel("zoomed.com", zoomed);
+
+ EXPECT_DOUBLE_EQ(host_zoom_map->GetZoomLevel("normal.com"), 0);
+ EXPECT_DOUBLE_EQ(host_zoom_map->GetZoomLevel("zoomed.com"), zoomed);
+}
+
Property changes on: content/browser/host_zoom_map_unittest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698