Commit 6720ef3e authored by jam@chromium.org's avatar jam@chromium.org

Fix AutofillInteractiveTest tests flake on win swarming bots.

The tests were flaking because the preview was unexpectedly being shown at the same time as the suggestions. This happened when the mouse happened to be over the preview.

BUG=364685
R=isherman@chromium.org

Review URL: https://codereview.chromium.org/447423002

Cr-Commit-Position: refs/heads/master@{#288229}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288229 0039d316-1c4b-4281-b951-d872f2087c98
parent 9e6bea41
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/render_messages.h" #include "chrome/common/render_messages.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/test_switches.h" #include "chrome/test/base/test_switches.h"
#include "chrome/test/base/ui_test_utils.h" #include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/content/browser/content_autofill_driver.h" #include "components/autofill/content/browser/content_autofill_driver.h"
...@@ -214,6 +215,13 @@ class AutofillInteractiveTest : public InProcessBrowserTest { ...@@ -214,6 +215,13 @@ class AutofillInteractiveTest : public InProcessBrowserTest {
ContentAutofillDriver::FromWebContents(web_contents); ContentAutofillDriver::FromWebContents(web_contents);
AutofillManager* autofill_manager = autofill_driver->autofill_manager(); AutofillManager* autofill_manager = autofill_driver->autofill_manager();
autofill_manager->SetTestDelegate(&test_delegate_); autofill_manager->SetTestDelegate(&test_delegate_);
// If the mouse happened to be over where the suggestions are shown, then
// the preview will show up and will fail the tests. We need to give it a
// point that's within the browser frame, or else the method hangs.
gfx::Point reset_mouse(GetWebContents()->GetContainerBounds().origin());
reset_mouse = gfx::Point(reset_mouse.x() + 5, reset_mouse.y() + 5);
ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(reset_mouse));
} }
virtual void TearDownOnMainThread() OVERRIDE { virtual void TearDownOnMainThread() OVERRIDE {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment