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

Side by Side Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 2715743005: Revert of Avoid two targeting phases in aura client-lib and EventProcessor. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shared/immersive_fullscreen_controller.h" 5 #include "ash/shared/immersive_fullscreen_controller.h"
6 6
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/display/mouse_cursor_event_filter.h" 9 #include "ash/display/mouse_cursor_event_filter.h"
10 #include "ash/public/cpp/shelf_types.h" 10 #include "ash/public/cpp/shelf_types.h"
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 behind->Show(); 729 behind->Show();
730 behind->SetBounds(window_bounds); 730 behind->SetBounds(window_bounds);
731 widget()->StackAbove(behind.get()); 731 widget()->StackAbove(behind.get());
732 732
733 // Make sure the windows are aligned on top. 733 // Make sure the windows are aligned on top.
734 EXPECT_EQ(behind->GetBoundsInScreen().y(), window()->GetBoundsInScreen().y()); 734 EXPECT_EQ(behind->GetBoundsInScreen().y(), window()->GetBoundsInScreen().y());
735 int top = behind->GetBoundsInScreen().y(); 735 int top = behind->GetBoundsInScreen().y();
736 736
737 ui::TouchEvent touch(ui::ET_TOUCH_MOVED, gfx::Point(10, top), 0, 737 ui::TouchEvent touch(ui::ET_TOUCH_MOVED, gfx::Point(10, top), 0,
738 ui::EventTimeForNow()); 738 ui::EventTimeForNow());
739 aura::Window* root = window()->GetRootWindow(); 739 ui::EventTarget* root = window()->GetRootWindow();
740 ui::EventTargeter* targeter = 740 ui::EventTargeter* targeter = root->GetEventTargeter();
741 root->GetHost()->dispatcher()->GetDefaultEventTargeter();
742 EXPECT_EQ(window(), targeter->FindTargetForEvent(root, &touch)); 741 EXPECT_EQ(window(), targeter->FindTargetForEvent(root, &touch));
743 742
744 SetEnabled(true); 743 SetEnabled(true);
745 EXPECT_FALSE(controller()->IsRevealed()); 744 EXPECT_FALSE(controller()->IsRevealed());
746 // Make sure the windows are still aligned on top. 745 // Make sure the windows are still aligned on top.
747 EXPECT_EQ(behind->GetBoundsInScreen().y(), window()->GetBoundsInScreen().y()); 746 EXPECT_EQ(behind->GetBoundsInScreen().y(), window()->GetBoundsInScreen().y());
748 top = behind->GetBoundsInScreen().y(); 747 top = behind->GetBoundsInScreen().y();
749 ui::TouchEvent touch2(ui::ET_TOUCH_MOVED, gfx::Point(10, top), 0, 748 ui::TouchEvent touch2(ui::ET_TOUCH_MOVED, gfx::Point(10, top), 0,
750 ui::EventTimeForNow()); 749 ui::EventTimeForNow());
751 // The event should still be targeted to window(). 750 // The event should still be targeted to window().
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 SetEnabled(true); 1031 SetEnabled(true);
1033 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1032 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1034 1033
1035 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1034 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1036 SetEnabled(false); 1035 SetEnabled(false);
1037 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 1036 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
1038 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1037 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1039 } 1038 }
1040 1039
1041 } // namespase ash 1040 } // namespase ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698