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

Unified Diff: chrome/test/ui/ui_test.cc

Issue 159658: Remove duplication of DieFileDie, and move it to proper location. (Closed)
Patch Set: Created 11 years, 5 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/ui/ui_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_test.cc
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 98929ddffce8db38390d284c4b9f82fb41a33d11..25ec70185a378d077e7168564ab4ccd45f94f1e2 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -83,19 +83,6 @@ const wchar_t kEnableErrorDialogs[] = L"enable-errdialogs";
// BROWSER_WRAPPER env variable to wrap the browser process.
// #define WAIT_FOR_DEBUGGER_ON_OPEN 1
-bool UITest::DieFileDie(const FilePath& file, bool recurse) {
- if (!file_util::PathExists(file))
- return true;
-
- // Sometimes Delete fails, so try a few more times.
- for (int i = 0; i < 25; ++i) {
- if (file_util::Delete(file, recurse))
- return true;
- PlatformThread::Sleep(action_max_timeout_ms() / 25);
- }
- return false;
-}
-
UITest::UITest()
: testing::Test(),
launch_arguments_(L""),
@@ -429,7 +416,7 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
"short to delete safely. Please check the user-data-dir "
"argument and try again.";
if (clear_profile)
- ASSERT_TRUE(DieFileDie(user_data_dir_, true));
+ ASSERT_TRUE(file_util::DieFileDie(user_data_dir_, true));
if (!template_user_data_.empty()) {
// Recursively copy the template directory to the user_data_dir.
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698