diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 21:54:53 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 21:54:53 +0000 |
commit | d8369b60d7dafe4398a90e953aead9e4d93a8f57 (patch) | |
tree | 91f94aa39115c08d249b3870698cc0efa66d01f6 /chrome_frame | |
parent | 3ae48992d444dde7397bf84033f4276fa6b3131e (diff) | |
download | chromium_src-d8369b60d7dafe4398a90e953aead9e4d93a8f57.zip chromium_src-d8369b60d7dafe4398a90e953aead9e4d93a8f57.tar.gz chromium_src-d8369b60d7dafe4398a90e953aead9e4d93a8f57.tar.bz2 |
chrome_frame: Get rid of all occurrences of file_util::AppendToPath.
BUG=24874
TEST=trybots
Review URL: http://codereview.chromium.org/2637001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/http_server.cc | 7 | ||||
-rw-r--r-- | chrome_frame/test/http_server.h | 14 | ||||
-rw-r--r-- | chrome_frame/test/test_with_web_server.cc | 16 | ||||
-rw-r--r-- | chrome_frame/test/test_with_web_server.h | 6 |
4 files changed, 21 insertions, 22 deletions
diff --git a/chrome_frame/test/http_server.cc b/chrome_frame/test/http_server.cc index ae71c0b..91892e0 100644 --- a/chrome_frame/test/http_server.cc +++ b/chrome_frame/test/http_server.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -70,7 +70,6 @@ GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) { return server_->TestServerPage(WideToUTF8(relative_url)); } -std::wstring ChromeFrameHTTPServer::GetDataDir() { - return server_->GetDataDirectory().ToWStringHack(); +FilePath ChromeFrameHTTPServer::GetDataDir() { + return server_->GetDataDirectory(); } - diff --git a/chrome_frame/test/http_server.h b/chrome_frame/test/http_server.h index acac5b5..b902e09 100644 --- a/chrome_frame/test/http_server.h +++ b/chrome_frame/test/http_server.h @@ -1,6 +1,7 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #ifndef CHROME_FRAME_TEST_HTTP_SERVER_H_ #define CHROME_FRAME_TEST_HTTP_SERVER_H_ @@ -11,22 +12,21 @@ #include "base/ref_counted.h" #include "net/url_request/url_request_unittest.h" -// chrome frame specilization of http server from net. +class FilePath; + +// Chrome Frame specilization of http server from net. class ChromeFrameHTTPServer { public: void SetUp(); void TearDown(); bool WaitToFinish(int milliseconds); GURL Resolve(const wchar_t* relative_url); - std::wstring GetDataDir(); + FilePath GetDataDir(); - HTTPTestServer* server() { - return server_; - } + HTTPTestServer* server() { return server_; } protected: scoped_refptr<HTTPTestServer> server_; }; #endif // CHROME_FRAME_TEST_HTTP_SERVER_H_ - diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 5893716..9486135 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -61,7 +61,7 @@ void ChromeFrameTestWithWebServer::SetUp() { EXPECT_TRUE(server_.server() != NULL); if (server_.server()) { results_dir_ = server_.GetDataDir(); - file_util::AppendToPath(&results_dir_, L"dump"); + results_dir_ = results_dir_.AppendASCII("dump"); } } @@ -159,9 +159,9 @@ bool ChromeFrameTestWithWebServer::WaitForOnLoad(int milliseconds) { } bool ChromeFrameTestWithWebServer::ReadResultFile(const std::wstring& file_name, - std::string* data) { - std::wstring full_path = results_dir_; - file_util::AppendToPath(&full_path, file_name); + std::string* data) { + FilePath full_path(results_dir_); + full_path = full_path.Append(file_name); return file_util::ReadFileToString(full_path, data); } @@ -219,10 +219,11 @@ void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser, ASSERT_TRUE(ver_system || ver_user); bool system_install = ver_system ? true : false; - std::wstring cf_dll_path(installer::GetChromeInstallPath(system_install)); - file_util::AppendToPath(&cf_dll_path, + FilePath cf_dll_path = FilePath::FromWStringHack( + installer::GetChromeInstallPath(system_install)); + cf_dll_path = cf_dll_path.Append( ver_system ? ver_system->GetString() : ver_user->GetString()); - file_util::AppendToPath(&cf_dll_path, kChromeFrameDllName); + cf_dll_path = cf_dll_path.Append(kChromeFrameDllName); version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path); if (version_info) version = version_info->product_version(); @@ -900,4 +901,3 @@ TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_SetCookieTest) { chrome_frame_test::CloseAllIEWindows(); ASSERT_TRUE(CheckResultFile(L"FullTab_SetCookieTest", "OK")); } - diff --git a/chrome_frame/test/test_with_web_server.h b/chrome_frame/test/test_with_web_server.h index 2f3c05d7..16b03bc 100644 --- a/chrome_frame/test/test_with_web_server.h +++ b/chrome_frame/test/test_with_web_server.h @@ -1,6 +1,7 @@ -// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #ifndef CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ #define CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ @@ -90,7 +91,7 @@ class ChromeFrameTestWithWebServer: public testing::Test { } BrowserKind browser_; - std::wstring results_dir_; + FilePath results_dir_; ScopedHandle browser_handle_; ChromeFrameHTTPServer server_; // The on-disk path to our html test files. @@ -176,4 +177,3 @@ class SimpleWebServerTest { }; #endif // CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ - |