| OLD | NEW |
| 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 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1784 #define MAYBE_PageZoom DISABLED_PageZoom | 1784 #define MAYBE_PageZoom DISABLED_PageZoom |
| 1785 #else | 1785 #else |
| 1786 #define MAYBE_PageZoom PageZoom | 1786 #define MAYBE_PageZoom PageZoom |
| 1787 #endif | 1787 #endif |
| 1788 | 1788 |
| 1789 namespace { | 1789 namespace { |
| 1790 | 1790 |
| 1791 int GetZoomPercent(const content::WebContents* contents, | 1791 int GetZoomPercent(const content::WebContents* contents, |
| 1792 bool* enable_plus, | 1792 bool* enable_plus, |
| 1793 bool* enable_minus) { | 1793 bool* enable_minus) { |
| 1794 int percent = ZoomController::FromWebContents(contents)->GetZoomPercent(); | 1794 int percent = |
| 1795 extensions::ZoomController::FromWebContents(contents)->GetZoomPercent(); |
| 1795 *enable_plus = percent < contents->GetMaximumZoomPercent(); | 1796 *enable_plus = percent < contents->GetMaximumZoomPercent(); |
| 1796 *enable_minus = percent > contents->GetMinimumZoomPercent(); | 1797 *enable_minus = percent > contents->GetMinimumZoomPercent(); |
| 1797 return percent; | 1798 return percent; |
| 1798 } | 1799 } |
| 1799 | 1800 |
| 1800 } // namespace | 1801 } // namespace |
| 1801 | 1802 |
| 1802 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) { | 1803 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageZoom) { |
| 1803 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); | 1804 WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); |
| 1804 bool enable_plus, enable_minus; | 1805 bool enable_plus, enable_minus; |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2654 #endif | 2655 #endif |
| 2655 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2656 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
| 2656 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2657 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
| 2657 gfx::Size exp_final_size(initial_wcv_size); | 2658 gfx::Size exp_final_size(initial_wcv_size); |
| 2658 exp_final_size.Enlarge(wcv_resize_insets.width(), | 2659 exp_final_size.Enlarge(wcv_resize_insets.width(), |
| 2659 wcv_resize_insets.height() + height_inset); | 2660 wcv_resize_insets.height() + height_inset); |
| 2660 EXPECT_EQ(exp_final_size, | 2661 EXPECT_EQ(exp_final_size, |
| 2661 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2662 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
| 2662 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); | 2663 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); |
| 2663 } | 2664 } |
| OLD | NEW |