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

Side by Side Diff: chrome/browser/window_sizer_unittest.cc

Issue 141039: For consistency, stop using the workarea coordinate in... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/browser/window_sizer.cc ('k') | views/window/window_win.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <vector> 5 #include <vector>
6 6
7 #include "chrome/browser/window_sizer.h" 7 #include "chrome/browser/window_sizer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 EXPECT_EQ(gfx::Rect(20, 20, 500, 400), window_bounds); 261 EXPECT_EQ(gfx::Rect(20, 20, 500, 400), window_bounds);
262 } 262 }
263 263
264 { // taskbar on left. 264 { // taskbar on left.
265 gfx::Rect window_bounds; 265 gfx::Rect window_bounds;
266 bool maximized = false; 266 bool maximized = false;
267 GetWindowBounds(tentwentyfour, taskbar_left_work_area, gfx::Rect(), 267 GetWindowBounds(tentwentyfour, taskbar_left_work_area, gfx::Rect(),
268 gfx::Rect(10, 10, 500, 400), false, LAST_ACTIVE, 268 gfx::Rect(10, 10, 500, 400), false, LAST_ACTIVE,
269 &window_bounds, &maximized); 269 &window_bounds, &maximized);
270 EXPECT_FALSE(maximized); 270 EXPECT_FALSE(maximized);
271 EXPECT_EQ(gfx::Rect(127, 20, 500, 400), window_bounds); 271 EXPECT_EQ(gfx::Rect(20, 20, 500, 400), window_bounds);
272 } 272 }
273 273
274 { // taskbar on top. 274 { // taskbar on top.
275 gfx::Rect window_bounds; 275 gfx::Rect window_bounds;
276 bool maximized = false; 276 bool maximized = false;
277 GetWindowBounds(tentwentyfour, taskbar_top_work_area, gfx::Rect(), 277 GetWindowBounds(tentwentyfour, taskbar_top_work_area, gfx::Rect(),
278 gfx::Rect(10, 10, 500, 400), false, LAST_ACTIVE, 278 gfx::Rect(10, 10, 500, 400), false, LAST_ACTIVE,
279 &window_bounds, &maximized); 279 &window_bounds, &maximized);
280 EXPECT_FALSE(maximized); 280 EXPECT_FALSE(maximized);
281 EXPECT_EQ(gfx::Rect(20, 54, 500, 400), window_bounds); 281 EXPECT_EQ(gfx::Rect(20, 20, 500, 400), window_bounds);
282 } 282 }
283 283
284 { // too small to satisify the minimum visibility condition. 284 { // too small to satisify the minimum visibility condition.
285 gfx::Rect window_bounds; 285 gfx::Rect window_bounds;
286 bool maximized = false; 286 bool maximized = false;
287 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), 287 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(),
288 gfx::Rect(10, 10, 29, 29), false, LAST_ACTIVE, 288 gfx::Rect(10, 10, 29, 29), false, LAST_ACTIVE,
289 &window_bounds, &maximized); 289 &window_bounds, &maximized);
290 EXPECT_FALSE(maximized); 290 EXPECT_FALSE(maximized);
291 EXPECT_EQ(gfx::Rect(20, 20, 30 /* not 29 */, 30 /* not 29 */), 291 EXPECT_EQ(gfx::Rect(20, 20, 30 /* not 29 */, 30 /* not 29 */),
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 gfx::Rect window_bounds; 596 gfx::Rect window_bounds;
597 bool maximized; 597 bool maximized;
598 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(), 598 GetWindowBounds(tentwentyfour, tentwentyfour, gfx::Rect(),
599 gfx::Rect(10, 10, 29, 29), false, PERSISTED, 599 gfx::Rect(10, 10, 29, 29), false, PERSISTED,
600 &window_bounds, &maximized); 600 &window_bounds, &maximized);
601 EXPECT_FALSE(maximized); 601 EXPECT_FALSE(maximized);
602 EXPECT_EQ(gfx::Rect(10, 10, 30 /* not 29 */, 30 /* not 29 */), 602 EXPECT_EQ(gfx::Rect(10, 10, 30 /* not 29 */, 30 /* not 29 */),
603 window_bounds); 603 window_bounds);
604 } 604 }
605 } 605 }
OLDNEW
« no previous file with comments | « chrome/browser/window_sizer.cc ('k') | views/window/window_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698