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

Unified Diff: ash/wm/window_state_unittest.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/window_properties.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state_unittest.cc
diff --git a/ash/wm/window_state_unittest.cc b/ash/wm/window_state_unittest.cc
index 52e6c999a466ec2065ea7e5d3c8c9b5f30da4fcb..155413b428464fad8c532c36c0ff2c535dede9f9 100644
--- a/ash/wm/window_state_unittest.cc
+++ b/ash/wm/window_state_unittest.cc
@@ -76,11 +76,10 @@ TEST_P(WindowStateTest, SnapWindowBasic) {
WindowState* window_state = GetWindowState(window.get());
const WMEvent snap_left(WM_EVENT_SNAP_LEFT);
window_state->OnWMEvent(&snap_left);
- gfx::Rect expected = gfx::Rect(
- kPrimaryDisplayWorkAreaBounds.x(),
- kPrimaryDisplayWorkAreaBounds.y(),
- kPrimaryDisplayWorkAreaBounds.width() / 2,
- kPrimaryDisplayWorkAreaBounds.height());
+ gfx::Rect expected = gfx::Rect(kPrimaryDisplayWorkAreaBounds.x(),
+ kPrimaryDisplayWorkAreaBounds.y(),
+ kPrimaryDisplayWorkAreaBounds.width() / 2,
+ kPrimaryDisplayWorkAreaBounds.height());
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
const WMEvent snap_right(WM_EVENT_SNAP_RIGHT);
@@ -93,12 +92,11 @@ TEST_P(WindowStateTest, SnapWindowBasic) {
ScreenUtil::GetSecondaryDisplay());
window_state->OnWMEvent(&snap_right);
- expected = gfx::Rect(
- kSecondaryDisplayWorkAreaBounds.x() +
- kSecondaryDisplayWorkAreaBounds.width() / 2,
- kSecondaryDisplayWorkAreaBounds.y(),
- kSecondaryDisplayWorkAreaBounds.width() / 2,
- kSecondaryDisplayWorkAreaBounds.height());
+ expected = gfx::Rect(kSecondaryDisplayWorkAreaBounds.x() +
+ kSecondaryDisplayWorkAreaBounds.width() / 2,
+ kSecondaryDisplayWorkAreaBounds.y(),
+ kSecondaryDisplayWorkAreaBounds.width() / 2,
+ kSecondaryDisplayWorkAreaBounds.height());
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
window_state->OnWMEvent(&snap_left);
@@ -126,10 +124,9 @@ TEST_P(WindowStateTest, SnapWindowMinimumSize) {
EXPECT_TRUE(window_state->CanSnap());
const WMEvent snap_right(WM_EVENT_SNAP_RIGHT);
window_state->OnWMEvent(&snap_right);
- gfx::Rect expected = gfx::Rect(kWorkAreaBounds.x() + 1,
- kWorkAreaBounds.y(),
- kWorkAreaBounds.width() - 1,
- kWorkAreaBounds.height());
+ gfx::Rect expected =
+ gfx::Rect(kWorkAreaBounds.x() + 1, kWorkAreaBounds.y(),
+ kWorkAreaBounds.width() - 1, kWorkAreaBounds.height());
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
// It should not be possible to snap a window with a maximum size, or if it
@@ -219,10 +216,9 @@ TEST_P(WindowStateTest, SnapWindowSetBounds) {
const WMEvent snap_left(WM_EVENT_SNAP_LEFT);
window_state->OnWMEvent(&snap_left);
EXPECT_EQ(WINDOW_STATE_TYPE_LEFT_SNAPPED, window_state->GetStateType());
- gfx::Rect expected = gfx::Rect(kWorkAreaBounds.x(),
- kWorkAreaBounds.y(),
- kWorkAreaBounds.width() / 2,
- kWorkAreaBounds.height());
+ gfx::Rect expected =
+ gfx::Rect(kWorkAreaBounds.x(), kWorkAreaBounds.y(),
+ kWorkAreaBounds.width() / 2, kWorkAreaBounds.height());
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
// Snapped windows can have any width.
@@ -289,10 +285,8 @@ TEST_P(WindowStateTest, AutoManaged) {
const gfx::Rect kWorkAreaBounds =
display::Screen::GetScreen()->GetPrimaryDisplay().work_area();
gfx::Rect expected_snapped_bounds(
- kWorkAreaBounds.x() + kWorkAreaBounds.width() / 2,
- kWorkAreaBounds.y(),
- kWorkAreaBounds.width() / 2,
- kWorkAreaBounds.height());
+ kWorkAreaBounds.x() + kWorkAreaBounds.width() / 2, kWorkAreaBounds.y(),
+ kWorkAreaBounds.width() / 2, kWorkAreaBounds.height());
EXPECT_EQ(expected_snapped_bounds.ToString(),
window->GetBoundsInScreen().ToString());
« no previous file with comments | « ash/wm/window_properties.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698