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

Unified Diff: chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc

Issue 330113002: Fixing flaky overscroll and touch exploration mode browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding back a comment removed by accident. Created 6 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 | « no previous file | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698