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

Unified Diff: ash/root_window_controller_unittest.cc

Issue 97013002: [Input View] Makes the input view window support window.resizeTo() and w3c visibility API its web c… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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
Index: ash/root_window_controller_unittest.cc
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index d547a8a335099074ab4f11962e4f4da675a6a6d3..fbb15d61585150a4c218f2b4d42a54edd5b407e3 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -25,6 +25,7 @@
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tracker.h"
+#include "ui/keyboard/keyboard_controller_proxy.h"
#include "ui/keyboard/keyboard_switches.h"
#include "ui/views/controls/menu/menu_controller.h"
#include "ui/views/widget/widget.h"
@@ -667,6 +668,16 @@ TEST_F(VirtualKeyboardRootWindowControllerTest,
main_delegate->CreateTestWindowWithParent(keyboard_container));
keyboard_container->layout_manager()->OnWindowResized();
keyboard_window->Show();
+
+ // This test will create 2 sub windows for keyboard container.
+ // One is from keyboard controller proxy, and another is from this test
+ // itself. For testing purpose, the test window is needed for mouse hit test.
+ // But inside keyboard controller, it needs proxy window to calculate the
+ // bounds of the hit test mask. Therefore, below code is a hack to make sure
+ // the 2 windows have the same bounds.
+ Shell::GetInstance()->keyboard_controller()->proxy()->GetKeyboardWindow()
+ ->SetBounds(keyboard_window->bounds());
sadrul 2013/12/04 17:35:20 It's not clear to me why you need a new window for
Shu Chen 2013/12/05 05:01:39 Done.
+
aura::test::EventGenerator event_generator(root_window,
keyboard_window.get());
event_generator.ClickLeftButton();
« no previous file with comments | « no previous file | ash/shell/keyboard_controller_proxy_stub.h » ('j') | ash/shell/keyboard_controller_proxy_stub.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698