summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/chrome_frame_test_utils.h
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 15:57:53 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 15:57:53 +0000
commitf8e0050398ee884d2cc342eeb8a2c08e5815e419 (patch)
tree4a0cd0c2eb7606a5b323438a2eb429fcf57d0278 /chrome_frame/test/chrome_frame_test_utils.h
parent2e4db56feeae5556d3ab6d9a01d09cbc4e88b99a (diff)
downloadchromium_src-f8e0050398ee884d2cc342eeb8a2c08e5815e419.zip
chromium_src-f8e0050398ee884d2cc342eeb8a2c08e5815e419.tar.gz
chromium_src-f8e0050398ee884d2cc342eeb8a2c08e5815e419.tar.bz2
Attempt to fix flake in FullTabDownloadTest.CF_DownloadFileFromPost.
Increase timeout for the file to appear from 2s to 3s, and take a snapshot when it doesn't appear in time. BUG=189099 TEST=chrome_frame_tests.exe Review URL: https://chromiumcodereview.appspot.com/12779010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/chrome_frame_test_utils.h')
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h
index bb3480df..5d2e44c 100644
--- a/chrome_frame/test/chrome_frame_test_utils.h
+++ b/chrome_frame/test/chrome_frame_test_utils.h
@@ -25,7 +25,6 @@
#include "base/time.h"
#include "base/win/registry.h"
#include "base/win/scoped_comptr.h"
-#include "chrome/test/base/ui_test_utils.h"
#include "chrome_frame/chrome_tab.h"
#include "chrome_frame/test/simulate_input.h"
#include "chrome_frame/test_utils.h"
@@ -58,6 +57,9 @@ base::ProcessHandle LaunchChrome(const std::wstring& url,
// not perform this initialization itself.
int CloseAllIEWindows();
+// Saves a screen snapshot to the desktop and logs its location.
+bool TakeSnapshotAndLog();
+
extern const wchar_t kIEImageName[];
extern const wchar_t kIEBrokerImageName[];
extern const char kChromeImageName[];
@@ -246,21 +248,7 @@ class TimedMsgLoop {
private:
static void SnapshotAndQuit() {
- base::FilePath snapshot;
- if (ui_test_utils::SaveScreenSnapshotToDesktop(&snapshot)) {
- testing::UnitTest* unit_test = testing::UnitTest::GetInstance();
- const testing::TestInfo* test_info = unit_test->current_test_info();
- std::string name;
- if (test_info != NULL) {
- name.append(test_info->test_case_name())
- .append(1, '.')
- .append(test_info->name());
- } else {
- name = "unknown test";
- }
- LOG(ERROR) << name << " timed out. Screen snapshot saved to "
- << snapshot.value();
- }
+ TakeSnapshotAndLog();
MessageLoop::current()->Quit();
}