OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "base/test/test_file_util.h" | 9 #include "base/test/test_file_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 public: | 268 public: |
269 void SetUp() { | 269 void SetUp() { |
270 PathService::Get(base::DIR_TEMP, &tmp_profile_); | 270 PathService::Get(base::DIR_TEMP, &tmp_profile_); |
271 tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); | 271 tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); |
272 tmp_profile_ = tmp_profile_.Append(L"Test Chrome Géraldine"); | 272 tmp_profile_ = tmp_profile_.Append(L"Test Chrome Géraldine"); |
273 | 273 |
274 // Create a fresh, empty copy of this directory. | 274 // Create a fresh, empty copy of this directory. |
275 file_util::Delete(tmp_profile_, true); | 275 file_util::Delete(tmp_profile_, true); |
276 file_util::CreateDirectory(tmp_profile_); | 276 file_util::CreateDirectory(tmp_profile_); |
277 | 277 |
278 launch_arguments_.AppendSwitchWithValue(switches::kUserDataDir, | 278 launch_arguments_.AppendSwitchPath(switches::kUserDataDir, tmp_profile_); |
279 tmp_profile_.ToWStringHack()); | |
280 } | 279 } |
281 | 280 |
282 bool LaunchAppWithProfile() { | 281 bool LaunchAppWithProfile() { |
283 UITest::SetUp(); | 282 UITest::SetUp(); |
284 return true; | 283 return true; |
285 } | 284 } |
286 | 285 |
287 void TearDown() { | 286 void TearDown() { |
288 UITest::TearDown(); | 287 UITest::TearDown(); |
289 EXPECT_TRUE(file_util::DieFileDie(tmp_profile_, true)); | 288 EXPECT_TRUE(file_util::DieFileDie(tmp_profile_, true)); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 ASSERT_TRUE(browser->RunCommand(IDC_CLOSE_WINDOW)); | 346 ASSERT_TRUE(browser->RunCommand(IDC_CLOSE_WINDOW)); |
348 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 347 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
349 EXPECT_EQ(0, window_count); | 348 EXPECT_EQ(0, window_count); |
350 ASSERT_TRUE(IsBrowserRunning()); | 349 ASSERT_TRUE(IsBrowserRunning()); |
351 ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, true)); | 350 ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, true)); |
352 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 351 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
353 EXPECT_EQ(1, window_count); | 352 EXPECT_EQ(1, window_count); |
354 } | 353 } |
355 | 354 |
356 } // namespace | 355 } // namespace |
OLD | NEW |