diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 23:21:31 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 23:21:31 +0000 |
commit | 5cc06369ee53fbde978506263f0b15735560cfd6 (patch) | |
tree | 635e0d9c60bb45f633ad220701e0a7513018f7fc /chrome/test/ui | |
parent | c8bdcb753bcbe960bc239419180d085534ef8432 (diff) | |
download | chromium_src-5cc06369ee53fbde978506263f0b15735560cfd6.zip chromium_src-5cc06369ee53fbde978506263f0b15735560cfd6.tar.gz chromium_src-5cc06369ee53fbde978506263f0b15735560cfd6.tar.bz2 |
linux: pass a bunch more ui tests.
Mostly random portability fixes: use portable functions, use FilePath, etc.
Review URL: http://codereview.chromium.org/62117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.h | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 804bf04..d273175 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -82,8 +82,7 @@ const wchar_t kEnableErrorDialogs[] = L"enable-errdialogs"; // attach. // #define WAIT_FOR_DEBUGGER_ON_OPEN 1 -// static -bool UITest::DieFileDie(const std::wstring& file, bool recurse) { +bool UITest::DieFileDie(const FilePath& file, bool recurse) { if (!file_util::PathExists(file)) return true; @@ -95,6 +94,9 @@ bool UITest::DieFileDie(const std::wstring& file, bool recurse) { } return false; } +bool UITest::DieFileDie(const std::wstring& file, bool recurse) { + return DieFileDie(FilePath::FromWStringHack(file), recurse); +} UITest::UITest() : testing::Test(), diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index c059ded..75ecae2 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -63,9 +63,14 @@ class UITest : public testing::Test { // ********* Utility functions ********* - // Tries to delete the specified file/directory returning true on success. - // This differs from file_util::Delete in that it repeatedly invokes Delete - // until successful, or a timeout is reached. Returns true on success. + // Tries to delete the specified file/directory returning true on + // success. This differs from file_util::Delete in that it + // repeatedly invokes Delete until successful, or a timeout is + // reached. (This retrying is to work around Windows file locks + // and shouldn't be necessary on POSIX, but it can't hurt.) + // Returns true on success. + bool DieFileDie(const FilePath& file, bool recurse); + // Deprecated backwards-compat version. bool DieFileDie(const std::wstring& file, bool recurse); // Launches the browser and IPC testing server. |