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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 21519002: Prevent mouse from getting stuck on second display in login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include "ash/session_state_delegate.h" 7 #include "ash/session_state_delegate.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 ++block_reason) { 466 ++block_reason) {
467 BlockUserSession(static_cast<UserSessionBlockReason>(block_reason)); 467 BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
468 lock_window->Focus(); 468 lock_window->Focus();
469 EXPECT_TRUE(lock_window->HasFocus()); 469 EXPECT_TRUE(lock_window->HasFocus());
470 session_window->Focus(); 470 session_window->Focus();
471 EXPECT_FALSE(session_window->HasFocus()); 471 EXPECT_FALSE(session_window->HasFocus());
472 UnblockUserSession(); 472 UnblockUserSession();
473 } 473 }
474 } 474 }
475 475
476 typedef test::NoSessionAshTestBase NoSessionRootWindowControllerTest;
477
478 // Make sure that an event handler exists for entire display area.
479 TEST_F(NoSessionRootWindowControllerTest, Event) {
480 aura::RootWindow* root = Shell::GetPrimaryRootWindow();
481 const gfx::Size size = root->bounds().size();
482 aura::Window* event_target = root->GetEventHandlerForPoint(gfx::Point(0, 0));
483 EXPECT_TRUE(event_target);
484 EXPECT_EQ(event_target,
485 root->GetEventHandlerForPoint(gfx::Point(0, size.height() - 1)));
486 EXPECT_EQ(event_target,
487 root->GetEventHandlerForPoint(gfx::Point(size.width() - 1, 0)));
488 EXPECT_EQ(event_target,
489 root->GetEventHandlerForPoint(gfx::Point(0, size.height() - 1)));
490 EXPECT_EQ(event_target,
491 root->GetEventHandlerForPoint(
492 gfx::Point(size.width() - 1, size.height() - 1)));
493 }
494
476 } // namespace test 495 } // namespace test
477 } // namespace ash 496 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698