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

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

Issue 1636703002: Implement MD specs for non-tabbed windows in Ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test changed, ready for review Created 4 years, 10 months 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
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 <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 3218 matching lines...) Expand 10 before | Expand all | Expand 10 after
3229 CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents); 3229 CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents);
3230 } 3230 }
3231 3231
3232 // Test to ensure the bounds of popup, devtool, and app windows are properly 3232 // Test to ensure the bounds of popup, devtool, and app windows are properly
3233 // restored. 3233 // restored.
3234 IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) { 3234 IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) {
3235 { 3235 {
3236 // Minimum size that a popup window should have appended to its height when 3236 // Minimum size that a popup window should have appended to its height when
3237 // drawn (popup window bounds are for the content, not the window). This is 3237 // drawn (popup window bounds are for the content, not the window). This is
3238 // the size of the toolbar on views platforms. 3238 // the size of the toolbar on views platforms.
3239 #if defined(OS_CHROMEOS)
3240 const int minimum_popup_padding = 27;
3241 #else
3239 const int minimum_popup_padding = 29; 3242 const int minimum_popup_padding = 29;
3243 #endif // defined(OS_CHROMEOS)
3240 3244
3241 // Creates an untrusted popup window and asserts that the eventual height is 3245 // Creates an untrusted popup window and asserts that the eventual height is
3242 // padded with the toolbar and title bar height (initial height is content 3246 // padded with the toolbar and title bar height (initial height is content
3243 // height). 3247 // height).
3244 Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile(), 3248 Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile(),
3245 chrome::HOST_DESKTOP_TYPE_NATIVE); 3249 chrome::HOST_DESKTOP_TYPE_NATIVE);
3246 params.initial_bounds = gfx::Rect(0, 0, 100, 122); 3250 params.initial_bounds = gfx::Rect(0, 0, 100, 122);
3247 Browser* browser = new Browser(params); 3251 Browser* browser = new Browser(params);
3248 gfx::Rect bounds = browser->window()->GetBounds(); 3252 gfx::Rect bounds = browser->window()->GetBounds();
3249 3253
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 Browser* browser = new Browser(params); 3318 Browser* browser = new Browser(params);
3315 gfx::Rect bounds = browser->window()->GetBounds(); 3319 gfx::Rect bounds = browser->window()->GetBounds();
3316 3320
3317 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 3321 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
3318 // See https://crbug.com/567925. 3322 // See https://crbug.com/567925.
3319 EXPECT_GE(bounds.width(), 100); 3323 EXPECT_GE(bounds.width(), 100);
3320 EXPECT_EQ(122, bounds.height()); 3324 EXPECT_EQ(122, bounds.height());
3321 browser->window()->Close(); 3325 browser->window()->Close();
3322 } 3326 }
3323 } 3327 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698