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

Side by Side Diff: content/browser/host_zoom_map_impl_unittest.cc

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/host_zoom_map_impl.h" 5 #include "content/browser/host_zoom_map_impl.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 class HostZoomMapTest : public testing::Test { 13 class HostZoomMapTest : public testing::Test {
14 public: 14 public:
15 HostZoomMapTest() : ui_thread_(content::BrowserThread::UI, &message_loop_) { 15 HostZoomMapTest() : ui_thread_(content::BrowserThread::UI, &message_loop_) {
16 } 16 }
17 17
18 protected: 18 protected:
19 MessageLoop message_loop_; 19 MessageLoop message_loop_;
20 content::TestBrowserThread ui_thread_; 20 content::TestBrowserThread ui_thread_;
21 }; 21 };
22 22
23 TEST_F(HostZoomMapTest, GetSetZoomLevel) { 23 TEST_F(HostZoomMapTest, GetSetZoomLevel) {
24 HostZoomMapImpl host_zoom_map; 24 HostZoomMapImpl host_zoom_map;
25 25
26 double zoomed = 2.5; 26 double zoomed = 2.5;
27 host_zoom_map.SetZoomLevel("zoomed.com", zoomed); 27 host_zoom_map.SetZoomLevel("zoomed.com", zoomed);
28 28
29 EXPECT_DOUBLE_EQ(host_zoom_map.GetZoomLevel("normal.com"), 0); 29 EXPECT_DOUBLE_EQ(host_zoom_map.GetZoomLevel("normal.com"), 0);
30 EXPECT_DOUBLE_EQ(host_zoom_map.GetZoomLevel("zoomed.com"), zoomed); 30 EXPECT_DOUBLE_EQ(host_zoom_map.GetZoomLevel("zoomed.com"), zoomed);
31 } 31 }
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_provider_unittest.cc ('k') | content/browser/plugin_service_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698