| OLD | NEW |
| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 client.GetNonLockWindow()->SetEventFilter(nonlock_ef); | 353 client.GetNonLockWindow()->SetEventFilter(nonlock_ef); |
| 354 client.GetLockWindow()->SetEventFilter(lock_ef); | 354 client.GetLockWindow()->SetEventFilter(lock_ef); |
| 355 | 355 |
| 356 Window* w1 = test::CreateTestWindowWithBounds(gfx::Rect(10, 10, 20, 20), | 356 Window* w1 = test::CreateTestWindowWithBounds(gfx::Rect(10, 10, 20, 20), |
| 357 client.GetNonLockWindow()); | 357 client.GetNonLockWindow()); |
| 358 w1->set_id(1); | 358 w1->set_id(1); |
| 359 Window* w2 = test::CreateTestWindowWithBounds(gfx::Rect(30, 30, 20, 20), | 359 Window* w2 = test::CreateTestWindowWithBounds(gfx::Rect(30, 30, 20, 20), |
| 360 client.GetNonLockWindow()); | 360 client.GetNonLockWindow()); |
| 361 w2->set_id(2); | 361 w2->set_id(2); |
| 362 scoped_ptr<Window> w3( | 362 scoped_ptr<Window> w3( |
| 363 test::CreateTestWindowWithDelegate(&d, 3, gfx::Rect(30, 30, 20, 20), | 363 test::CreateTestWindowWithDelegate(&d, 3, gfx::Rect(20, 20, 20, 20), |
| 364 client.GetLockWindow())); | 364 client.GetLockWindow())); |
| 365 | 365 |
| 366 w1->Focus(); | 366 w1->Focus(); |
| 367 EXPECT_TRUE(w1->GetFocusManager()->IsFocusedWindow(w1)); | 367 EXPECT_TRUE(w1->GetFocusManager()->IsFocusedWindow(w1)); |
| 368 | 368 |
| 369 client.Lock(); | 369 client.Lock(); |
| 370 | 370 |
| 371 // Since we're locked, the attempt to focus w2 will be ignored. | 371 // Since we're locked, the attempt to focus w2 will be ignored. |
| 372 w2->Focus(); | 372 w2->Focus(); |
| 373 EXPECT_TRUE(w1->GetFocusManager()->IsFocusedWindow(w1)); | 373 EXPECT_TRUE(w1->GetFocusManager()->IsFocusedWindow(w1)); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 TEST_F(RootWindowTest, GestureRecognizerResetsTargetWhenParentHides) { | 774 TEST_F(RootWindowTest, GestureRecognizerResetsTargetWhenParentHides) { |
| 775 scoped_ptr<Window> w1(CreateWindow(1, root_window(), NULL)); | 775 scoped_ptr<Window> w1(CreateWindow(1, root_window(), NULL)); |
| 776 DetachesParentOnTapDelegate delegate; | 776 DetachesParentOnTapDelegate delegate; |
| 777 scoped_ptr<Window> parent(CreateWindow(22, w1.get(), NULL)); | 777 scoped_ptr<Window> parent(CreateWindow(22, w1.get(), NULL)); |
| 778 Window* child = CreateWindow(11, parent.get(), &delegate); | 778 Window* child = CreateWindow(11, parent.get(), &delegate); |
| 779 test::EventGenerator generator(root_window(), child); | 779 test::EventGenerator generator(root_window(), child); |
| 780 generator.GestureTapAt(gfx::Point(40, 40)); | 780 generator.GestureTapAt(gfx::Point(40, 40)); |
| 781 } | 781 } |
| 782 | 782 |
| 783 } // namespace aura | 783 } // namespace aura |
| OLD | NEW |