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/window.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50), | 1214 CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50), |
1215 root_window())); | 1215 root_window())); |
1216 | 1216 |
1217 test::EventGenerator generator(root_window()); | 1217 test::EventGenerator generator(root_window()); |
1218 generator.MoveMouseToCenterOf(w1.get()); | 1218 generator.MoveMouseToCenterOf(w1.get()); |
1219 EXPECT_TRUE(d1.entered()); | 1219 EXPECT_TRUE(d1.entered()); |
1220 EXPECT_FALSE(d1.exited()); | 1220 EXPECT_FALSE(d1.exited()); |
1221 d1.ResetExpectations(); | 1221 d1.ResetExpectations(); |
1222 | 1222 |
1223 ui::MouseEvent exit_event( | 1223 ui::MouseEvent exit_event( |
1224 ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), 0); | 1224 ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), 0, 0); |
1225 dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit_event); | 1225 dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit_event); |
1226 EXPECT_FALSE(d1.entered()); | 1226 EXPECT_FALSE(d1.entered()); |
1227 EXPECT_TRUE(d1.exited()); | 1227 EXPECT_TRUE(d1.exited()); |
1228 } | 1228 } |
1229 | 1229 |
1230 // Verifies that the WindowDelegate receives MouseExit and MouseEnter events for | 1230 // Verifies that the WindowDelegate receives MouseExit and MouseEnter events for |
1231 // mouse transitions from window to window, even if the entered window sets | 1231 // mouse transitions from window to window, even if the entered window sets |
1232 // and releases capture. | 1232 // and releases capture. |
1233 TEST_F(WindowTest, MouseEnterExitWithClick) { | 1233 TEST_F(WindowTest, MouseEnterExitWithClick) { |
1234 MouseEnterExitWindowDelegate d1; | 1234 MouseEnterExitWindowDelegate d1; |
(...skipping 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3708 BuildRootLayerTreeDescription(*root.layer())) | 3708 BuildRootLayerTreeDescription(*root.layer())) |
3709 << "layer tree doesn't match at " << i; | 3709 << "layer tree doesn't match at " << i; |
3710 EXPECT_EQ(data[i].expected_description, | 3710 EXPECT_EQ(data[i].expected_description, |
3711 BuildRootWindowTreeDescription(root)) | 3711 BuildRootWindowTreeDescription(root)) |
3712 << "window tree doesn't match at " << i; | 3712 << "window tree doesn't match at " << i; |
3713 } | 3713 } |
3714 } | 3714 } |
3715 | 3715 |
3716 } // namespace test | 3716 } // namespace test |
3717 } // namespace aura | 3717 } // namespace aura |
OLD | NEW |