| 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/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| 11 #include "base/test/test_file_util.h" | 11 #include "base/test/test_file_util.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
| 14 #include "chrome/browser/browser.h" | |
| 15 #include "chrome/browser/platform_util.h" | 14 #include "chrome/browser/platform_util.h" |
| 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "chrome/test/automation/browser_proxy.h" | 19 #include "chrome/test/automation/browser_proxy.h" |
| 20 #include "chrome/test/automation/tab_proxy.h" | 20 #include "chrome/test/automation/tab_proxy.h" |
| 21 #include "chrome/test/automation/window_proxy.h" | 21 #include "chrome/test/automation/window_proxy.h" |
| 22 #include "chrome/test/ui/ui_test.h" | 22 #include "chrome/test/ui/ui_test.h" |
| 23 #include "gfx/native_widget_types.h" | 23 #include "gfx/native_widget_types.h" |
| 24 #include "grit/chromium_strings.h" | 24 #include "grit/chromium_strings.h" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 #endif // !defined(OS_MACOSX) | 271 #endif // !defined(OS_MACOSX) |
| 272 | 272 |
| 273 #if defined(OS_WIN) | 273 #if defined(OS_WIN) |
| 274 // This test verifies that Chrome can be launched with a user-data-dir path | 274 // This test verifies that Chrome can be launched with a user-data-dir path |
| 275 // which contains non ASCII characters. | 275 // which contains non ASCII characters. |
| 276 class LaunchBrowserWithNonAsciiUserDatadir : public UITest { | 276 class LaunchBrowserWithNonAsciiUserDatadir : public UITest { |
| 277 public: | 277 public: |
| 278 void SetUp() { | 278 void SetUp() { |
| 279 PathService::Get(base::DIR_TEMP, &tmp_profile_); | 279 PathService::Get(base::DIR_TEMP, &tmp_profile_); |
| 280 tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); | 280 tmp_profile_ = tmp_profile_.AppendASCII("tmp_profile"); |
| 281 tmp_profile_ = tmp_profile_.Append(L"Test Chrome Géraldine"); | 281 tmp_profile_ = tmp_profile_.Append(L"Test Chrome G�raldine"); |
| 282 | 282 |
| 283 // Create a fresh, empty copy of this directory. | 283 // Create a fresh, empty copy of this directory. |
| 284 file_util::Delete(tmp_profile_, true); | 284 file_util::Delete(tmp_profile_, true); |
| 285 file_util::CreateDirectory(tmp_profile_); | 285 file_util::CreateDirectory(tmp_profile_); |
| 286 | 286 |
| 287 launch_arguments_.AppendSwitchPath(switches::kUserDataDir, tmp_profile_); | 287 launch_arguments_.AppendSwitchPath(switches::kUserDataDir, tmp_profile_); |
| 288 } | 288 } |
| 289 | 289 |
| 290 bool LaunchAppWithProfile() { | 290 bool LaunchAppWithProfile() { |
| 291 UITest::SetUp(); | 291 UITest::SetUp(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 EXPECT_EQ(0, window_count); | 377 EXPECT_EQ(0, window_count); |
| 378 | 378 |
| 379 // Starting a browser window should work just fine. | 379 // Starting a browser window should work just fine. |
| 380 ASSERT_TRUE(IsBrowserRunning()); | 380 ASSERT_TRUE(IsBrowserRunning()); |
| 381 ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, true)); | 381 ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, true)); |
| 382 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 382 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
| 383 EXPECT_EQ(1, window_count); | 383 EXPECT_EQ(1, window_count); |
| 384 } | 384 } |
| 385 | 385 |
| 386 } // namespace | 386 } // namespace |
| OLD | NEW |