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

Side by Side Diff: ash/wm/panels/panel_window_resizer_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/panels/panel_window_resizer.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/panels/panel_window_resizer.h" 5 #include "ash/wm/panels/panel_window_resizer.h"
6 6
7 #include "ash/public/cpp/config.h" 7 #include "ash/public/cpp/config.h"
8 #include "ash/public/cpp/shelf_types.h" 8 #include "ash/public/cpp/shelf_types.h"
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/public/cpp/window_properties.h" 10 #include "ash/public/cpp/window_properties.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 64 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
65 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); 65 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, bounds);
66 static int id = 0; 66 static int id = 0;
67 std::string shelf_id(ash::ShelfID(base::IntToString(id++)).Serialize()); 67 std::string shelf_id(ash::ShelfID(base::IntToString(id++)).Serialize());
68 window->SetProperty(kShelfIDKey, new std::string(shelf_id)); 68 window->SetProperty(kShelfIDKey, new std::string(shelf_id));
69 shelf_view_test_->RunMessageLoopUntilAnimationsDone(); 69 shelf_view_test_->RunMessageLoopUntilAnimationsDone();
70 return window; 70 return window;
71 } 71 }
72 72
73 void DragStart(aura::Window* window) { 73 void DragStart(aura::Window* window) {
74 resizer_ = 74 resizer_ = CreateWindowResizer(window, window->bounds().origin(), HTCAPTION,
75 CreateWindowResizer(WmWindow::Get(window), window->bounds().origin(), 75 aura::client::WINDOW_MOVE_SOURCE_MOUSE);
76 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE);
77 } 76 }
78 77
79 void DragMove(int dx, int dy) { 78 void DragMove(int dx, int dy) {
80 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0); 79 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0);
81 } 80 }
82 81
83 void DragEnd() { 82 void DragEnd() {
84 resizer_->CompleteDrag(); 83 resizer_->CompleteDrag();
85 resizer_.reset(); 84 resizer_.reset();
86 } 85 }
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 558
560 INSTANTIATE_TEST_CASE_P(LtrRtl, 559 INSTANTIATE_TEST_CASE_P(LtrRtl,
561 PanelWindowResizerTextDirectionTest, 560 PanelWindowResizerTextDirectionTest,
562 testing::Bool()); 561 testing::Bool());
563 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, 562 INSTANTIATE_TEST_CASE_P(NormalPanelPopup,
564 PanelWindowResizerTransientTest, 563 PanelWindowResizerTransientTest,
565 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 564 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
566 ui::wm::WINDOW_TYPE_POPUP)); 565 ui::wm::WINDOW_TYPE_POPUP));
567 566
568 } // namespace ash 567 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698