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

Side by Side Diff: chrome/browser/ui/zoom/zoom_controller_unittest.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/prefs/pref_service.h" 6 #include "base/prefs/pref_service.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_finder.h" 8 #include "chrome/browser/ui/browser_finder.h"
9 #include "chrome/browser/ui/zoom/zoom_controller.h" 9 #include "chrome/browser/ui/zoom/zoom_controller.h"
10 #include "chrome/browser/ui/zoom/zoom_observer.h" 10 #include "chrome/browser/ui/zoom/zoom_observer.h"
(...skipping 10 matching lines...) Expand all
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 class TestZoomObserver : public ZoomObserver { 23 class TestZoomObserver : public ZoomObserver {
24 public: 24 public:
25 MOCK_METHOD2(OnZoomChanged, void(content::WebContents*, bool)); 25 MOCK_METHOD2(OnZoomChanged, void(content::WebContents*, bool));
26 }; 26 };
27 27
28 class ZoomControllerTest : public ChromeRenderViewHostTestHarness { 28 class ZoomControllerTest : public ChromeRenderViewHostTestHarness {
29 public: 29 public:
30 ZoomControllerTest() 30 ZoomControllerTest()
31 : ui_thread_(content::BrowserThread::UI, MessageLoop::current()) {} 31 : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()) {}
32 32
33 virtual void SetUp() OVERRIDE { 33 virtual void SetUp() OVERRIDE {
34 ChromeRenderViewHostTestHarness::SetUp(); 34 ChromeRenderViewHostTestHarness::SetUp();
35 zoom_controller_.reset(new ZoomController(web_contents())); 35 zoom_controller_.reset(new ZoomController(web_contents()));
36 zoom_controller_->set_observer(&zoom_observer_); 36 zoom_controller_->set_observer(&zoom_observer_);
37 } 37 }
38 38
39 virtual void TearDown() OVERRIDE { 39 virtual void TearDown() OVERRIDE {
40 zoom_controller_.reset(); 40 zoom_controller_.reset();
41 ChromeRenderViewHostTestHarness::TearDown(); 41 ChromeRenderViewHostTestHarness::TearDown();
(...skipping 21 matching lines...) Expand all
63 63
64 TEST_F(ZoomControllerTest, Observe) { 64 TEST_F(ZoomControllerTest, Observe) {
65 EXPECT_CALL(zoom_observer_, OnZoomChanged(web_contents(), false)).Times(1); 65 EXPECT_CALL(zoom_observer_, OnZoomChanged(web_contents(), false)).Times(1);
66 66
67 content::HostZoomMap* host_zoom_map = 67 content::HostZoomMap* host_zoom_map =
68 content::HostZoomMap::GetForBrowserContext( 68 content::HostZoomMap::GetForBrowserContext(
69 web_contents()->GetBrowserContext()); 69 web_contents()->GetBrowserContext());
70 70
71 host_zoom_map->SetZoomLevelForHost(std::string(), 110.0f); 71 host_zoom_map->SetZoomLevelForHost(std::string(), 110.0f);
72 } 72 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698