| 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 "ash/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
| 6 #include "ash/display/multi_display_manager.h" | 6 #include "ash/display/multi_display_manager.h" |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/wm/coordinate_conversion.h" | 10 #include "ash/wm/coordinate_conversion.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 aura::client::GetCaptureWindow(r2_w1->GetRootWindow())); | 346 aura::client::GetCaptureWindow(r2_w1->GetRootWindow())); |
| 347 generator2.MoveMouseBy(10, 10); | 347 generator2.MoveMouseBy(10, 10); |
| 348 generator2.ClickLeftButton(); | 348 generator2.ClickLeftButton(); |
| 349 EXPECT_EQ("0 0 0", r2_d1.GetMouseMotionCountsAndReset()); | 349 EXPECT_EQ("0 0 0", r2_d1.GetMouseMotionCountsAndReset()); |
| 350 EXPECT_EQ("0 0", r2_d1.GetMouseButtonCountsAndReset()); | 350 EXPECT_EQ("0 0", r2_d1.GetMouseButtonCountsAndReset()); |
| 351 // mouse is already entered. | 351 // mouse is already entered. |
| 352 EXPECT_EQ("0 1 0", r1_d2.GetMouseMotionCountsAndReset()); | 352 EXPECT_EQ("0 1 0", r1_d2.GetMouseMotionCountsAndReset()); |
| 353 EXPECT_EQ("1 1", r1_d2.GetMouseButtonCountsAndReset()); | 353 EXPECT_EQ("1 1", r1_d2.GetMouseButtonCountsAndReset()); |
| 354 | 354 |
| 355 r1_w2->ReleaseCapture(); | 355 r1_w2->ReleaseCapture(); |
| 356 EXPECT_EQ(NULL, | 356 EXPECT_EQ(NULL, aura::client::GetCaptureWindow(r2_w1->GetRootWindow())); |
| 357 aura::client::GetCaptureWindow(r2_w1->GetRootWindow())); | |
| 358 generator2.MoveMouseTo(15, 15); | 357 generator2.MoveMouseTo(15, 15); |
| 359 generator2.ClickLeftButton(); | 358 generator2.ClickLeftButton(); |
| 360 EXPECT_EQ("1 1 0", r2_d1.GetMouseMotionCountsAndReset()); | 359 EXPECT_EQ("1 1 0", r2_d1.GetMouseMotionCountsAndReset()); |
| 361 EXPECT_EQ("1 1", r2_d1.GetMouseButtonCountsAndReset()); | 360 EXPECT_EQ("1 1", r2_d1.GetMouseButtonCountsAndReset()); |
| 362 // Make sure the mouse_moved_handler_ is properly reset. | 361 // Make sure the mouse_moved_handler_ is properly reset. |
| 363 EXPECT_EQ("0 0 0", r1_d2.GetMouseMotionCountsAndReset()); | 362 EXPECT_EQ("0 0 0", r1_d2.GetMouseMotionCountsAndReset()); |
| 364 EXPECT_EQ("0 0", r1_d2.GetMouseButtonCountsAndReset()); | 363 EXPECT_EQ("0 0", r1_d2.GetMouseButtonCountsAndReset()); |
| 365 } | 364 } |
| 366 | 365 |
| 367 TEST_F(ExtendedDesktopTest, MoveWindow) { | 366 TEST_F(ExtendedDesktopTest, MoveWindow) { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 EXPECT_FALSE(tray->HasSystemBubble()); | 564 EXPECT_FALSE(tray->HasSystemBubble()); |
| 566 | 565 |
| 567 UpdateDisplay("100x600"); | 566 UpdateDisplay("100x600"); |
| 568 EXPECT_FALSE(tray->HasSystemBubble()); | 567 EXPECT_FALSE(tray->HasSystemBubble()); |
| 569 UpdateDisplay("100x600,600x400"); | 568 UpdateDisplay("100x600,600x400"); |
| 570 EXPECT_FALSE(tray->HasSystemBubble()); | 569 EXPECT_FALSE(tray->HasSystemBubble()); |
| 571 } | 570 } |
| 572 | 571 |
| 573 } // namespace internal | 572 } // namespace internal |
| 574 } // namespace ash | 573 } // namespace ash |
| OLD | NEW |