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

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

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/screen_dimmer_unittest.cc ('k') | ash/wm/toplevel_window_event_handler.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/system_gesture_event_filter.h" 5 #include "ash/wm/system_gesture_event_filter.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Capture first window. 185 // Capture first window.
186 window1->SetCapture(); 186 window1->SetCapture();
187 EXPECT_TRUE(window1->HasCapture()); 187 EXPECT_TRUE(window1->HasCapture());
188 188
189 // Send touch event to first window. 189 // Send touch event to first window.
190 ui::TouchEvent press(ui::ET_TOUCH_PRESSED, 190 ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
191 gfx::Point(10, 10), 191 gfx::Point(10, 10),
192 kTouchId, 192 kTouchId,
193 ui::EventTimeForNow()); 193 ui::EventTimeForNow());
194 ui::EventDispatchDetails details = 194 ui::EventDispatchDetails details =
195 root_window->GetDispatcher()->OnEventFromSource(&press); 195 root_window->GetHost()->dispatcher()->OnEventFromSource(&press);
196 ASSERT_FALSE(details.dispatcher_destroyed); 196 ASSERT_FALSE(details.dispatcher_destroyed);
197 EXPECT_TRUE(window1->HasCapture()); 197 EXPECT_TRUE(window1->HasCapture());
198 198
199 base::OneShotTimer<internal::LongPressAffordanceHandler>* timer = 199 base::OneShotTimer<internal::LongPressAffordanceHandler>* timer =
200 GetLongPressAffordanceTimer(); 200 GetLongPressAffordanceTimer();
201 EXPECT_TRUE(timer->IsRunning()); 201 EXPECT_TRUE(timer->IsRunning());
202 EXPECT_EQ(window1, GetLongPressAffordanceTarget()); 202 EXPECT_EQ(window1, GetLongPressAffordanceTarget());
203 203
204 // Force timeout so that the affordance animation can start. 204 // Force timeout so that the affordance animation can start.
205 timer->user_task().Run(); 205 timer->user_task().Run();
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler); 652 aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler);
653 } 653 }
654 654
655 // Tests run twice - with docked windows disabled or enabled. 655 // Tests run twice - with docked windows disabled or enabled.
656 INSTANTIATE_TEST_CASE_P(DockedWindowsDisabledOrEnabled, 656 INSTANTIATE_TEST_CASE_P(DockedWindowsDisabledOrEnabled,
657 SystemGestureEventFilterTest, 657 SystemGestureEventFilterTest,
658 testing::Bool()); 658 testing::Bool());
659 659
660 } // namespace test 660 } // namespace test
661 } // namespace ash 661 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/screen_dimmer_unittest.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698