0
Files
src/content/browser/host_zoom_map_impl_unittest.cc
jam@chromium.org e97882f3de Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that internal content headers don't leak to embedders.
BUG=98716
TBR=phajdan.jr
Review URL: https://chromiumcodereview.appspot.com/10500016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140254 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-04 02:23:17 +00:00

32 lines
955 B
C++

// 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_impl.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/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) {
HostZoomMapImpl host_zoom_map;
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);
}