Commit 02146d22 authored by Mike Wasserman's avatar Mike Wasserman Committed by Commit Bot

Window Placement: Reduce test popup sizes for small screens

Fixes test failures with small screen sizes (e.g. 640x480).
Hopefully a viable and simpler alternative to crrev.com/c/2454549

Bug: None
Test: On linux-chromeos: browser_tests --gtest_filter=All/PopupBrowserTest.* --ash-host-window-bounds=640x480
Change-Id: I5b7108ef295625624dbf69eaf782a3656fdebebf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454425
Auto-Submit: Michael Wasserman <msw@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814830}
parent 4acfc82e
...@@ -153,7 +153,7 @@ IN_PROC_BROWSER_TEST_P(PopupBrowserTest, MoveClampedToCurrentDisplay) { ...@@ -153,7 +153,7 @@ IN_PROC_BROWSER_TEST_P(PopupBrowserTest, MoveClampedToCurrentDisplay) {
const char kOpenPopup[] = const char kOpenPopup[] =
"open('.', '', 'left=' + (screen.availLeft + 50) + " "open('.', '', 'left=' + (screen.availLeft + 50) + "
"',top=' + (screen.availTop + 50) + " "',top=' + (screen.availTop + 50) + "
"',width=300,height=300');"; "',width=150,height=100');";
const char* const kMoveScripts[] = { const char* const kMoveScripts[] = {
"moveBy(screen.availWidth * 2, 0);", "moveBy(screen.availWidth * 2, 0);",
"moveBy(screen.availWidth * -2, 0);", "moveBy(screen.availWidth * -2, 0);",
...@@ -194,7 +194,7 @@ IN_PROC_BROWSER_TEST_P(PopupBrowserTest, ResizeClampedToCurrentDisplay) { ...@@ -194,7 +194,7 @@ IN_PROC_BROWSER_TEST_P(PopupBrowserTest, ResizeClampedToCurrentDisplay) {
const char kOpenPopup[] = const char kOpenPopup[] =
"open('.', '', 'left=' + (screen.availLeft + 50) + " "open('.', '', 'left=' + (screen.availLeft + 50) + "
"',top=' + (screen.availTop + 50) + " "',top=' + (screen.availTop + 50) + "
"',width=300,height=300');"; "',width=150,height=100');";
// The popup cannot be resized beyond the current screen by script. // The popup cannot be resized beyond the current screen by script.
const char* const kResizeScripts[] = { const char* const kResizeScripts[] = {
"resizeBy(screen.availWidth * 2, 0);", "resizeBy(screen.availWidth * 2, 0);",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment