summaryrefslogtreecommitdiffstats
path: root/ash/accelerators/nested_dispatcher_controller_unittest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 16:52:41 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 16:52:41 +0000
commitb227ed707ed9a16bd071098a1500a182ea83a652 (patch)
tree5e16c700fee1b57130e51226d619824fa3d7f83f /ash/accelerators/nested_dispatcher_controller_unittest.cc
parent7d733b43e51d53a70e5e8062e485b5cd533c25a8 (diff)
downloadchromium_src-b227ed707ed9a16bd071098a1500a182ea83a652.zip
chromium_src-b227ed707ed9a16bd071098a1500a182ea83a652.tar.gz
chromium_src-b227ed707ed9a16bd071098a1500a182ea83a652.tar.bz2
Revert 128503 - Remove stops_event_propagation from Window, since it's broken.
Changes it to be implemented by the Aura client, via a new interface EventClient. The client can determine whether or not a given window and its subtree can receive events. I also cleaned up the way screen locking is entered/exited via the delegate, and some stuff in ash/shell. http://crbug.com/119347 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128328 Review URL: https://chromiumcodereview.appspot.com/9788001 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9808068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/nested_dispatcher_controller_unittest.cc')
-rw-r--r--ash/accelerators/nested_dispatcher_controller_unittest.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/ash/accelerators/nested_dispatcher_controller_unittest.cc b/ash/accelerators/nested_dispatcher_controller_unittest.cc
index 905b353..c0a2e4f 100644
--- a/ash/accelerators/nested_dispatcher_controller_unittest.cc
+++ b/ash/accelerators/nested_dispatcher_controller_unittest.cc
@@ -4,7 +4,6 @@
#include "ash/accelerators/accelerator_controller.h"
#include "ash/shell.h"
-#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
#include "base/bind.h"
@@ -115,10 +114,14 @@ TEST_F(NestedDispatcherTest, AssociatedWindowBelowLockScreen) {
MockDispatcher inner_dispatcher;
aura::Window* default_container = Shell::GetInstance()->GetContainer(
internal::kShellWindowId_DefaultContainer);
- scoped_ptr<aura::Window> associated_window(aura::test::CreateTestWindowWithId(
+ scoped_ptr<aura::Window>associated_window(aura::test::CreateTestWindowWithId(
0, default_container));
-
- Shell::GetInstance()->delegate()->LockScreen();
+ scoped_ptr<aura::Window>mock_lock_container(
+ aura::test::CreateTestWindowWithId(0, default_container));
+ mock_lock_container->set_stops_event_propagation(true);
+ aura::test::CreateTestWindowWithId(0, mock_lock_container.get());
+ EXPECT_TRUE(aura::test::WindowIsAbove(mock_lock_container.get(),
+ associated_window.get()));
DispatchKeyReleaseA();
aura::RootWindow* root_window = ash::Shell::GetInstance()->GetRootWindow();
aura::client::GetDispatcherClient(root_window)->RunWithDispatcher(
@@ -126,7 +129,6 @@ TEST_F(NestedDispatcherTest, AssociatedWindowBelowLockScreen) {
associated_window.get(),
true /* nestable_tasks_allowed */);
EXPECT_EQ(0, inner_dispatcher.num_key_events_dispatched());
- Shell::GetInstance()->delegate()->UnlockScreen();
}
// Aura window above lock screen in z order.
@@ -137,6 +139,7 @@ TEST_F(NestedDispatcherTest, AssociatedWindowAboveLockScreen) {
internal::kShellWindowId_DefaultContainer);
scoped_ptr<aura::Window>mock_lock_container(
aura::test::CreateTestWindowWithId(0, default_container));
+ mock_lock_container->set_stops_event_propagation(true);
aura::test::CreateTestWindowWithId(0, mock_lock_container.get());
scoped_ptr<aura::Window>associated_window(aura::test::CreateTestWindowWithId(
0, default_container));