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

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

Issue 11568006: events: Update scroll and touch handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 8 years 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/user_activity_detector_unittest.cc ('k') | ash/wm/workspace/workspace_cycler.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 (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 "ui/views/corewm/window_modality_controller.h" 5 #include "ui/views/corewm/window_modality_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 virtual ~TouchTrackerWindowDelegate() {} 291 virtual ~TouchTrackerWindowDelegate() {}
292 292
293 void reset() { 293 void reset() {
294 received_touch_ = false; 294 received_touch_ = false;
295 } 295 }
296 296
297 bool received_touch() const { return received_touch_; } 297 bool received_touch() const { return received_touch_; }
298 298
299 private: 299 private:
300 // Overridden from aura::test::TestWindowDelegate. 300 // Overridden from aura::test::TestWindowDelegate.
301 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE { 301 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
302 received_touch_ = true; 302 received_touch_ = true;
303 return aura::test::TestWindowDelegate::OnTouchEvent(event); 303 aura::test::TestWindowDelegate::OnTouchEvent(event);
304 } 304 }
305 305
306 bool received_touch_; 306 bool received_touch_;
307 307
308 DISALLOW_COPY_AND_ASSIGN(TouchTrackerWindowDelegate); 308 DISALLOW_COPY_AND_ASSIGN(TouchTrackerWindowDelegate);
309 }; 309 };
310 310
311 // Modality should prevent events from being passed to the transient parent. 311 // Modality should prevent events from being passed to the transient parent.
312 TEST_F(WindowModalityControllerTest, TouchEvent) { 312 TEST_F(WindowModalityControllerTest, TouchEvent) {
313 TouchTrackerWindowDelegate d1; 313 TouchTrackerWindowDelegate d1;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 wm::ActivateWindow(w3.get()); 547 wm::ActivateWindow(w3.get());
548 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 548 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
549 549
550 wm::ActivateWindow(w4.get()); 550 wm::ActivateWindow(w4.get());
551 EXPECT_TRUE(wm::IsActiveWindow(w4.get())); 551 EXPECT_TRUE(wm::IsActiveWindow(w4.get()));
552 } 552 }
553 553
554 } // namespace internal 554 } // namespace internal
555 } // namespace ash 555 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/user_activity_detector_unittest.cc ('k') | ash/wm/workspace/workspace_cycler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698