Chromium Code Reviews| Index: chrome/browser/ui/tests/browser_uitest.cc |
| diff --git a/chrome/browser/ui/tests/browser_uitest.cc b/chrome/browser/ui/tests/browser_uitest.cc |
| index b756caa438481cc539501f26fedcc8a1dda34c13..c6720ad47092e841256babb86a5f3e6576a26170 100644 |
| --- a/chrome/browser/ui/tests/browser_uitest.cc |
| +++ b/chrome/browser/ui/tests/browser_uitest.cc |
| @@ -280,15 +280,13 @@ TEST_F(KioskModeTest, EnableKioskModeTest) { |
| class LaunchBrowserWithNonAsciiUserDatadir : public UITest { |
| public: |
| void SetUp() { |
| - PathService::Get(base::DIR_TEMP, &tmp_profile_); |
| - tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); |
| - tmp_profile_ = tmp_profile_.Append(L"Test Chrome G�raldine"); |
| + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| + FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile"); |
| + tmp_profile = tmp_profile.Append(L"Test Chrome G�raldine"); |
| - // Create a fresh, empty copy of this directory. |
| - file_util::Delete(tmp_profile_, true); |
| - file_util::CreateDirectory(tmp_profile_); |
| + file_util::CreateDirectory(tmp_profile); |
|
Paweł Hajdan Jr.
2011/04/11 18:16:53
Could you check the return value of that? Just ASS
Mike West
2011/04/12 07:04:04
Done.
|
| - launch_arguments_.AppendSwitchPath(switches::kUserDataDir, tmp_profile_); |
| + launch_arguments_.AppendSwitchPath(switches::kUserDataDir, tmp_profile); |
| } |
| bool LaunchAppWithProfile() { |
| @@ -298,11 +296,10 @@ public: |
| void TearDown() { |
|
Paweł Hajdan Jr.
2011/04/11 18:16:53
You can remove the entire TearDown now.
Mike West
2011/04/12 07:04:04
Done.
|
| UITest::TearDown(); |
| - EXPECT_TRUE(file_util::DieFileDie(tmp_profile_, true)); |
| } |
| public: |
| - FilePath tmp_profile_; |
| + ScopedTempDir temp_dir_; |
| }; |
| TEST_F(LaunchBrowserWithNonAsciiUserDatadir, TestNonAsciiUserDataDir) { |