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

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: for landing 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3195 matching lines...) Expand 10 before | Expand all | Expand 10 after
3206 content::TestNavigationObserver observer(app_contents, 1); 3206 content::TestNavigationObserver observer(app_contents, 1);
3207 ui_test_utils::NavigateToURL(app_browser, GURL(url::kAboutBlankURL)); 3207 ui_test_utils::NavigateToURL(app_browser, GURL(url::kAboutBlankURL));
3208 observer.Wait(); 3208 observer.Wait();
3209 3209
3210 CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents); 3210 CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents);
3211 } 3211 }
3212 3212
3213 // Test to ensure the bounds of popup, devtool, and app windows are properly 3213 // Test to ensure the bounds of popup, devtool, and app windows are properly
3214 // restored. 3214 // restored.
3215 IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) { 3215 IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) {
3216 // TODO(tdanderson|pkasting): Change this to verify that the contents bounds
3217 // set by params.initial_bounds are the same as the contents bounds in the
3218 // initialized window. See crbug.com/585856.
3216 { 3219 {
3217 // Minimum size that a popup window should have appended to its height when 3220 // Minimum height a popup window should have added to the supplied content
3218 // drawn (popup window bounds are for the content, not the window). This is 3221 // bounds when drawn. This accommodates the browser toolbar.
3219 // the size of the toolbar on views platforms. 3222 const int minimum_popup_padding = 27;
3220 const int minimum_popup_padding = 29;
3221 3223
3222 // Creates an untrusted popup window and asserts that the eventual height is 3224 // Creates an untrusted popup window and asserts that the eventual height is
3223 // padded with the toolbar and title bar height (initial height is content 3225 // padded with the toolbar and title bar height (initial height is content
3224 // height). 3226 // height).
3225 Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile()); 3227 Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile());
3226 params.initial_bounds = gfx::Rect(0, 0, 100, 122); 3228 params.initial_bounds = gfx::Rect(0, 0, 100, 122);
3227 Browser* browser = new Browser(params); 3229 Browser* browser = new Browser(params);
3228 gfx::Rect bounds = browser->window()->GetBounds(); 3230 gfx::Rect bounds = browser->window()->GetBounds();
3229 3231
3230 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 3232 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 Browser* browser = new Browser(params); 3293 Browser* browser = new Browser(params);
3292 gfx::Rect bounds = browser->window()->GetBounds(); 3294 gfx::Rect bounds = browser->window()->GetBounds();
3293 3295
3294 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 3296 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
3295 // See https://crbug.com/567925. 3297 // See https://crbug.com/567925.
3296 EXPECT_GE(bounds.width(), 100); 3298 EXPECT_GE(bounds.width(), 100);
3297 EXPECT_EQ(122, bounds.height()); 3299 EXPECT_EQ(122, bounds.height());
3298 browser->window()->Close(); 3300 browser->window()->Close();
3299 } 3301 }
3300 } 3302 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698