Chromium Code Reviews| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3217 CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents); | 3217 CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents); |
| 3218 } | 3218 } |
| 3219 | 3219 |
| 3220 // Test to ensure the bounds of popup, devtool, and app windows are properly | 3220 // Test to ensure the bounds of popup, devtool, and app windows are properly |
| 3221 // restored. | 3221 // restored. |
| 3222 IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) { | 3222 IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) { |
| 3223 { | 3223 { |
| 3224 // Minimum size that a popup window should have appended to its height when | 3224 // Minimum size that a popup window should have appended to its height when |
| 3225 // drawn (popup window bounds are for the content, not the window). This is | 3225 // drawn (popup window bounds are for the content, not the window). This is |
| 3226 // the size of the toolbar on views platforms. | 3226 // the size of the toolbar on views platforms. |
| 3227 #if defined(OS_CHROMEOS) | |
| 3228 const int minimum_popup_padding = 27; | |
| 3229 #else | |
| 3227 const int minimum_popup_padding = 29; | 3230 const int minimum_popup_padding = 29; |
| 3231 #endif // defined(OS_CHROMEOS) | |
|
Peter Kasting
2016/02/10 02:43:58
For now, let's either disable this test, or change
tdanderson
2016/02/10 18:22:30
Done (crbug.com/585856). I have a funny feeling th
| |
| 3228 | 3232 |
| 3229 // Creates an untrusted popup window and asserts that the eventual height is | 3233 // Creates an untrusted popup window and asserts that the eventual height is |
| 3230 // padded with the toolbar and title bar height (initial height is content | 3234 // padded with the toolbar and title bar height (initial height is content |
| 3231 // height). | 3235 // height). |
| 3232 Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile(), | 3236 Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile(), |
| 3233 chrome::HOST_DESKTOP_TYPE_NATIVE); | 3237 chrome::HOST_DESKTOP_TYPE_NATIVE); |
| 3234 params.initial_bounds = gfx::Rect(0, 0, 100, 122); | 3238 params.initial_bounds = gfx::Rect(0, 0, 100, 122); |
| 3235 Browser* browser = new Browser(params); | 3239 Browser* browser = new Browser(params); |
| 3236 gfx::Rect bounds = browser->window()->GetBounds(); | 3240 gfx::Rect bounds = browser->window()->GetBounds(); |
| 3237 | 3241 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3302 Browser* browser = new Browser(params); | 3306 Browser* browser = new Browser(params); |
| 3303 gfx::Rect bounds = browser->window()->GetBounds(); | 3307 gfx::Rect bounds = browser->window()->GetBounds(); |
| 3304 | 3308 |
| 3305 // Should be EXPECT_EQ, but this width is inconsistent across platforms. | 3309 // Should be EXPECT_EQ, but this width is inconsistent across platforms. |
| 3306 // See https://crbug.com/567925. | 3310 // See https://crbug.com/567925. |
| 3307 EXPECT_GE(bounds.width(), 100); | 3311 EXPECT_GE(bounds.width(), 100); |
| 3308 EXPECT_EQ(122, bounds.height()); | 3312 EXPECT_EQ(122, bounds.height()); |
| 3309 browser->window()->Close(); | 3313 browser->window()->Close(); |
| 3310 } | 3314 } |
| 3311 } | 3315 } |
| OLD | NEW |