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 "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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 int closing_count_; | 197 int closing_count_; |
198 | 198 |
199 DISALLOW_COPY_AND_ASSIGN(MockTabStripModelObserver); | 199 DISALLOW_COPY_AND_ASSIGN(MockTabStripModelObserver); |
200 }; | 200 }; |
201 | 201 |
202 // Causes the browser to swap processes on a redirect to an HTTPS URL. | 202 // Causes the browser to swap processes on a redirect to an HTTPS URL. |
203 class TransferHttpsRedirectsContentBrowserClient | 203 class TransferHttpsRedirectsContentBrowserClient |
204 : public ChromeContentBrowserClient { | 204 : public ChromeContentBrowserClient { |
205 public: | 205 public: |
206 bool ShouldSwapProcessesForRedirect( | 206 bool ShouldSwapProcessesForRedirect( |
207 content::ResourceContext* resource_context, | 207 content::BrowserContext* browser_context, |
208 const GURL& current_url, | 208 const GURL& current_url, |
209 const GURL& new_url) override { | 209 const GURL& new_url) override { |
210 return new_url.SchemeIs(url::kHttpsScheme); | 210 return new_url.SchemeIs(url::kHttpsScheme); |
211 } | 211 } |
212 }; | 212 }; |
213 | 213 |
214 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. | 214 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. |
215 void CloseWindowCallback(Browser* browser) { | 215 void CloseWindowCallback(Browser* browser) { |
216 chrome::CloseWindow(browser); | 216 chrome::CloseWindow(browser); |
217 } | 217 } |
(...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2848 Browser* browser = new Browser(params); | 2848 Browser* browser = new Browser(params); |
2849 gfx::Rect bounds = browser->window()->GetBounds(); | 2849 gfx::Rect bounds = browser->window()->GetBounds(); |
2850 | 2850 |
2851 // Should be EXPECT_EQ, but this width is inconsistent across platforms. | 2851 // Should be EXPECT_EQ, but this width is inconsistent across platforms. |
2852 // See https://crbug.com/567925. | 2852 // See https://crbug.com/567925. |
2853 EXPECT_GE(bounds.width(), 100); | 2853 EXPECT_GE(bounds.width(), 100); |
2854 EXPECT_EQ(122, bounds.height()); | 2854 EXPECT_EQ(122, bounds.height()); |
2855 browser->window()->Close(); | 2855 browser->window()->Close(); |
2856 } | 2856 } |
2857 } | 2857 } |
OLD | NEW |