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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 2019423005: Move //components/ui/zoom to top-level under //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 #else 1783 #else
1784 #define MAYBE_PageZoom PageZoom 1784 #define MAYBE_PageZoom PageZoom
1785 #endif 1785 #endif
1786 1786
1787 namespace { 1787 namespace {
1788 1788
1789 int GetZoomPercent(const content::WebContents* contents, 1789 int GetZoomPercent(const content::WebContents* contents,
1790 bool* enable_plus, 1790 bool* enable_plus,
1791 bool* enable_minus) { 1791 bool* enable_minus) {
1792 int percent = 1792 int percent =
1793 ui_zoom::ZoomController::FromWebContents(contents)->GetZoomPercent(); 1793 zoom::ZoomController::FromWebContents(contents)->GetZoomPercent();
1794 *enable_plus = percent < contents->GetMaximumZoomPercent(); 1794 *enable_plus = percent < contents->GetMaximumZoomPercent();
1795 *enable_minus = percent > contents->GetMinimumZoomPercent(); 1795 *enable_minus = percent > contents->GetMinimumZoomPercent();
1796 return percent; 1796 return percent;
1797 } 1797 }
1798 1798
1799 } // namespace 1799 } // namespace
1800 1800
1801 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) { 1801 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) {
1802 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); 1802 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
1803 bool enable_plus, enable_minus; 1803 bool enable_plus, enable_minus;
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2844 Browser* browser = new Browser(params); 2844 Browser* browser = new Browser(params);
2845 gfx::Rect bounds = browser->window()->GetBounds(); 2845 gfx::Rect bounds = browser->window()->GetBounds();
2846 2846
2847 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 2847 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
2848 // See https://crbug.com/567925. 2848 // See https://crbug.com/567925.
2849 EXPECT_GE(bounds.width(), 100); 2849 EXPECT_GE(bounds.width(), 100);
2850 EXPECT_EQ(122, bounds.height()); 2850 EXPECT_EQ(122, bounds.height());
2851 browser->window()->Close(); 2851 browser->window()->Close();
2852 } 2852 }
2853 } 2853 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698