summaryrefslogtreecommitdiffstats
path: root/ash/shell_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/shell_unittest.cc')
-rw-r--r--ash/shell_unittest.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index be1d1cd..d059091 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -9,6 +9,8 @@
#include "ash/ash_switches.h"
#include "ash/desktop_background/desktop_background_widget_controller.h"
+#include "ash/display/mouse_cursor_event_filter.h"
+#include "ash/drag_drop/drag_drop_controller.h"
#include "ash/launcher/launcher.h"
#include "ash/root_window_controller.h"
#include "ash/session_state_delegate.h"
@@ -16,6 +18,7 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
+#include "ash/test/shell_test_api.h"
#include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/window_util.h"
#include "base/utf_string_conversions.h"
@@ -423,6 +426,16 @@ TEST_F(ShellTest, ToggleAutoHide) {
shell->GetShelfAutoHideBehavior(root_window));
}
+TEST_F(ShellTest, TestPreTargetHandlerOrder) {
+ Shell* shell = Shell::GetInstance();
+ Shell::TestApi test_api(shell);
+ test::ShellTestApi shell_test_api(shell);
+
+ const ui::EventHandlerList& handlers = test_api.pre_target_handlers();
+ EXPECT_EQ(handlers[0], shell->mouse_cursor_filter());
+ EXPECT_EQ(handlers[1], shell_test_api.drag_drop_controller());
+}
+
// This verifies WindowObservers are removed when a window is destroyed after
// the Shell is destroyed. This scenario (aura::Windows being deleted after the
// Shell) occurs if someone is holding a reference to an unparented Window, as