diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 05:57:04 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 05:57:04 +0000 |
commit | dcc04f557ba0c524626d0aad24fd15081da042c6 (patch) | |
tree | 25c8fb6333fdec5eea6e7f860c9389c57ffd5898 /chrome/browser/browser_uitest.cc | |
parent | ed02c3263de09162ba21961ec80b56c25f52bada (diff) | |
download | chromium_src-dcc04f557ba0c524626d0aad24fd15081da042c6.zip chromium_src-dcc04f557ba0c524626d0aad24fd15081da042c6.tar.gz chromium_src-dcc04f557ba0c524626d0aad24fd15081da042c6.tar.bz2 |
Attempting to reland this CL as this does not seem related to the ui test failures. Will watch the build
after I commit.
Revert 40994 - Revert "Launching Chrome with a userdatadir command line switch containing a non ASCII ..."
Speculative revert to try to fix win dbg MultipartResponseUITest.SingleVisit failures.
This reverts commit r40981
TBR=tony
Review URL: http://codereview.chromium.org/707001
TBR=mattm@chromium.org
Review URL: http://codereview.chromium.org/712001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41003 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 5ceb55f..fdde99d 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -4,8 +4,10 @@ #include "app/gfx/native_widget_types.h" #include "base/file_path.h" +#include "base/file_util.h" #include "base/string_util.h" #include "base/sys_info.h" +#include "base/test/test_file_util.h" #include "base/values.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/common/chrome_switches.h" @@ -305,4 +307,44 @@ TEST_F(KioskModeTest, EnableKioskModeTest) { } #endif +#if defined(OS_WIN) +// This test verifies that Chrome can be launched with a user-data-dir path +// which contains non ASCII characters. +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"); + + // Create a fresh, empty copy of this directory. + file_util::Delete(tmp_profile_, true); + file_util::CreateDirectory(tmp_profile_); + + launch_arguments_.AppendSwitchWithValue(switches::kUserDataDir, + tmp_profile_.ToWStringHack()); + } + + bool LaunchAppWithProfile() { + UITest::SetUp(); + return true; + } + + void TearDown() { + UITest::TearDown(); + EXPECT_TRUE(file_util::DieFileDie(tmp_profile_, true)); + } + +public: + FilePath tmp_profile_; +}; + +TEST_F(LaunchBrowserWithNonAsciiUserDatadir, TestNonAsciiUserDataDir) { + ASSERT_TRUE(LaunchAppWithProfile()); + // Verify that the window is present. + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); + ASSERT_TRUE(browser.get()); +} +#endif + } // namespace |