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

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

Issue 9566020: Revert 124071 - Gestures are now possible using touch events with any ids (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months 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/gestures/gesture_sequence.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/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 511
512 window->ReleaseCapture(); 512 window->ReleaseCapture();
513 EXPECT_FALSE(window->HasCapture()); 513 EXPECT_FALSE(window->HasCapture());
514 EXPECT_EQ(1, delegate.capture_lost_count()); 514 EXPECT_EQ(1, delegate.capture_lost_count());
515 EXPECT_EQ(1, delegate.capture_changed_event_count()); 515 EXPECT_EQ(1, delegate.capture_changed_event_count());
516 EXPECT_EQ(1, delegate.mouse_event_count()); 516 EXPECT_EQ(1, delegate.mouse_event_count());
517 517
518 generator.PressLeftButton(); 518 generator.PressLeftButton();
519 EXPECT_EQ(1, delegate.mouse_event_count()); 519 EXPECT_EQ(1, delegate.mouse_event_count());
520 520
521 TouchEvent touchev2(ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 1); 521 root_window()->DispatchTouchEvent(&touchev);
522 root_window()->DispatchTouchEvent(&touchev2);
523 EXPECT_EQ(0, delegate.touch_event_count()); 522 EXPECT_EQ(0, delegate.touch_event_count());
524 523
525 // Removing the capture window from parent should reset the capture window 524 // Removing the capture window from parent should reset the capture window
526 // in the root window. 525 // in the root window.
527 window->SetCapture(); 526 window->SetCapture();
528 EXPECT_EQ(window.get(), root_window()->capture_window()); 527 EXPECT_EQ(window.get(), root_window()->capture_window());
529 window->parent()->RemoveChild(window.get()); 528 window->parent()->RemoveChild(window.get());
530 EXPECT_FALSE(window->HasCapture()); 529 EXPECT_FALSE(window->HasCapture());
531 EXPECT_EQ(NULL, root_window()->capture_window()); 530 EXPECT_EQ(NULL, root_window()->capture_window());
532 } 531 }
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 1721
1723 w1.reset(); // Deletes w11 and w111. 1722 w1.reset(); // Deletes w11 and w111.
1724 w11 = NULL; 1723 w11 = NULL;
1725 w111 = NULL; 1724 w111 = NULL;
1726 EXPECT_EQ(2, observer.added_count()); 1725 EXPECT_EQ(2, observer.added_count());
1727 EXPECT_EQ(2, observer.removed_count()); 1726 EXPECT_EQ(2, observer.removed_count());
1728 } 1727 }
1729 1728
1730 } // namespace test 1729 } // namespace test
1731 } // namespace aura 1730 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_sequence.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698