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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « chrome/browser/ui/zoom/chrome_zoom_level_prefs.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/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_finder.h" 7 #include "chrome/browser/ui/browser_finder.h"
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "components/prefs/pref_service.h" 10 #include "components/prefs/pref_service.h"
(...skipping 23 matching lines...) Expand all
34 content::RenderViewHostTester::For(rvh())->CreateTestRenderView( 34 content::RenderViewHostTester::For(rvh())->CreateTestRenderView(
35 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false); 35 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false);
36 } 36 }
37 37
38 void TearDown() override { 38 void TearDown() override {
39 zoom_controller_.reset(); 39 zoom_controller_.reset();
40 ChromeRenderViewHostTestHarness::TearDown(); 40 ChromeRenderViewHostTestHarness::TearDown();
41 } 41 }
42 42
43 protected: 43 protected:
44 scoped_ptr<ZoomController> zoom_controller_; 44 std::unique_ptr<ZoomController> zoom_controller_;
45 }; 45 };
46 46
47 TEST_F(ZoomControllerTest, DidNavigateMainFrame) { 47 TEST_F(ZoomControllerTest, DidNavigateMainFrame) {
48 double zoom_level = zoom_controller_->GetZoomLevel(); 48 double zoom_level = zoom_controller_->GetZoomLevel();
49 ZoomController::ZoomChangedEventData zoom_change_data( 49 ZoomController::ZoomChangedEventData zoom_change_data(
50 web_contents(), 50 web_contents(),
51 zoom_level, 51 zoom_level,
52 zoom_level, 52 zoom_level,
53 ZoomController::ZOOM_MODE_DEFAULT, 53 ZoomController::ZOOM_MODE_DEFAULT,
54 false); 54 false);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ZoomController::ZOOM_MODE_MANUAL, 124 ZoomController::ZOOM_MODE_MANUAL,
125 false /* can_show_bubble */); 125 false /* can_show_bubble */);
126 { 126 {
127 ZoomChangedWatcher zoom_change_watcher2(zoom_controller_.get(), 127 ZoomChangedWatcher zoom_change_watcher2(zoom_controller_.get(),
128 zoom_change_data2); 128 zoom_change_data2);
129 zoom_controller_->SetZoomLevel(new_zoom_level2); 129 zoom_controller_->SetZoomLevel(new_zoom_level2);
130 zoom_change_watcher2.Wait(); 130 zoom_change_watcher2.Wait();
131 } 131 }
132 132
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698