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

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

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete defines in build files. Created 6 years 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 #define MAYBE_PageZoom DISABLED_PageZoom 1864 #define MAYBE_PageZoom DISABLED_PageZoom
1865 #else 1865 #else
1866 #define MAYBE_PageZoom PageZoom 1866 #define MAYBE_PageZoom PageZoom
1867 #endif 1867 #endif
1868 1868
1869 namespace { 1869 namespace {
1870 1870
1871 int GetZoomPercent(const content::WebContents* contents, 1871 int GetZoomPercent(const content::WebContents* contents,
1872 bool* enable_plus, 1872 bool* enable_plus,
1873 bool* enable_minus) { 1873 bool* enable_minus) {
1874 int percent = ZoomController::FromWebContents(contents)->GetZoomPercent(); 1874 int percent =
1875 ui_zoom::ZoomController::FromWebContents(contents)->GetZoomPercent();
1875 *enable_plus = percent < contents->GetMaximumZoomPercent(); 1876 *enable_plus = percent < contents->GetMaximumZoomPercent();
1876 *enable_minus = percent > contents->GetMinimumZoomPercent(); 1877 *enable_minus = percent > contents->GetMinimumZoomPercent();
1877 return percent; 1878 return percent;
1878 } 1879 }
1879 1880
1880 } // namespace 1881 } // namespace
1881 1882
1882 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) { 1883 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) {
1883 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); 1884 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
1884 bool enable_plus, enable_minus; 1885 bool enable_plus, enable_minus;
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 #endif 2735 #endif
2735 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2736 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2736 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2737 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2737 gfx::Size exp_final_size(initial_wcv_size); 2738 gfx::Size exp_final_size(initial_wcv_size);
2738 exp_final_size.Enlarge(wcv_resize_insets.width(), 2739 exp_final_size.Enlarge(wcv_resize_insets.width(),
2739 wcv_resize_insets.height() + height_inset); 2740 wcv_resize_insets.height() + height_inset);
2740 EXPECT_EQ(exp_final_size, 2741 EXPECT_EQ(exp_final_size,
2741 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2742 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2742 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); 2743 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
2743 } 2744 }
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