| Index: chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
|
| diff --git a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
|
| index 43ef9138f037c1cfb05a14ddd36db9d836f23ff6..148f1f3845c312b3d1e44ef60270c76375da8da1 100644
|
| --- a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
|
| +++ b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
|
| @@ -7,8 +7,11 @@
|
| #include "ash/accessibility_delegate.h"
|
| #include "ash/shell.h"
|
| #include "ash/test/ash_test_base.h"
|
| +#include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| #include "chrome/test/base/ui_test_utils.h"
|
| +#include "content/public/test/browser_test_utils.h"
|
| #include "ui/aura/test/event_generator.h"
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/compositor/compositor.h"
|
| @@ -34,20 +37,19 @@ private:
|
| DISALLOW_COPY_AND_ASSIGN(TouchExplorationTest);
|
| };
|
|
|
| -IN_PROC_BROWSER_TEST_F(TouchExplorationTest, PRE_ToggleOnOff) {
|
| - // TODO (mfomitchev): If the test is run by itself, there is a resize at the
|
| - // very beginning. An in-progress resize creates a "resize lock" in
|
| - // RenderWidgetHostViewAura, which calls
|
| - // WindowEventDispatcher::HoldPointerMoves(), which prevents mouse events from
|
| - // coming through. Adding a PRE_ test ensures the resize completes before the
|
| - // actual test is executed. sadrul@ says the resize shouldn't be even
|
| - // happening, so this needs to be looked at further.
|
| -}
|
| -
|
| // This test turns the touch exploration mode on/off and confirms that events
|
| // get rewritten when the touch exploration mode is on, and aren't affected
|
| // after the touch exploration mode is turned off.
|
| IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
|
| + // The RenderView for WebContents is created as a result of the navigation
|
| + // to the New Tab page which is done as part of the test SetUp. The creation
|
| + // involves sending a resize message to the renderer process. Here we wait
|
| + // for the resize ack to be received, because currently WindowEventDispatcher
|
| + // has code to hold touch and mouse move events until resize is complete
|
| + // (crbug.com/384342) which interferes with this test.
|
| + content::WebContents* web_contents =
|
| + browser()->tab_strip_model()->GetActiveWebContents();
|
| + content::WaitForResizeComplete(web_contents);
|
| aura::Window* root_window = ash::Shell::GetInstance()->GetPrimaryRootWindow();
|
| scoped_ptr<ui::test::TestEventHandler>
|
| event_handler(new ui::test::TestEventHandler());
|
|
|