diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 20:00:13 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 20:00:13 +0000 |
commit | ef5ff1b40f1024d834620f5cede62dfd4aea6e0c (patch) | |
tree | 3935dae6b7f1ab45c01bc8f66d6bfee7338d9a9a | |
parent | 0bbb1b1f9842366babce756ab2f1713832be63de (diff) | |
download | chromium_src-ef5ff1b40f1024d834620f5cede62dfd4aea6e0c.zip chromium_src-ef5ff1b40f1024d834620f5cede62dfd4aea6e0c.tar.gz chromium_src-ef5ff1b40f1024d834620f5cede62dfd4aea6e0c.tar.bz2 |
Fix to use FilePath version of PathService::Get.
BUG=None
TEST=None
Original Review URL: http://codereview.chromium.org/174189
Patch from Thiago Farina <thiago.farina@gmail.com>.
Review URL: http://codereview.chromium.org/193047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25778 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | app/resource_bundle_win.cc | 10 | ||||
-rw-r--r-- | base/file_version_info.cc | 2 | ||||
-rw-r--r-- | base/file_version_info_unittest.cc | 23 | ||||
-rw-r--r-- | chrome/browser/blocked_popup_container_interactive_uitest.cc | 16 | ||||
-rw-r--r-- | chrome/browser/dom_ui/chrome_url_data_manager.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/safari_importer_unittest.mm | 7 | ||||
-rw-r--r-- | chrome/browser/process_singleton_win.cc | 5 | ||||
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 11 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_unittest.cc | 16 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_parser_unittest.cc | 26 | ||||
-rw-r--r-- | chrome/common/json_value_serializer_perftest.cc | 12 | ||||
-rw-r--r-- | chrome/test/ui/omnibox_uitest.cc | 6 | ||||
-rw-r--r-- | net/url_request/url_request_unittest.h | 4 | ||||
-rw-r--r-- | webkit/glue/unittest_test_server.h | 2 |
14 files changed, 69 insertions, 73 deletions
diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc index 30a9ff7..dcb669e 100644 --- a/app/resource_bundle_win.cc +++ b/app/resource_bundle_win.cc @@ -74,14 +74,14 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) { void ResourceBundle::LoadThemeResources() { DCHECK(NULL == theme_data_) << "theme dll already loaded"; - std::wstring theme_data_path; + FilePath theme_data_path; PathService::Get(app::DIR_THEMES, &theme_data_path); - file_util::AppendToPath(&theme_data_path, L"default.dll"); + theme_data_path = theme_data_path.AppendASCII("default.dll"); // The dll should only have resources, not executable code. - theme_data_ = LoadLibraryEx(theme_data_path.c_str(), NULL, - GetDataDllLoadFlags()); - DCHECK(theme_data_ != NULL) << "unable to load " << theme_data_path; + theme_data_ = LoadLibraryEx(theme_data_path.value().c_str(), NULL, + GetDataDllLoadFlags()); + DCHECK(theme_data_ != NULL) << "unable to load " << theme_data_path.value(); } /* static */ diff --git a/base/file_version_info.cc b/base/file_version_info.cc index 4f7f23d..f9bee21 100644 --- a/base/file_version_info.cc +++ b/base/file_version_info.cc @@ -32,7 +32,7 @@ typedef struct { // static FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() { - std::wstring app_path; + FilePath app_path; if (!PathService::Get(base::FILE_MODULE, &app_path)) return NULL; diff --git a/base/file_version_info_unittest.cc b/base/file_version_info_unittest.cc index 43b1fcc..676e950 100644 --- a/base/file_version_info_unittest.cc +++ b/base/file_version_info_unittest.cc @@ -13,12 +13,12 @@ namespace { class FileVersionInfoTest : public testing::Test { }; -std::wstring GetTestDataPath() { - std::wstring path; +FilePath GetTestDataPath() { + FilePath path; PathService::Get(base::DIR_SOURCE_ROOT, &path); - file_util::AppendToPath(&path, L"base"); - file_util::AppendToPath(&path, L"data"); - file_util::AppendToPath(&path, L"file_version_info_unittest"); + path = path.AppendASCII("base"); + path = path.AppendASCII("data"); + path = path.AppendASCII("file_version_info_unittest"); return path; } @@ -47,12 +47,11 @@ TEST(FileVersionInfoTest, HardCodedProperties) { L"This is the legal copyright", // legal_copyright L"This is the legal trademarks", // legal_trademarks L"This is the last change", // last_change - }; for (int i = 0; i < arraysize(kDLLNames); ++i) { - std::wstring dll_path = GetTestDataPath(); - file_util::AppendToPath(&dll_path, kDLLNames[i]); + FilePath dll_path = GetTestDataPath(); + dll_path = dll_path.Append(kDLLNames[i]); scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfo(dll_path)); @@ -93,8 +92,8 @@ TEST(FileVersionInfoTest, IsOfficialBuild) { ASSERT_EQ(arraysize(kDLLNames), arraysize(kExpected)); for (int i = 0; i < arraysize(kDLLNames); ++i) { - std::wstring dll_path = GetTestDataPath(); - file_util::AppendToPath(&dll_path, kDLLNames[i]); + FilePath dll_path = GetTestDataPath(); + dll_path = dll_path.Append(kDLLNames[i]); scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfo(dll_path)); @@ -105,8 +104,8 @@ TEST(FileVersionInfoTest, IsOfficialBuild) { #endif TEST(FileVersionInfoTest, CustomProperties) { - std::wstring dll_path = GetTestDataPath(); - file_util::AppendToPath(&dll_path, L"FileVersionInfoTest1.dll"); + FilePath dll_path = GetTestDataPath(); + dll_path = dll_path.AppendASCII("FileVersionInfoTest1.dll"); scoped_ptr<FileVersionInfo> version_info( FileVersionInfo::CreateFileVersionInfo(dll_path)); diff --git a/chrome/browser/blocked_popup_container_interactive_uitest.cc b/chrome/browser/blocked_popup_container_interactive_uitest.cc index 57cb771..c43be7d 100644 --- a/chrome/browser/blocked_popup_container_interactive_uitest.cc +++ b/chrome/browser/blocked_popup_container_interactive_uitest.cc @@ -37,10 +37,10 @@ class BlockedPopupContainerInteractiveTest : public UITest { ASSERT_TRUE(tab_.get()); } - void NavigateMainTabTo(const std::wstring& file_name) { + void NavigateMainTabTo(const std::string& file_name) { FilePath filename(test_data_directory_); filename = filename.AppendASCII("constrained_files"); - filename = filename.Append(FilePath::FromWStringHack(file_name)); + filename = filename.AppendASCII(file_name); ASSERT_TRUE(tab_->NavigateToURL(net::FilePathToFileURL(filename))); } @@ -62,7 +62,7 @@ class BlockedPopupContainerInteractiveTest : public UITest { }; TEST_F(BlockedPopupContainerInteractiveTest, TestOpenAndResizeTo) { - NavigateMainTabTo(L"constrained_window_onload_resizeto.html"); + NavigateMainTabTo("constrained_window_onload_resizeto.html"); SimulateClickInCenterOf(window_); ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 1000)); @@ -140,7 +140,7 @@ bool ParseCountOutOfTitle(const std::wstring& title, int* output) { // Tests that in the window.open() equivalent of a fork bomb, we stop building // windows. TEST_F(BlockedPopupContainerInteractiveTest, DontSpawnEndlessPopups) { - NavigateMainTabTo(L"infinite_popups.html"); + NavigateMainTabTo("infinite_popups.html"); SimulateClickInCenterOf(window_); ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 1000)); @@ -183,7 +183,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, DontSpawnEndlessPopups) { // Make sure that we refuse to close windows when a constrained popup is // displayed. TEST_F(BlockedPopupContainerInteractiveTest, WindowOpenWindowClosePopup) { - NavigateMainTabTo(L"openclose_main.html"); + NavigateMainTabTo("openclose_main.html"); SimulateClickInCenterOf(window_); ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 5000)); @@ -202,7 +202,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, WindowOpenWindowClosePopup) { } TEST_F(BlockedPopupContainerInteractiveTest, BlockAlertFromBlockedPopup) { - NavigateMainTabTo(L"block_alert.html"); + NavigateMainTabTo("block_alert.html"); // Wait for there to be an app modal dialog (and fail if it's shown). ASSERT_FALSE(automation()->WaitForAppModalDialog(4000)); @@ -219,7 +219,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, BlockAlertFromBlockedPopup) { } TEST_F(BlockedPopupContainerInteractiveTest, ShowAlertFromNormalPopup) { - NavigateMainTabTo(L"show_alert.html"); + NavigateMainTabTo("show_alert.html"); SimulateClickInCenterOf(window_); ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 5000)); @@ -246,7 +246,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, ShowAlertFromNormalPopup) { // Make sure that window focus works while creating a popup window so that we // don't TEST_F(BlockedPopupContainerInteractiveTest, DontBreakOnBlur) { - NavigateMainTabTo(L"window_blur_test.html"); + NavigateMainTabTo("window_blur_test.html"); SimulateClickInCenterOf(window_); // Wait for the popup window to open. diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc index 4e3bd43..c3ef325 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.cc +++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc @@ -116,7 +116,7 @@ void RegisterURLRequestChromeJob() { } void UnregisterURLRequestChromeJob() { - std::wstring inspector_dir; + FilePath inspector_dir; if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { chrome_url_data_manager.RemoveFileSource("inspector"); chrome_url_data_manager.RemoveFileSource(chrome::kChromeUIDevToolsHost); diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm index 78b4f65..94d2517 100644 --- a/chrome/browser/importer/safari_importer_unittest.mm +++ b/chrome/browser/importer/safari_importer_unittest.mm @@ -17,12 +17,11 @@ // structure as ~/Library in the Chrome test data directory. // This function returns the path to that directory. FilePath GetTestSafariLibraryPath() { - std::wstring test_dir_wstring; - PathService::Get(chrome::DIR_TEST_DATA, &test_dir_wstring); - FilePath test_dir = FilePath::FromWStringHack(test_dir_wstring); + FilePath test_dir; + PathService::Get(chrome::DIR_TEST_DATA, &test_dir); // Our simulated ~/Library directory - test_dir = test_dir.Append("safari_import"); + test_dir = test_dir.AppendASCII("safari_import"); return test_dir; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc index 3c48bb8..bf048aa 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -145,12 +145,13 @@ void ProcessSingleton::Create() { ATOM clazz = RegisterClassEx(&wc); DCHECK(clazz); - std::wstring user_data_dir; + FilePath user_data_dir; PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); // Set the window's title to the path of our user data directory so other // Chrome instances can decide if they should forward to us or not. - window_ = CreateWindow(chrome::kMessageWindowClass, user_data_dir.c_str(), + window_ = CreateWindow(chrome::kMessageWindowClass, + user_data_dir.value().c_str(), 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0); DCHECK(window_); diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index a280be2..620dd2c 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -80,11 +80,11 @@ FuncT WireExport(HMODULE module, const char* export_name) { } HMODULE LoadRLZLibraryInternal(int directory_key) { - std::wstring rlz_path; + FilePath rlz_path; if (!PathService::Get(directory_key, &rlz_path)) return NULL; - file_util::AppendToPath(&rlz_path, L"rlz.dll"); - return ::LoadLibraryW(rlz_path.c_str()); + rlz_path = rlz_path.AppendASCII("rlz.dll"); + return ::LoadLibraryW(rlz_path.value().c_str()); } bool LoadRLZLibrary(int directory_key) { @@ -261,12 +261,11 @@ class DelayedInitTask : public Task { bool IsGoogleDefaultSearch() { if (!g_browser_process) return false; - std::wstring user_data_dir; + FilePath user_data_dir; if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return false; ProfileManager* profile_manager = g_browser_process->profile_manager(); - Profile* profile = profile_manager-> - GetDefaultProfile(FilePath::FromWStringHack(user_data_dir)); + Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); if (!profile) return false; const TemplateURL* url_template = diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index 5c4871a..4542b5c 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -1038,7 +1038,7 @@ void PrintStat(const char* name) { LOG(INFO) << StringPrintf("%s %d", name, value); } -std::wstring GetFullSBDataPath(const std::wstring& path) { +FilePath GetFullSBDataPath(const std::wstring& path) { FilePath full_path; CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &full_path)); full_path = full_path.AppendASCII("chrome"); @@ -1047,7 +1047,7 @@ std::wstring GetFullSBDataPath(const std::wstring& path) { full_path = full_path.AppendASCII("safe_browsing"); full_path = full_path.Append(FilePath::FromWStringHack(path)); CHECK(file_util::PathExists(full_path)); - return full_path.ToWStringHack(); + return full_path; } struct ChunksInfo { @@ -1070,9 +1070,8 @@ void PeformUpdate(const std::wstring& initial_db, file_util::Delete(path, false); if (!initial_db.empty()) { - std::wstring full_initial_db = GetFullSBDataPath(initial_db); - ASSERT_TRUE(file_util::CopyFile( - FilePath::FromWStringHack(full_initial_db), path)); + FilePath full_initial_db = GetFullSBDataPath(initial_db); + ASSERT_TRUE(file_util::CopyFile(full_initial_db, path)); } SafeBrowsingDatabase* database = SafeBrowsingDatabase::Create(); @@ -1129,9 +1128,8 @@ void UpdateDatabase(const std::wstring& initial_db, SafeBrowsingProtocolParser parser; if (!updates_path.empty()) { - std::wstring data_dir = GetFullSBDataPath(updates_path); - file_util::FileEnumerator file_enum( - FilePath::FromWStringHack(data_dir), false, + FilePath data_dir = GetFullSBDataPath(updates_path); + file_util::FileEnumerator file_enum(data_dir, false, file_util::FileEnumerator::FILES); while (true) { std::wstring file = file_enum.Next().ToWStringHack(); @@ -1166,7 +1164,7 @@ void UpdateDatabase(const std::wstring& initial_db, std::vector<SBChunkDelete>* deletes = new std::vector<SBChunkDelete>; if (!response_path.empty()) { std::string update; - std::wstring full_response_path = GetFullSBDataPath(response_path); + FilePath full_response_path = GetFullSBDataPath(response_path); if (file_util::ReadFileToString(full_response_path, &update)) { int next_update; bool result, rekey, reset; diff --git a/chrome/browser/search_engines/template_url_parser_unittest.cc b/chrome/browser/search_engines/template_url_parser_unittest.cc index 77c794c..18dcad2 100644 --- a/chrome/browser/search_engines/template_url_parser_unittest.cc +++ b/chrome/browser/search_engines/template_url_parser_unittest.cc @@ -33,13 +33,13 @@ class TemplateURLParserTest : public testing::Test { // the data dir). The TemplateURL is placed in template_url_. // The result of Parse is stored in the field parse_result_ (this doesn't // use a return value due to internally using ASSERT_). - void ParseFile(const std::wstring& file_name, + void ParseFile(const std::string& file_name, TemplateURLParser::ParameterFilter* filter) { FilePath full_path; parse_result_ = false; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &full_path)); full_path = full_path.AppendASCII("osdd"); - full_path = full_path.Append(FilePath::FromWStringHack(file_name)); + full_path = full_path.AppendASCII(file_name); ASSERT_TRUE(file_util::PathExists(full_path)); std::string contents; @@ -61,28 +61,28 @@ class TemplateURLParserTest : public testing::Test { TEST_F(TemplateURLParserTest, FailOnBogusURL) { if (IsDisabled()) return; - ParseFile(L"bogus.xml", NULL); + ParseFile("bogus.xml", NULL); EXPECT_FALSE(parse_result_); } TEST_F(TemplateURLParserTest, PassOnHTTPS) { if (IsDisabled()) return; - ParseFile(L"https.xml", NULL); + ParseFile("https.xml", NULL); EXPECT_TRUE(parse_result_); } TEST_F(TemplateURLParserTest, FailOnPost) { if (IsDisabled()) return; - ParseFile(L"post.xml", NULL); + ParseFile("post.xml", NULL); EXPECT_FALSE(parse_result_); } TEST_F(TemplateURLParserTest, TestDictionary) { if (IsDisabled()) return; - ParseFile(L"dictionary.xml", NULL); + ParseFile("dictionary.xml", NULL); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"Dictionary.com", template_url_.short_name()); EXPECT_TRUE(template_url_.GetFavIconURL() == @@ -96,7 +96,7 @@ TEST_F(TemplateURLParserTest, TestDictionary) { TEST_F(TemplateURLParserTest, TestMSDN) { if (IsDisabled()) return; - ParseFile(L"msdn.xml", NULL); + ParseFile("msdn.xml", NULL); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"Search \" MSDN", template_url_.short_name()); EXPECT_TRUE(template_url_.GetFavIconURL() == @@ -110,7 +110,7 @@ TEST_F(TemplateURLParserTest, TestMSDN) { TEST_F(TemplateURLParserTest, TestWikipedia) { if (IsDisabled()) return; - ParseFile(L"wikipedia.xml", NULL); + ParseFile("wikipedia.xml", NULL); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"Wikipedia (English)", template_url_.short_name()); EXPECT_TRUE(template_url_.GetFavIconURL() == @@ -131,7 +131,7 @@ TEST_F(TemplateURLParserTest, TestWikipedia) { TEST_F(TemplateURLParserTest, NoCrashOnEmptyAttributes) { if (IsDisabled()) return; - ParseFile(L"url_with_no_attributes.xml", NULL); + ParseFile("url_with_no_attributes.xml", NULL); } // Filters any param which as an occurrence of name_str_ in its name or an @@ -161,7 +161,7 @@ TEST_F(TemplateURLParserTest, TestFirefoxEbay) { // This file uses the Parameter extension // (see http://www.opensearch.org/Specifications/OpenSearch/Extensions/Parameter/1.0) ParamFilterImpl filter("ebay", "ebay"); - ParseFile(L"firefox_ebay.xml", &filter); + ParseFile("firefox_ebay.xml", &filter); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"eBay", template_url_.short_name()); EXPECT_TRUE(template_url_.url() != NULL); @@ -182,7 +182,7 @@ TEST_F(TemplateURLParserTest, TestFirefoxWebster) { return; // This XML file uses a namespace. ParamFilterImpl filter("", "Mozilla"); - ParseFile(L"firefox_webster.xml", &filter); + ParseFile("firefox_webster.xml", &filter); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"Webster", template_url_.short_name()); EXPECT_TRUE(template_url_.url() != NULL); @@ -200,7 +200,7 @@ TEST_F(TemplateURLParserTest, TestFirefoxYahoo) { return; // This XML file uses a namespace. ParamFilterImpl filter("", "Mozilla"); - ParseFile(L"firefox_yahoo.xml", &filter); + ParseFile("firefox_yahoo.xml", &filter); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"Yahoo", template_url_.short_name()); EXPECT_TRUE(template_url_.url() != NULL); @@ -223,7 +223,7 @@ TEST_F(TemplateURLParserTest, TestPostSuggestion) { return; // This XML file uses a namespace. ParamFilterImpl filter("", "Mozilla"); - ParseFile(L"post_suggestion.xml", &filter); + ParseFile("post_suggestion.xml", &filter); ASSERT_TRUE(parse_result_); EXPECT_EQ(L"Yahoo", template_url_.short_name()); EXPECT_TRUE(template_url_.url() != NULL); diff --git a/chrome/common/json_value_serializer_perftest.cc b/chrome/common/json_value_serializer_perftest.cc index c54ad67..0032260 100644 --- a/chrome/common/json_value_serializer_perftest.cc +++ b/chrome/common/json_value_serializer_perftest.cc @@ -18,17 +18,17 @@ namespace { class JSONValueSerializerTests : public testing::Test { protected: virtual void SetUp() { - static const wchar_t* const kTestFilenames[] = { - L"serializer_nested_test.js", - L"serializer_test.js", - L"serializer_test_nowhitespace.js", + static const char* const kTestFilenames[] = { + "serializer_nested_test.js", + "serializer_test.js", + "serializer_test_nowhitespace.js", }; // Load test cases for (size_t i = 0; i < arraysize(kTestFilenames); ++i) { - std::wstring filename; + FilePath filename; EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &filename)); - file_util::AppendToPath(&filename, kTestFilenames[i]); + filename = filename.AppendASCII(kTestFilenames[i]); std::string test_case; EXPECT_TRUE(file_util::ReadFileToString(filename, &test_case)); diff --git a/chrome/test/ui/omnibox_uitest.cc b/chrome/test/ui/omnibox_uitest.cc index d583575..af94102 100644 --- a/chrome/test/ui/omnibox_uitest.cc +++ b/chrome/test/ui/omnibox_uitest.cc @@ -136,12 +136,12 @@ TEST_F(OmniboxTest, Measure) { if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunOmniboxTest)) return; - std::wstring omnibox_tests_path; + FilePath omnibox_tests_path; PathService::Get(chrome::DIR_TEST_DATA, &omnibox_tests_path); - file_util::AppendToPath(&omnibox_tests_path, L"omnibox_tests.xml"); + omnibox_tests_path = omnibox_tests_path.AppendASCII("omnibox_tests.xml"); XmlReader reader; - ASSERT_TRUE(reader.LoadFile(WideToASCII(omnibox_tests_path))); + ASSERT_TRUE(reader.LoadFile(WideToASCII(omnibox_tests_path.ToWStringHack()))); while (reader.SkipToElement()) { ASSERT_EQ("omnibox_tests", reader.NodeName()); reader.Read(); diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h index f16f0ae..74c73ef 100644 --- a/net/url_request/url_request_unittest.h +++ b/net/url_request/url_request_unittest.h @@ -288,8 +288,8 @@ class BaseTestServer : public base::RefCounted<BaseTestServer> { virtual bool MakeGETRequest(const std::string& page_name) = 0; - std::wstring GetDataDirectory() { - return launcher_.GetDocumentRootPath().ToWStringHack(); + FilePath GetDataDirectory() { + return launcher_.GetDocumentRootPath(); } protected: diff --git a/webkit/glue/unittest_test_server.h b/webkit/glue/unittest_test_server.h index 1033b1c..f0e30d9 100644 --- a/webkit/glue/unittest_test_server.h +++ b/webkit/glue/unittest_test_server.h @@ -24,7 +24,7 @@ class UnittestTestServer : public HTTPTestServer { static UnittestTestServer* CreateServer() { UnittestTestServer* test_server = new UnittestTestServer(); FilePath no_cert; - FilePath docroot = FilePath::FromWStringHack(L"webkit/data"); + FilePath docroot(FILE_PATH_LITERAL("webkit/data")); if (!test_server->Start(net::TestServerLauncher::ProtoHTTP, "localhost", 1337, docroot, no_cert, std::wstring())) { delete test_server; |