| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 v3->Reset(); | 596 v3->Reset(); |
| 597 | 597 |
| 598 // Gesture on |v3| | 598 // Gesture on |v3| |
| 599 GestureEventForTest g1(ui::ET_GESTURE_TAP, 110, 110, 0); | 599 GestureEventForTest g1(ui::ET_GESTURE_TAP, 110, 110, 0); |
| 600 root->OnGestureEvent(g1); | 600 root->OnGestureEvent(g1); |
| 601 EXPECT_EQ(ui::ET_GESTURE_TAP, v2->last_gesture_event_type_); | 601 EXPECT_EQ(ui::ET_GESTURE_TAP, v2->last_gesture_event_type_); |
| 602 EXPECT_EQ(gfx::Point(10, 10), v2->location_); | 602 EXPECT_EQ(gfx::Point(10, 10), v2->location_); |
| 603 EXPECT_EQ(ui::ET_UNKNOWN, v1->last_gesture_event_type_); | 603 EXPECT_EQ(ui::ET_UNKNOWN, v1->last_gesture_event_type_); |
| 604 | 604 |
| 605 // Simulate an up so that RootView is no longer targetting |v3|. | 605 // Simulate an up so that RootView is no longer targetting |v3|. |
| 606 GestureEventForTest g1_up(ui::ET_GESTURE_END, 110, 110, 0); | 606 GestureEventForTest g1_up(ui::ET_GESTURE_TAP_UP, 110, 110, 0); |
| 607 root->OnGestureEvent(g1_up); | 607 root->OnGestureEvent(g1_up); |
| 608 | 608 |
| 609 v1->Reset(); | 609 v1->Reset(); |
| 610 v2->Reset(); | 610 v2->Reset(); |
| 611 v3->Reset(); | 611 v3->Reset(); |
| 612 | 612 |
| 613 // Gesture on |v1| | 613 // Gesture on |v1| |
| 614 GestureEventForTest g2(ui::ET_GESTURE_TAP, 80, 80, 0); | 614 GestureEventForTest g2(ui::ET_GESTURE_TAP, 80, 80, 0); |
| 615 root->OnGestureEvent(g2); | 615 root->OnGestureEvent(g2); |
| 616 EXPECT_EQ(ui::ET_GESTURE_TAP, v1->last_gesture_event_type_); | 616 EXPECT_EQ(ui::ET_GESTURE_TAP, v1->last_gesture_event_type_); |
| (...skipping 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3220 scoped_ptr<ui::Layer> layer(c1->AcquireLayer()); | 3220 scoped_ptr<ui::Layer> layer(c1->AcquireLayer()); |
| 3221 EXPECT_EQ(layer.get(), c1->layer()); | 3221 EXPECT_EQ(layer.get(), c1->layer()); |
| 3222 | 3222 |
| 3223 layer.reset(c1->RecreateLayer()); | 3223 layer.reset(c1->RecreateLayer()); |
| 3224 EXPECT_NE(c1->layer(), layer.get()); | 3224 EXPECT_NE(c1->layer(), layer.get()); |
| 3225 } | 3225 } |
| 3226 | 3226 |
| 3227 #endif // USE_AURA | 3227 #endif // USE_AURA |
| 3228 | 3228 |
| 3229 } // namespace views | 3229 } // namespace views |
| OLD | NEW |