OLD | NEW |
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 <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 void ExpectZoomedOut(content::WebContents* contents) { | 41 void ExpectZoomedOut(content::WebContents* contents) { |
42 EXPECT_LT(GetZoomPercent(contents), 100); | 42 EXPECT_LT(GetZoomPercent(contents), 100); |
43 } | 43 } |
44 | 44 |
45 void ExpectAtDefaultZoom(content::WebContents* contents) { | 45 void ExpectAtDefaultZoom(content::WebContents* contents) { |
46 EXPECT_EQ(GetZoomPercent(contents), 100); | 46 EXPECT_EQ(GetZoomPercent(contents), 100); |
47 } | 47 } |
48 | 48 |
49 void OnZoomLevelChanged(const base::Closure& callback, | 49 void OnZoomLevelChanged(const base::Closure& callback, |
50 const std::string& host) { | 50 const content::HostZoomMap::ZoomLevelChange& host) { |
51 callback.Run(); | 51 callback.Run(); |
52 } | 52 } |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 class LocationBarViewGtkZoomTest : public InProcessBrowserTest { | 56 class LocationBarViewGtkZoomTest : public InProcessBrowserTest { |
57 public: | 57 public: |
58 LocationBarViewGtkZoomTest() {} | 58 LocationBarViewGtkZoomTest() {} |
59 virtual ~LocationBarViewGtkZoomTest() {} | 59 virtual ~LocationBarViewGtkZoomTest() {} |
60 | 60 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 DCHECK_LT(GetZoomPercent(contents), zoom_level); | 178 DCHECK_LT(GetZoomPercent(contents), zoom_level); |
179 ExpectZoomedOut(contents); | 179 ExpectZoomedOut(contents); |
180 EXPECT_TRUE(ZoomIconIsShowing()); | 180 EXPECT_TRUE(ZoomIconIsShowing()); |
181 ExpectIconIsResource(IDR_ZOOM_MINUS); | 181 ExpectIconIsResource(IDR_ZOOM_MINUS); |
182 ExpectTooltipContainsZoom(); | 182 ExpectTooltipContainsZoom(); |
183 | 183 |
184 ResetZoom(); | 184 ResetZoom(); |
185 ExpectAtDefaultZoom(contents); | 185 ExpectAtDefaultZoom(contents); |
186 EXPECT_FALSE(ZoomIconIsShowing()); | 186 EXPECT_FALSE(ZoomIconIsShowing()); |
187 } | 187 } |
OLD | NEW |