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

Unified Diff: ash/autoclick/autoclick_unittest.cc

Issue 2251893003: Possible fix for autoclick test flakes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 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: ash/autoclick/autoclick_unittest.cc
diff --git a/ash/autoclick/autoclick_unittest.cc b/ash/autoclick/autoclick_unittest.cc
index c0610a44b4886efc34445914b51a19108e51ed91..9c04670a0548fdcbc0cd50480bea26ed08d555a2 100644
--- a/ash/autoclick/autoclick_unittest.cc
+++ b/ash/autoclick/autoclick_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "ash/autoclick/autoclick_controller.h"
+#include "ash/display/display_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ui/aura/test/test_window_delegate.h"
@@ -66,6 +67,11 @@ class AutoclickTest : public test::AshTestBase {
// Move mouse to deterministic location at the start of each test.
GetEventGenerator().MoveMouseTo(100, 100);
+
+ // Make sure the display is initialized so we don't fail the test due to any
+ // input events caused from creating the display.
+ Shell::GetInstance()->display_manager()->UpdateDisplays();
+ RunAllPendingInMessageLoop();
}
void TearDown() 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