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

Unified Diff: chrome/test/base/interactive_test_utils.cc

Issue 2286853002: Add temporary debug logging for crbug.com/639350. (Closed)
Patch Set: Add logging for mouse moves and events. 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 | « chrome/test/base/interactive_test_utils.h ('k') | chrome/test/base/interactive_test_utils_common_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/interactive_test_utils.cc
diff --git a/chrome/test/base/interactive_test_utils.cc b/chrome/test/base/interactive_test_utils.cc
index e6681fbc986f4a061530b043a1d33ae2b5586372..2a5fc6138b82c5cb9a45d094cf5e4635484d318c 100644
--- a/chrome/test/base/interactive_test_utils.cc
+++ b/chrome/test/base/interactive_test_utils.cc
@@ -10,6 +10,9 @@
namespace ui_test_utils {
+// TODO(msw): Remove flaky test debug logging for http://crbug.com/639350.
+bool g_crbug_639350_logging = false;
+
namespace {
bool GetNativeWindow(const Browser* browser, gfx::NativeWindow* native_window) {
@@ -49,26 +52,40 @@ bool SendKeyPressToWindowSync(const gfx::NativeWindow window,
bool shift,
bool alt,
bool command) {
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync A";
scoped_refptr<content::MessageLoopRunner> runner =
new content::MessageLoopRunner;
bool result;
result = ui_controls::SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, runner->QuitClosure());
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync B";
#if defined(OS_WIN)
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync C";
if (!result && ui_test_utils::ShowAndFocusNativeWindow(window)) {
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync D";
result = ui_controls::SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, runner->QuitClosure());
}
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync E";
#endif
if (!result) {
LOG(ERROR) << "ui_controls::SendKeyPressNotifyWhenDone failed";
return false;
}
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync F: RUN RUNNER";
// Run the message loop. It'll stop running when either the key was received
// or the test timed out (in which case testing::Test::HasFatalFailure should
// be set).
runner->Run();
+ if (g_crbug_639350_logging)
+ LOG(ERROR) << "crbug.com/639350 SendKeyPressToWindowSync G: RUNNER DONE";
return !testing::Test::HasFatalFailure();
}
« no previous file with comments | « chrome/test/base/interactive_test_utils.h ('k') | chrome/test/base/interactive_test_utils_common_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698