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

Unified Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 12779010: Attempt to fix flake in FullTabDownloadTest.CF_DownloadFileFromPost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: motion to fix other test binaries Created 7 years, 9 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_frame/test/chrome_frame_test_utils.h ('k') | chrome_frame/test/mock_ie_event_sink_actions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/chrome_frame_test_utils.cc
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 5e77f93805783c2e19f3dd2ec18ef793a2c36f79..7e14bca49bb520fb4490db29ba68cc877e907c6c 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -30,6 +30,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/test/base/ui_test_utils.h"
#include "chrome_frame/utils.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -239,6 +240,29 @@ base::ProcessHandle LaunchIE(const std::wstring& url) {
return LaunchExecutable(kIEImageName, url);
}
+bool TakeSnapshotAndLog() {
+ 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";
+ }
+
+ base::FilePath snapshot;
+ if (!ui_test_utils::SaveScreenSnapshotToDesktop(&snapshot)) {
+ LOG(ERROR) << "Failed saving screen snapshot for " << name;
+ return false;
+ }
+
+ LOG(ERROR) << "Saved screen snapshot for " << name << " to "
+ << snapshot.value();
+ return true;
+}
+
int CloseAllIEWindows() {
int ret = 0;
« no previous file with comments | « chrome_frame/test/chrome_frame_test_utils.h ('k') | chrome_frame/test/mock_ie_event_sink_actions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698