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-12-01 15:19:40 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 15:19:40 +0000
commit3b94427c99bdf12836fd455eeb1499fdde511e26 (patch)
tree07d81236cb8b177a565d10a808a5601ef6c0ff5b /chrome/test/ui_test_utils.cc
parentb2fcd0e0c8850eda2135b6fe270af5f453682f23 (diff)
downloadchromium_src-3b94427c99bdf12836fd455eeb1499fdde511e26.zip
chromium_src-3b94427c99bdf12836fd455eeb1499fdde511e26.tar.gz
chromium_src-3b94427c99bdf12836fd455eeb1499fdde511e26.tar.bz2
Revert 67849 - Figure out error in test PrepopulateRespectBlank.
Revert previous traces and add one targeted test. My traces seem to indicate that something else than a Chrome window has focus when the test fails. Lets figure out what that is... BUG=62937 TEST=Tracking down problem in test Review URL: http://codereview.chromium.org/5463001 TBR=finnur@chromium.org Review URL: http://codereview.chromium.org/5451002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index d6310f3..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() {
@@ -606,11 +612,13 @@ bool SendKeyPressSync(const Browser* browser,
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())) {
@@ -620,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();
}