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/shell.h" | 5 #include "ash/shell.h" |
6 #include "ash/shell_window_ids.h" | 6 #include "ash/shell_window_ids.h" |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "ash/test/shell_test_api.h" | 8 #include "ash/test/shell_test_api.h" |
9 #include "ash/test/test_activation_delegate.h" | 9 #include "ash/test/test_activation_delegate.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
11 #include "ui/aura/client/activation_client.h" | 11 #include "ui/aura/client/activation_client.h" |
12 #include "ui/aura/client/activation_delegate.h" | 12 #include "ui/aura/client/activation_delegate.h" |
13 #include "ui/aura/client/cursor_client_observer.h" | 13 #include "ui/aura/client/cursor_client_observer.h" |
14 #include "ui/aura/client/focus_client.h" | 14 #include "ui/aura/client/focus_client.h" |
15 #include "ui/aura/env.h" | 15 #include "ui/aura/env.h" |
16 #include "ui/aura/test/aura_test_base.h" | 16 #include "ui/aura/test/aura_test_base.h" |
17 #include "ui/aura/test/event_generator.h" | 17 #include "ui/aura/test/event_generator.h" |
18 #include "ui/aura/test/test_event_handler.h" | 18 #include "ui/aura/test/test_event_handler.h" |
19 #include "ui/aura/test/test_window_delegate.h" | 19 #include "ui/aura/test/test_window_delegate.h" |
20 #include "ui/aura/test/test_windows.h" | 20 #include "ui/aura/test/test_windows.h" |
21 #include "ui/aura/window_event_dispatcher.h" | |
22 #include "ui/base/cursor/cursor.h" | 21 #include "ui/base/cursor/cursor.h" |
23 #include "ui/base/hit_test.h" | 22 #include "ui/base/hit_test.h" |
24 #include "ui/events/event.h" | 23 #include "ui/events/event.h" |
| 24 #include "ui/events/event_processor.h" |
25 #include "ui/events/event_utils.h" | 25 #include "ui/events/event_utils.h" |
26 #include "ui/gfx/screen.h" | 26 #include "ui/gfx/screen.h" |
27 #include "ui/views/corewm/compound_event_filter.h" | 27 #include "ui/views/corewm/compound_event_filter.h" |
28 #include "ui/views/corewm/corewm_switches.h" | 28 #include "ui/views/corewm/corewm_switches.h" |
29 #include "ui/views/corewm/input_method_event_filter.h" | 29 #include "ui/views/corewm/input_method_event_filter.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 class TestingCursorClientObserver : public aura::client::CursorClientObserver { | 33 class TestingCursorClientObserver : public aura::client::CursorClientObserver { |
34 public: | 34 public: |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 // Click on a sub-window (w121) to focus it. | 177 // Click on a sub-window (w121) to focus it. |
178 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), | 178 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), |
179 w121.get()); | 179 w121.get()); |
180 generator.ClickLeftButton(); | 180 generator.ClickLeftButton(); |
181 | 181 |
182 aura::client::FocusClient* focus_client = | 182 aura::client::FocusClient* focus_client = |
183 aura::client::GetFocusClient(w121.get()); | 183 aura::client::GetFocusClient(w121.get()); |
184 EXPECT_EQ(w121.get(), focus_client->GetFocusedWindow()); | 184 EXPECT_EQ(w121.get(), focus_client->GetFocusedWindow()); |
185 | 185 |
186 aura::WindowEventDispatcher* dispatcher = | 186 ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor(); |
187 root_window->GetHost()->dispatcher(); | |
188 | 187 |
189 // The key press should be sent to the focused sub-window. | 188 // The key press should be sent to the focused sub-window. |
190 ui::KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_E, 0, false); | 189 ui::KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_E, 0, false); |
191 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&keyev); | 190 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&keyev); |
192 ASSERT_FALSE(details.dispatcher_destroyed); | 191 ASSERT_FALSE(details.dispatcher_destroyed); |
193 EXPECT_EQ(ui::VKEY_E, w121delegate->last_key_code()); | 192 EXPECT_EQ(ui::VKEY_E, w121delegate->last_key_code()); |
194 | 193 |
195 // Touch on a sub-window (w122) to focus it. | 194 // Touch on a sub-window (w122) to focus it. |
196 gfx::Point click_point = w122->bounds().CenterPoint(); | 195 gfx::Point click_point = w122->bounds().CenterPoint(); |
197 aura::Window::ConvertPointToTarget(w122->parent(), root_window, &click_point); | 196 aura::Window::ConvertPointToTarget(w122->parent(), root_window, &click_point); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow()); | 439 EXPECT_EQ(w1.get(), focus_client->GetFocusedWindow()); |
441 EXPECT_EQ(1, d1.activated_count()); | 440 EXPECT_EQ(1, d1.activated_count()); |
442 EXPECT_EQ(0, d1.lost_active_count()); | 441 EXPECT_EQ(0, d1.lost_active_count()); |
443 d1.Clear(); | 442 d1.Clear(); |
444 | 443 |
445 // Touch window2. | 444 // Touch window2. |
446 gfx::Point press_point = w2->bounds().CenterPoint(); | 445 gfx::Point press_point = w2->bounds().CenterPoint(); |
447 aura::Window::ConvertPointToTarget(w2->parent(), root_window, &press_point); | 446 aura::Window::ConvertPointToTarget(w2->parent(), root_window, &press_point); |
448 ui::TouchEvent touchev1(ui::ET_TOUCH_PRESSED, press_point, 0, getTime()); | 447 ui::TouchEvent touchev1(ui::ET_TOUCH_PRESSED, press_point, 0, getTime()); |
449 | 448 |
450 aura::WindowEventDispatcher* dispatcher = | 449 ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor(); |
451 root_window->GetHost()->dispatcher(); | |
452 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&touchev1); | 450 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&touchev1); |
453 ASSERT_FALSE(details.dispatcher_destroyed); | 451 ASSERT_FALSE(details.dispatcher_destroyed); |
454 | 452 |
455 // Window2 should have become active. | 453 // Window2 should have become active. |
456 EXPECT_TRUE(wm::IsActiveWindow(w2.get())); | 454 EXPECT_TRUE(wm::IsActiveWindow(w2.get())); |
457 EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow()); | 455 EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow()); |
458 EXPECT_EQ(0, d1.activated_count()); | 456 EXPECT_EQ(0, d1.activated_count()); |
459 EXPECT_EQ(1, d1.lost_active_count()); | 457 EXPECT_EQ(1, d1.lost_active_count()); |
460 EXPECT_EQ(1, d2.activated_count()); | 458 EXPECT_EQ(1, d2.activated_count()); |
461 EXPECT_EQ(0, d2.lost_active_count()); | 459 EXPECT_EQ(0, d2.lost_active_count()); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 -1, | 501 -1, |
504 gfx::Rect(kWindowLeft, kWindowTop, 640, 480))); | 502 gfx::Rect(kWindowLeft, kWindowTop, 640, 480))); |
505 | 503 |
506 // Create two mouse movement events we can switch between. | 504 // Create two mouse movement events we can switch between. |
507 gfx::Point point1(kWindowLeft, kWindowTop); | 505 gfx::Point point1(kWindowLeft, kWindowTop); |
508 aura::Window::ConvertPointToTarget(window->parent(), root_window, &point1); | 506 aura::Window::ConvertPointToTarget(window->parent(), root_window, &point1); |
509 | 507 |
510 gfx::Point point2(kWindowLeft + 1, kWindowTop + 1); | 508 gfx::Point point2(kWindowLeft + 1, kWindowTop + 1); |
511 aura::Window::ConvertPointToTarget(window->parent(), root_window, &point2); | 509 aura::Window::ConvertPointToTarget(window->parent(), root_window, &point2); |
512 | 510 |
513 aura::WindowEventDispatcher* dispatcher = | 511 aura::WindowTreeHost* host = root_window->GetHost(); |
514 root_window->GetHost()->dispatcher(); | 512 ui::EventProcessor* dispatcher = host->event_processor(); |
515 | 513 |
516 // Cursor starts as a pointer (set during Shell::Init()). | 514 // Cursor starts as a pointer (set during Shell::Init()). |
517 EXPECT_EQ(ui::kCursorPointer, | 515 EXPECT_EQ(ui::kCursorPointer, host->last_cursor().native_type()); |
518 dispatcher->host()->last_cursor().native_type()); | |
519 | 516 |
520 { | 517 { |
521 // Resize edges and corners show proper cursors. | 518 // Resize edges and corners show proper cursors. |
522 window_delegate.set_hittest_code(HTBOTTOM); | 519 window_delegate.set_hittest_code(HTBOTTOM); |
523 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); | 520 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); |
524 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); | 521 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); |
525 ASSERT_FALSE(details.dispatcher_destroyed); | 522 ASSERT_FALSE(details.dispatcher_destroyed); |
526 EXPECT_EQ(ui::kCursorSouthResize, | 523 EXPECT_EQ(ui::kCursorSouthResize, host->last_cursor().native_type()); |
527 dispatcher->host()->last_cursor().native_type()); | |
528 } | 524 } |
529 | 525 |
530 { | 526 { |
531 window_delegate.set_hittest_code(HTBOTTOMLEFT); | 527 window_delegate.set_hittest_code(HTBOTTOMLEFT); |
532 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); | 528 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); |
533 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); | 529 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); |
534 ASSERT_FALSE(details.dispatcher_destroyed); | 530 ASSERT_FALSE(details.dispatcher_destroyed); |
535 EXPECT_EQ(ui::kCursorSouthWestResize, | 531 EXPECT_EQ(ui::kCursorSouthWestResize, host->last_cursor().native_type()); |
536 dispatcher->host()->last_cursor().native_type()); | |
537 } | 532 } |
538 | 533 |
539 { | 534 { |
540 window_delegate.set_hittest_code(HTBOTTOMRIGHT); | 535 window_delegate.set_hittest_code(HTBOTTOMRIGHT); |
541 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); | 536 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); |
542 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); | 537 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); |
543 ASSERT_FALSE(details.dispatcher_destroyed); | 538 ASSERT_FALSE(details.dispatcher_destroyed); |
544 EXPECT_EQ(ui::kCursorSouthEastResize, | 539 EXPECT_EQ(ui::kCursorSouthEastResize, host->last_cursor().native_type()); |
545 dispatcher->host()->last_cursor().native_type()); | |
546 } | 540 } |
547 | 541 |
548 { | 542 { |
549 window_delegate.set_hittest_code(HTLEFT); | 543 window_delegate.set_hittest_code(HTLEFT); |
550 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); | 544 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); |
551 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); | 545 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); |
552 ASSERT_FALSE(details.dispatcher_destroyed); | 546 ASSERT_FALSE(details.dispatcher_destroyed); |
553 EXPECT_EQ(ui::kCursorWestResize, | 547 EXPECT_EQ(ui::kCursorWestResize, host->last_cursor().native_type()); |
554 dispatcher->host()->last_cursor().native_type()); | |
555 } | 548 } |
556 | 549 |
557 { | 550 { |
558 window_delegate.set_hittest_code(HTRIGHT); | 551 window_delegate.set_hittest_code(HTRIGHT); |
559 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); | 552 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); |
560 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); | 553 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); |
561 ASSERT_FALSE(details.dispatcher_destroyed); | 554 ASSERT_FALSE(details.dispatcher_destroyed); |
562 EXPECT_EQ(ui::kCursorEastResize, | 555 EXPECT_EQ(ui::kCursorEastResize, host->last_cursor().native_type()); |
563 dispatcher->host()->last_cursor().native_type()); | |
564 } | 556 } |
565 | 557 |
566 { | 558 { |
567 window_delegate.set_hittest_code(HTTOP); | 559 window_delegate.set_hittest_code(HTTOP); |
568 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); | 560 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); |
569 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); | 561 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); |
570 ASSERT_FALSE(details.dispatcher_destroyed); | 562 ASSERT_FALSE(details.dispatcher_destroyed); |
571 EXPECT_EQ(ui::kCursorNorthResize, | 563 EXPECT_EQ(ui::kCursorNorthResize, host->last_cursor().native_type()); |
572 dispatcher->host()->last_cursor().native_type()); | |
573 } | 564 } |
574 | 565 |
575 { | 566 { |
576 window_delegate.set_hittest_code(HTTOPLEFT); | 567 window_delegate.set_hittest_code(HTTOPLEFT); |
577 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); | 568 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); |
578 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); | 569 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); |
579 ASSERT_FALSE(details.dispatcher_destroyed); | 570 ASSERT_FALSE(details.dispatcher_destroyed); |
580 EXPECT_EQ(ui::kCursorNorthWestResize, | 571 EXPECT_EQ(ui::kCursorNorthWestResize, host->last_cursor().native_type()); |
581 dispatcher->host()->last_cursor().native_type()); | |
582 } | 572 } |
583 | 573 |
584 { | 574 { |
585 window_delegate.set_hittest_code(HTTOPRIGHT); | 575 window_delegate.set_hittest_code(HTTOPRIGHT); |
586 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); | 576 ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0); |
587 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); | 577 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2); |
588 ASSERT_FALSE(details.dispatcher_destroyed); | 578 ASSERT_FALSE(details.dispatcher_destroyed); |
589 EXPECT_EQ(ui::kCursorNorthEastResize, | 579 EXPECT_EQ(ui::kCursorNorthEastResize, host->last_cursor().native_type()); |
590 dispatcher->host()->last_cursor().native_type()); | |
591 } | 580 } |
592 | 581 |
593 { | 582 { |
594 // Client area uses null cursor. | 583 // Client area uses null cursor. |
595 window_delegate.set_hittest_code(HTCLIENT); | 584 window_delegate.set_hittest_code(HTCLIENT); |
596 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); | 585 ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0); |
597 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); | 586 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1); |
598 ASSERT_FALSE(details.dispatcher_destroyed); | 587 ASSERT_FALSE(details.dispatcher_destroyed); |
599 EXPECT_EQ(ui::kCursorNull, dispatcher->host()->last_cursor().native_type()); | 588 EXPECT_EQ(ui::kCursorNull, host->last_cursor().native_type()); |
600 } | 589 } |
601 } | 590 } |
602 | 591 |
603 #if defined(OS_WIN) | 592 #if defined(OS_WIN) |
604 #define MAYBE_TransformActivate DISABLED_TransformActivate | 593 #define MAYBE_TransformActivate DISABLED_TransformActivate |
605 #else | 594 #else |
606 #define MAYBE_TransformActivate TransformActivate | 595 #define MAYBE_TransformActivate TransformActivate |
607 #endif | 596 #endif |
608 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { | 597 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { |
609 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 598 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
(...skipping 15 matching lines...) Expand all Loading... |
625 d1.SetWindow(w1.get()); | 614 d1.SetWindow(w1.get()); |
626 w1->Show(); | 615 w1->Show(); |
627 | 616 |
628 gfx::Point miss_point(5, 5); | 617 gfx::Point miss_point(5, 5); |
629 transform.TransformPoint(&miss_point); | 618 transform.TransformPoint(&miss_point); |
630 ui::MouseEvent mouseev1(ui::ET_MOUSE_PRESSED, | 619 ui::MouseEvent mouseev1(ui::ET_MOUSE_PRESSED, |
631 miss_point, | 620 miss_point, |
632 miss_point, | 621 miss_point, |
633 ui::EF_LEFT_MOUSE_BUTTON, | 622 ui::EF_LEFT_MOUSE_BUTTON, |
634 ui::EF_LEFT_MOUSE_BUTTON); | 623 ui::EF_LEFT_MOUSE_BUTTON); |
635 aura::WindowEventDispatcher* dispatcher = | 624 ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor(); |
636 root_window->GetHost()->dispatcher(); | |
637 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&mouseev1); | 625 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&mouseev1); |
638 ASSERT_FALSE(details.dispatcher_destroyed); | 626 ASSERT_FALSE(details.dispatcher_destroyed); |
639 EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow()); | 627 EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow()); |
640 ui::MouseEvent mouseup(ui::ET_MOUSE_RELEASED, | 628 ui::MouseEvent mouseup(ui::ET_MOUSE_RELEASED, |
641 miss_point, | 629 miss_point, |
642 miss_point, | 630 miss_point, |
643 ui::EF_LEFT_MOUSE_BUTTON, | 631 ui::EF_LEFT_MOUSE_BUTTON, |
644 ui::EF_LEFT_MOUSE_BUTTON); | 632 ui::EF_LEFT_MOUSE_BUTTON); |
645 details = dispatcher->OnEventFromSource(&mouseup); | 633 details = dispatcher->OnEventFromSource(&mouseup); |
646 ASSERT_FALSE(details.dispatcher_destroyed); | 634 ASSERT_FALSE(details.dispatcher_destroyed); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 scoped_ptr<CustomEventHandler> f2(new CustomEventHandler); | 666 scoped_ptr<CustomEventHandler> f2(new CustomEventHandler); |
679 | 667 |
680 // Adds them to root window event filter. | 668 // Adds them to root window event filter. |
681 views::corewm::CompoundEventFilter* env_filter = | 669 views::corewm::CompoundEventFilter* env_filter = |
682 Shell::GetInstance()->env_filter(); | 670 Shell::GetInstance()->env_filter(); |
683 env_filter->AddHandler(f1.get()); | 671 env_filter->AddHandler(f1.get()); |
684 env_filter->AddHandler(f2.get()); | 672 env_filter->AddHandler(f2.get()); |
685 | 673 |
686 // Dispatches mouse and keyboard events. | 674 // Dispatches mouse and keyboard events. |
687 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false); | 675 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false); |
688 aura::WindowEventDispatcher* dispatcher = | 676 ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor(); |
689 root_window->GetHost()->dispatcher(); | |
690 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&key_event); | 677 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&key_event); |
691 ASSERT_FALSE(details.dispatcher_destroyed); | 678 ASSERT_FALSE(details.dispatcher_destroyed); |
692 ui::MouseEvent mouse_pressed( | 679 ui::MouseEvent mouse_pressed( |
693 ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0, 0); | 680 ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0, 0); |
694 details = dispatcher->OnEventFromSource(&mouse_pressed); | 681 details = dispatcher->OnEventFromSource(&mouse_pressed); |
695 ASSERT_FALSE(details.dispatcher_destroyed); | 682 ASSERT_FALSE(details.dispatcher_destroyed); |
696 | 683 |
697 // Both filters should get the events. | 684 // Both filters should get the events. |
698 EXPECT_EQ(1, f1->num_key_events()); | 685 EXPECT_EQ(1, f1->num_key_events()); |
699 EXPECT_EQ(1, f1->num_mouse_events()); | 686 EXPECT_EQ(1, f1->num_mouse_events()); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 observer_a.reset(); | 832 observer_a.reset(); |
846 observer_b.reset(); | 833 observer_b.reset(); |
847 generator.MoveMouseTo(50, 50); | 834 generator.MoveMouseTo(50, 50); |
848 EXPECT_TRUE(observer_a.did_visibility_change()); | 835 EXPECT_TRUE(observer_a.did_visibility_change()); |
849 EXPECT_FALSE(observer_b.did_visibility_change()); | 836 EXPECT_FALSE(observer_b.did_visibility_change()); |
850 EXPECT_TRUE(observer_a.is_cursor_visible()); | 837 EXPECT_TRUE(observer_a.is_cursor_visible()); |
851 } | 838 } |
852 #endif // defined(OS_CHROMEOS) | 839 #endif // defined(OS_CHROMEOS) |
853 | 840 |
854 } // namespace ash | 841 } // namespace ash |
OLD | NEW |