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

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

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 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 | « ui/aura/window_targeter_unittest.cc ('k') | ui/events/event.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/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
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
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
OLDNEW
« no previous file with comments | « ui/aura/window_targeter_unittest.cc ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698