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

Unified Diff: chrome/browser/autofill/autofill_interactive_uitest.cc

Issue 447423002: Fix AutofillInteractiveTest tests flake on win swarming bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 4684d4a808ecddd69af1f04b8adc7db45eb03de0..a641fa6bb9ca09f5de82504045c2b5e2d20c840d 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/render_messages.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/ui_test_utils.h"
#include "components/autofill/content/browser/content_autofill_driver.h"
@@ -214,6 +215,13 @@ class AutofillInteractiveTest : public InProcessBrowserTest {
ContentAutofillDriver::FromWebContents(web_contents);
AutofillManager* autofill_manager = autofill_driver->autofill_manager();
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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698