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

Unified Diff: ash/shell_unittest.cc

Issue 16463002: Change ordering of Shell event handlers: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | ash/test/shell_test_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index be1d1cd3a8cd2599e106cd0cc62650bc744c7a2d..d059091cc71c71148b1cf66109ee1980dbfa1dbc 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
« no previous file with comments | « ash/shell.cc ('k') | ash/test/shell_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698