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

Side by Side Diff: ui/aura/root_window_unittest.cc

Issue 11314013: Register a separate default ui::EventTarget for Aura (Ash) to ensure that it does not interfere wit… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « ui/aura/root_window.cc ('k') | no next file » | 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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/aura/client/event_client.h" 10 #include "ui/aura/client/event_client.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return root_window_->GetChildById(kNonLockWindowId); 329 return root_window_->GetChildById(kNonLockWindowId);
330 } 330 }
331 331
332 private: 332 private:
333 // Overridden from client::EventClient: 333 // Overridden from client::EventClient:
334 virtual bool CanProcessEventsWithinSubtree( 334 virtual bool CanProcessEventsWithinSubtree(
335 const Window* window) const OVERRIDE { 335 const Window* window) const OVERRIDE {
336 return lock_ ? GetLockWindow()->Contains(window) : true; 336 return lock_ ? GetLockWindow()->Contains(window) : true;
337 } 337 }
338 338
339 virtual ui::EventTarget* GetToplevelEventTarget() OVERRIDE {
340 return NULL;
341 }
342
339 RootWindow* root_window_; 343 RootWindow* root_window_;
340 bool lock_; 344 bool lock_;
341 345
342 DISALLOW_COPY_AND_ASSIGN(TestEventClient); 346 DISALLOW_COPY_AND_ASSIGN(TestEventClient);
343 }; 347 };
344 348
345 } // namespace 349 } // namespace
346 350
347 TEST_F(RootWindowTest, CanProcessEventsWithinSubtree) { 351 TEST_F(RootWindowTest, CanProcessEventsWithinSubtree) {
348 TestEventClient client(root_window()); 352 TestEventClient client(root_window());
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 TEST_F(RootWindowTest, GestureRecognizerResetsTargetWhenParentHides) { 778 TEST_F(RootWindowTest, GestureRecognizerResetsTargetWhenParentHides) {
775 scoped_ptr<Window> w1(CreateWindow(1, root_window(), NULL)); 779 scoped_ptr<Window> w1(CreateWindow(1, root_window(), NULL));
776 DetachesParentOnTapDelegate delegate; 780 DetachesParentOnTapDelegate delegate;
777 scoped_ptr<Window> parent(CreateWindow(22, w1.get(), NULL)); 781 scoped_ptr<Window> parent(CreateWindow(22, w1.get(), NULL));
778 Window* child = CreateWindow(11, parent.get(), &delegate); 782 Window* child = CreateWindow(11, parent.get(), &delegate);
779 test::EventGenerator generator(root_window(), child); 783 test::EventGenerator generator(root_window(), child);
780 generator.GestureTapAt(gfx::Point(40, 40)); 784 generator.GestureTapAt(gfx::Point(40, 40));
781 } 785 }
782 786
783 } // namespace aura 787 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698