summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-25 09:58:07 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-25 09:58:07 +0000
commitb0269e8ca2fc668a5d325f3889a9ec417990c486 (patch)
tree00373f0ccba2a0573c2e7d7fe6658fa0d2eb5f4c /chrome/test/ui_test_utils.cc
parente1ab8f9d400d97f6fceaf0db350b839c3d6ec830 (diff)
downloadchromium_src-b0269e8ca2fc668a5d325f3889a9ec417990c486.zip
chromium_src-b0269e8ca2fc668a5d325f3889a9ec417990c486.tar.gz
chromium_src-b0269e8ca2fc668a5d325f3889a9ec417990c486.tar.bz2
Add some more traces to figure out timeout in PrepopulateRespectBlank
interactive test. I've run this about 15 times through the try server over the course of the last 20 hours or so but it never produced a failure. I have seen though failures for others running this test, so I'm checking this in and monitoring other people's CLs on the try server. Once I have the data I need I will revert these changes. TBR=phadjan.jr BUG=62937 TEST=Tracking down problem in test Review URL: http://codereview.chromium.org/5302005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index cf71bc3..b7db307 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -341,6 +341,12 @@ bool ExecuteJavaScriptHelper(RenderViewHost* render_view_host,
return true;
}
+void Checkpoint(const char* message, const base::TimeTicks& start_time) {
+ LOG(INFO) << message << " : "
+ << (base::TimeTicks::Now() - start_time).InMilliseconds()
+ << " ms" << std::flush;
+}
+
} // namespace
void RunMessageLoop() {
@@ -605,10 +611,14 @@ bool SendKeyPressSync(const Browser* browser,
bool shift,
bool alt,
bool command) {
+ base::TimeTicks start_time = base::TimeTicks::Now();
+ Checkpoint("SendKeyPressSync", start_time);
+
gfx::NativeWindow window = NULL;
if (!GetNativeWindow(browser, &window))
return false;
+ Checkpoint("SendKeyPressNotifyWhenDone", start_time);
if (!ui_controls::SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command,
new MessageLoop::QuitTask())) {
@@ -618,7 +628,9 @@ bool SendKeyPressSync(const Browser* browser,
// 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).
+ Checkpoint("Running loop", start_time);
RunMessageLoop();
+ Checkpoint("Check if HasFatalFailure", start_time);
return !testing::Test::HasFatalFailure();
}