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

Unified Diff: ash/extended_desktop_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/drag_drop/drag_image_view.cc ('k') | ash/first_run/desktop_cleaner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/extended_desktop_unittest.cc
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 90cb81e91ea363c86f8b76681e9e04edde206e48..595c60bf43fe2c8b33694e3466cce011bbd58ab8 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -81,14 +81,11 @@ class MoveWindowByClickEventHandler : public ui::EventHandler {
// An event handler which records the event's locations.
class EventLocationRecordingEventHandler : public ui::EventHandler {
public:
- explicit EventLocationRecordingEventHandler() {
- reset();
- }
+ explicit EventLocationRecordingEventHandler() { reset(); }
~EventLocationRecordingEventHandler() override {}
std::string GetLocationsAndReset() {
- std::string result =
- location_.ToString() + " " + root_location_.ToString();
+ std::string result = location_.ToString() + " " + root_location_.ToString();
reset();
return result;
}
@@ -242,8 +239,7 @@ TEST_F(ExtendedDesktopTest, SystemModal) {
// Open system modal. Make sure it's on 2nd root window and active.
views::Widget* modal_widget = views::Widget::CreateWindowWithContextAndBounds(
- new ModalWidgetDelegate(),
- CurrentContext(),
+ new ModalWidgetDelegate(), CurrentContext(),
gfx::Rect(1200, 100, 100, 100));
modal_widget->Show();
EXPECT_TRUE(wm::IsActiveWindow(modal_widget->GetNativeView()));
@@ -575,14 +571,12 @@ TEST_F(ExtendedDesktopTest, MoveWindow) {
EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
d1->SetBounds(gfx::Rect(1010, 10, 100, 100));
- EXPECT_EQ("1010,10 100x100",
- d1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1010,10 100x100", d1->GetWindowBoundsInScreen().ToString());
EXPECT_EQ(root_windows[1], d1->GetNativeView()->GetRootWindow());
d1->SetBounds(gfx::Rect(10, 10, 100, 100));
- EXPECT_EQ("10,10 100x100",
- d1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("10,10 100x100", d1->GetWindowBoundsInScreen().ToString());
EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
@@ -590,8 +584,7 @@ TEST_F(ExtendedDesktopTest, MoveWindow) {
// works correctly.
d1->SetBounds(gfx::Rect(1560, 30, 100, 100));
EXPECT_EQ(root_windows[1], d1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("1560,30 100x100",
- d1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1560,30 100x100", d1->GetWindowBoundsInScreen().ToString());
// Setting outside of root windows will be moved to primary root window.
// TODO(oshima): This one probably should pick the closest root window.
@@ -644,15 +637,13 @@ TEST_F(ExtendedDesktopTest, MoveWindowToDisplay) {
// parameter is |display1|, the window should be shown on the secondary root.
d1->GetNativeWindow()->SetBoundsInScreen(gfx::Rect(500, 10, 1000, 100),
display1);
- EXPECT_EQ("500,10 1000x100",
- d1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("500,10 1000x100", d1->GetWindowBoundsInScreen().ToString());
EXPECT_EQ(root_windows[1], d1->GetNativeView()->GetRootWindow());
// Move to the primary root.
d1->GetNativeWindow()->SetBoundsInScreen(gfx::Rect(500, 10, 1000, 100),
display0);
- EXPECT_EQ("500,10 1000x100",
- d1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("500,10 1000x100", d1->GetWindowBoundsInScreen().ToString());
EXPECT_EQ(root_windows[0], d1->GetNativeView()->GetRootWindow());
}
@@ -669,8 +660,8 @@ TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) {
views::Widget* w1_t11 = CreateTestWidgetWithParent(
w1_t1, gfx::Rect(1200, 70, 35, 35), false /* transient */);
- views::Widget* w11 = CreateTestWidgetWithParent(
- w1, gfx::Rect(10, 10, 40, 40), true /* child */);
+ views::Widget* w11 = CreateTestWidgetWithParent(w1, gfx::Rect(10, 10, 40, 40),
+ true /* child */);
views::Widget* w11_t1 = CreateTestWidgetWithParent(
w1, gfx::Rect(1300, 100, 80, 80), false /* transient */);
@@ -679,14 +670,10 @@ TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) {
EXPECT_EQ(root_windows[0], w1_t1->GetNativeView()->GetRootWindow());
EXPECT_EQ(root_windows[0], w1_t11->GetNativeView()->GetRootWindow());
EXPECT_EQ(root_windows[0], w11_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("50,50 50x50",
- w1_t1->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1200,70 35x35",
- w1_t11->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("20,20 40x40",
- w11->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1300,100 80x80",
- w11_t1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("50,50 50x50", w1_t1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1200,70 35x35", w1_t11->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("20,20 40x40", w11->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1300,100 80x80", w11_t1->GetWindowBoundsInScreen().ToString());
w1->SetBounds(gfx::Rect(1100, 10, 100, 100));
@@ -696,22 +683,17 @@ TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) {
EXPECT_EQ(root_windows[1], w11->GetNativeView()->GetRootWindow());
EXPECT_EQ(root_windows[1], w11_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("1110,20 40x40",
- w11->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1110,20 40x40", w11->GetWindowBoundsInScreen().ToString());
// Transient window's screen bounds stays the same.
- EXPECT_EQ("50,50 50x50",
- w1_t1->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1200,70 35x35",
- w1_t11->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("1300,100 80x80",
- w11_t1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("50,50 50x50", w1_t1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1200,70 35x35", w1_t11->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("1300,100 80x80", w11_t1->GetWindowBoundsInScreen().ToString());
// Transient window doesn't move between root window unless
// its transient parent moves.
w1_t1->SetBounds(gfx::Rect(10, 50, 50, 50));
EXPECT_EQ(root_windows[1], w1_t1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("10,50 50x50",
- w1_t1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ("10,50 50x50", w1_t1->GetWindowBoundsInScreen().ToString());
}
// Test if the Window::ConvertPointToTarget works across root windows.
@@ -834,8 +816,8 @@ TEST_F(ExtendedDesktopTest, StayInSameRootWindow) {
aura::Window* settings_bubble_container =
Shell::GetPrimaryRootWindowController()->GetContainer(
kShellWindowId_SettingBubbleContainer);
- aura::Window* window = aura::test::CreateTestWindowWithId(
- 100, settings_bubble_container);
+ aura::Window* window =
+ aura::test::CreateTestWindowWithId(100, settings_bubble_container);
window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50),
ScreenUtil::GetSecondaryDisplay());
EXPECT_EQ(root_windows[0], window->GetRootWindow());
@@ -861,8 +843,8 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
display::Screen::GetScreen()->GetPrimaryDisplay().bounds());
widget1->Show();
EXPECT_EQ(root_windows[0], widget1->GetNativeView()->GetRootWindow());
- views::Widget* widget2 = CreateTestWidget(
- ScreenUtil::GetSecondaryDisplay().bounds());
+ views::Widget* widget2 =
+ CreateTestWidget(ScreenUtil::GetSecondaryDisplay().bounds());
widget2->Show();
EXPECT_EQ(root_windows[1], widget2->GetNativeView()->GetRootWindow());
« no previous file with comments | « ash/drag_drop/drag_image_view.cc ('k') | ash/first_run/desktop_cleaner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698