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

Side by Side Diff: ash/wm/workspace_controller_unittest.cc

Issue 2897993003: chromeos: converts WindowResizer to aura::Window (Closed)
Patch Set: remove include from exo Created 3 years, 7 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 | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | ash/wm_window.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/wm/workspace_controller.h" 5 #include "ash/wm/workspace_controller.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 // Auto positioning pushes windows to each sides. 1043 // Auto positioning pushes windows to each sides.
1044 EXPECT_EQ("0,0 100x100", window1->bounds().ToString()); 1044 EXPECT_EQ("0,0 100x100", window1->bounds().ToString());
1045 EXPECT_EQ("300,0 100x100", window2->bounds().ToString()); 1045 EXPECT_EQ("300,0 100x100", window2->bounds().ToString());
1046 1046
1047 window2->Hide(); 1047 window2->Hide();
1048 // Restores to the center. 1048 // Restores to the center.
1049 EXPECT_EQ("150,0 100x100", window1->bounds().ToString()); 1049 EXPECT_EQ("150,0 100x100", window1->bounds().ToString());
1050 1050
1051 // A user moved the window. 1051 // A user moved the window.
1052 std::unique_ptr<WindowResizer> resizer( 1052 std::unique_ptr<WindowResizer> resizer(
1053 CreateWindowResizer(WmWindow::Get(window1.get()), gfx::Point(), HTCAPTION, 1053 CreateWindowResizer(window1.get(), gfx::Point(), HTCAPTION,
1054 aura::client::WINDOW_MOVE_SOURCE_MOUSE) 1054 aura::client::WINDOW_MOVE_SOURCE_MOUSE)
1055 .release()); 1055 .release());
1056 gfx::Point location = resizer->GetInitialLocation(); 1056 gfx::Point location = resizer->GetInitialLocation();
1057 location.Offset(-50, 0); 1057 location.Offset(-50, 0);
1058 resizer->Drag(location, 0); 1058 resizer->Drag(location, 0);
1059 resizer->CompleteDrag(); 1059 resizer->CompleteDrag();
1060 1060
1061 window1_state->set_bounds_changed_by_user(true); 1061 window1_state->set_bounds_changed_by_user(true);
1062 window1->SetBounds(gfx::Rect(100, 0, 100, 100)); 1062 window1->SetBounds(gfx::Rect(100, 0, 100, 100));
1063 1063
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); 1533 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0));
1534 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch); 1534 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch);
1535 if (points[i].is_target_hit) 1535 if (points[i].is_target_hit)
1536 EXPECT_EQ(window.get(), target); 1536 EXPECT_EQ(window.get(), target);
1537 else 1537 else
1538 EXPECT_NE(window.get(), target); 1538 EXPECT_NE(window.get(), target);
1539 } 1539 }
1540 } 1540 }
1541 1541
1542 } // namespace ash 1542 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | ash/wm_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698