diff options
Diffstat (limited to 'chrome/test')
23 files changed, 40 insertions, 43 deletions
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc index b9de5c0..4d2c9f6 100644 --- a/chrome/test/automation/proxy_launcher.cc +++ b/chrome/test/automation/proxy_launcher.cc @@ -443,7 +443,7 @@ bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, const char* browser_wrapper = getenv("BROWSER_WRAPPER"); if (browser_wrapper) { #if defined(OS_WIN) - command_line.PrependWrapper(base::ASCIIToWide(browser_wrapper)); + command_line.PrependWrapper(ASCIIToWide(browser_wrapper)); #elif defined(OS_POSIX) command_line.PrependWrapper(browser_wrapper); #endif diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 81384d1..a883070 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -61,7 +61,7 @@ int TabProxy::FindInPage(const std::wstring& search_string, return -1; AutomationMsg_Find_Params params; - params.search_string = base::WideToUTF16Hack(search_string); + params.search_string = WideToUTF16Hack(search_string); params.find_next = find_next; params.match_case = (match_case == CASE_SENSITIVE); params.forward = (forward == FWD); @@ -182,7 +182,7 @@ bool TabProxy::ExecuteAndExtractString(const std::wstring& frame_xpath, succeeded = value->GetAsString(&read_value); if (succeeded) { // TODO(viettrungluu): remove conversion. (But should |jscript| be UTF-8?) - *string_value = base::UTF16ToWideHack(read_value); + *string_value = UTF16ToWideHack(read_value); } } return succeeded; diff --git a/chrome/test/chromedriver/chrome_finder.cc b/chrome/test/chromedriver/chrome_finder.cc index f08d3a73..4a6e420 100644 --- a/chrome/test/chromedriver/chrome_finder.cc +++ b/chrome/test/chromedriver/chrome_finder.cc @@ -29,7 +29,7 @@ void GetApplicationDirs(std::vector<base::FilePath>* locations) { scoped_ptr<base::Environment> env(base::Environment::Create()); std::string home_dir; if (env->GetVar("userprofile", &home_dir)) { - base::FilePath default_location(base::UTF8ToWide(home_dir)); + base::FilePath default_location(UTF8ToWide(home_dir)); if (base::win::GetVersion() < base::win::VERSION_VISTA) { default_location = default_location.Append( L"Local Settings\\Application Data"); @@ -42,9 +42,9 @@ void GetApplicationDirs(std::vector<base::FilePath>* locations) { // Add the system-level location. std::string program_dir; if (env->GetVar("ProgramFiles", &program_dir)) - locations->push_back(base::FilePath(base::UTF8ToWide(program_dir))); + locations->push_back(base::FilePath(UTF8ToWide(program_dir))); if (env->GetVar("ProgramFiles(x86)", &program_dir)) - locations->push_back(base::FilePath(base::UTF8ToWide(program_dir))); + locations->push_back(base::FilePath(UTF8ToWide(program_dir))); } #elif defined(OS_LINUX) void GetApplicationDirs(std::vector<base::FilePath>* locations) { diff --git a/chrome/test/chromedriver/key_converter_unittest.cc b/chrome/test/chromedriver/key_converter_unittest.cc index 48f801b..fbf63d7 100644 --- a/chrome/test/chromedriver/key_converter_unittest.cc +++ b/chrome/test/chromedriver/key_converter_unittest.cc @@ -152,10 +152,9 @@ TEST(KeyConverter, WebDriverSpecialNonCharKey) { TEST(KeyConverter, FrenchKeyOnEnglishLayout) { KeyEvent event_array[] = { CreateKeyDownEvent(ui::VKEY_UNKNOWN, 0), - CreateCharEvent(base::WideToUTF8(L"\u00E9"), - base::WideToUTF8(L"\u00E9"), 0), + CreateCharEvent(WideToUTF8(L"\u00E9"), WideToUTF8(L"\u00E9"), 0), CreateKeyUpEvent(ui::VKEY_UNKNOWN, 0)}; - CheckEventsReleaseModifiers(base::WideToUTF16(L"\u00E9"), + CheckEventsReleaseModifiers(WideToUTF16(L"\u00E9"), event_array, arraysize(event_array)); } diff --git a/chrome/test/chromedriver/keycode_text_conversion_unittest.cc b/chrome/test/chromedriver/keycode_text_conversion_unittest.cc index f8dca60..9fa8dbc 100644 --- a/chrome/test/chromedriver/keycode_text_conversion_unittest.cc +++ b/chrome/test/chromedriver/keycode_text_conversion_unittest.cc @@ -30,7 +30,7 @@ void CheckCharToKeyCode(char character, ui::KeyboardCode key_code, void CheckCantConvertChar(wchar_t character) { std::wstring character_string; character_string.push_back(character); - char16 character_utf16 = base::WideToUTF16(character_string)[0]; + char16 character_utf16 = WideToUTF16(character_string)[0]; ui::KeyboardCode actual_key_code = ui::VKEY_UNKNOWN; int actual_modifiers = 0; EXPECT_FALSE(ConvertCharToKeyCode( diff --git a/chrome/test/chromedriver/keycode_text_conversion_win.cc b/chrome/test/chromedriver/keycode_text_conversion_win.cc index 3fdb2ce..5a0c67e 100644 --- a/chrome/test/chromedriver/keycode_text_conversion_win.cc +++ b/chrome/test/chromedriver/keycode_text_conversion_win.cc @@ -29,7 +29,7 @@ std::string ConvertKeyCodeToText(ui::KeyboardCode key_code, int modifiers) { return ""; } else { std::string text; - base::WideToUTF8(chars, code, &text); + WideToUTF8(chars, code, &text); return text; } } diff --git a/chrome/test/chromedriver/test_util.cc b/chrome/test/chromedriver/test_util.cc index 2e90b91..a2061e6 100644 --- a/chrome/test/chromedriver/test_util.cc +++ b/chrome/test/chromedriver/test_util.cc @@ -30,7 +30,7 @@ RestoreKeyboardLayoutOnDestruct::~RestoreKeyboardLayoutOnDestruct() { #if defined(OS_WIN) bool SwitchKeyboardLayout(const std::string& input_locale_identifier) { HKL layout = LoadKeyboardLayout( - base::UTF8ToWide(input_locale_identifier).c_str(), 0); + UTF8ToWide(input_locale_identifier).c_str(), 0); if (!layout) return false; return !!ActivateKeyboardLayout(layout, 0); diff --git a/chrome/test/perf/dom_checker_uitest.cc b/chrome/test/perf/dom_checker_uitest.cc index 285081a..f4db35a 100644 --- a/chrome/test/perf/dom_checker_uitest.cc +++ b/chrome/test/perf/dom_checker_uitest.cc @@ -167,7 +167,7 @@ class DomCheckerTest : public UITest { if (!succeeded) return false; - std::string json = base::WideToUTF8(json_wide); + std::string json = WideToUTF8(json_wide); JSONStringValueSerializer deserializer(json); scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL)); diff --git a/chrome/test/perf/frame_rate/frame_rate_tests.cc b/chrome/test/perf/frame_rate/frame_rate_tests.cc index 17716e4..7be2b36 100644 --- a/chrome/test/perf/frame_rate/frame_rate_tests.cc +++ b/chrome/test/perf/frame_rate/frame_rate_tests.cc @@ -231,7 +231,7 @@ class FrameRateTest &json)); std::map<std::string, std::string> results; - ASSERT_TRUE(JsonDictionaryToMap(base::WideToUTF8(json), &results)); + ASSERT_TRUE(JsonDictionaryToMap(WideToUTF8(json), &results)); ASSERT_TRUE(results.find("mean") != results.end()); ASSERT_TRUE(results.find("sigma") != results.end()); diff --git a/chrome/test/perf/indexeddb_uitest.cc b/chrome/test/perf/indexeddb_uitest.cc index ec6246a..787f2bf1 100644 --- a/chrome/test/perf/indexeddb_uitest.cc +++ b/chrome/test/perf/indexeddb_uitest.cc @@ -72,7 +72,7 @@ class IndexedDBTest : public UIPerfTest { if (!succeeded) return false; - std::string json = base::WideToUTF8(json_wide); + std::string json = WideToUTF8(json_wide); return JsonDictionaryToMap(json, results); } diff --git a/chrome/test/perf/page_cycler_test.cc b/chrome/test/perf/page_cycler_test.cc index 61c02a2..1c07a89 100644 --- a/chrome/test/perf/page_cycler_test.cc +++ b/chrome/test/perf/page_cycler_test.cc @@ -205,7 +205,7 @@ class PageCyclerTest : public UIPerfTest { std::string cookie; ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); - pages->assign(base::UTF8ToWide(cookie)); + pages->assign(UTF8ToWide(cookie)); ASSERT_FALSE(pages->empty()); // Wait for the report.html to be loaded. @@ -279,7 +279,7 @@ class PageCyclerTest : public UIPerfTest { L"window.domAutomationController.send(" L"window.domAutomationController.getHistogram ? " L"window.domAutomationController.getHistogram(\"" + - base::Sysbase::UTF8ToWide(name) + L"\") : '')", + base::SysUTF8ToWide(name) + L"\") : '')", &whistogram)); std::string histogram = base::SysWideToNativeMB(whistogram); printf("HISTOGRAM %s: %s = %s %s\n", diff --git a/chrome/test/perf/startup_test.cc b/chrome/test/perf/startup_test.cc index 69138ff..c190a34 100644 --- a/chrome/test/perf/startup_test.cc +++ b/chrome/test/perf/startup_test.cc @@ -119,7 +119,7 @@ class StartupTest : public UIPerfTest { // Make sure temp directory has the proper format for writing to prefs file. #if defined(OS_POSIX) - std::wstring user_data_dir_w(base::ASCIIToWide(user_data_dir().value())); + std::wstring user_data_dir_w(ASCIIToWide(user_data_dir().value())); #elif defined(OS_WIN) std::wstring user_data_dir_w(user_data_dir().value()); // In Windows, the FilePath will write '\' for the path separators; change @@ -130,7 +130,7 @@ class StartupTest : public UIPerfTest { // Rewrite prefs file. std::vector<string16> subst; - subst.push_back(base::WideToUTF16(user_data_dir_w)); + subst.push_back(WideToUTF16(user_data_dir_w)); const std::string prefs_string = UTF16ToASCII(ReplaceStringPlaceholders(format_string, subst, NULL)); EXPECT_TRUE(file_util::WriteFile(pref_path, prefs_string.c_str(), diff --git a/chrome/test/perf/tab_switching_test.cc b/chrome/test/perf/tab_switching_test.cc index d2f249c..45a0891 100644 --- a/chrome/test/perf/tab_switching_test.cc +++ b/chrome/test/perf/tab_switching_test.cc @@ -50,8 +50,7 @@ class TabSwitchingUITest : public UIPerfTest { // Set the log file path for the browser test. scoped_ptr<base::Environment> env(base::Environment::Create()); #if defined(OS_WIN) - env->SetVar(env_vars::kLogFileName, - base::WideToUTF8(log_file_name_.value())); + env->SetVar(env_vars::kLogFileName, WideToUTF8(log_file_name_.value())); #else env->SetVar(env_vars::kLogFileName, log_file_name_.value()); #endif diff --git a/chrome/test/perf/url_fetch_test.cc b/chrome/test/perf/url_fetch_test.cc index 2b77ffd..4a88f29 100644 --- a/chrome/test/perf/url_fetch_test.cc +++ b/chrome/test/perf/url_fetch_test.cc @@ -67,8 +67,8 @@ class UrlFetchTest : public UIPerfTest { } else if (!wait_js_expr.empty()) { bool completed = WaitUntilJavaScriptCondition( tab.get(), - base::UTF8ToWide(wait_js_frame_xpath), - base::UTF8ToWide(wait_js_expr), + UTF8ToWide(wait_js_frame_xpath), + UTF8ToWide(wait_js_expr), wait_js_timeout); ASSERT_TRUE(completed); } @@ -77,10 +77,10 @@ class UrlFetchTest : public UIPerfTest { "window.domAutomationController.send(%s);", var_to_fetch); std::wstring value; - bool success = tab->ExecuteAndExtractString(L"", - base::ASCIIToWide(script), &value); + bool success = tab->ExecuteAndExtractString(L"", ASCIIToWide(script), + &value); ASSERT_TRUE(success); - result->javascript_variable = base::WideToUTF8(value); + result->javascript_variable = WideToUTF8(value); } } }; diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc index cb65a9a..7724f6f 100644 --- a/chrome/test/pyautolib/pyautolib.cc +++ b/chrome/test/pyautolib/pyautolib.cc @@ -44,7 +44,7 @@ void PyUITestSuiteBase::SetCrSourceRoot(const base::FilePath& path) { PyUITestBase::PyUITestBase(bool clear_profile, std::wstring homepage) : UITestBase() { set_clear_profile(clear_profile); - set_homepage(base::WideToASCII(homepage)); + set_homepage(WideToASCII(homepage)); // We add this so that pyauto can execute javascript in the renderer and // read values back. dom_automation_enabled_ = true; diff --git a/chrome/test/reliability/automated_ui_tests.cc b/chrome/test/reliability/automated_ui_tests.cc index 0e8f81a..2c371c4 100644 --- a/chrome/test/reliability/automated_ui_tests.cc +++ b/chrome/test/reliability/automated_ui_tests.cc @@ -113,7 +113,7 @@ std::string GetChromeRevision() { scoped_ptr<FileVersionInfo> file_info; file_info.reset( FileVersionInfo::CreateFileVersionInfo(base::FilePath(kChromeDll))); - last_change = base::WideToASCII(file_info->last_change()); + last_change = WideToASCII(file_info->last_change()); #elif defined(OS_POSIX) chrome::VersionInfo version_info; last_change = version_info.LastChange(); @@ -717,7 +717,7 @@ void AutomatedUITest::LogCrashResult(const base::FilePath& crash_dump, xml_writer_.AddAttribute("revision", GetChromeRevision()); xml_writer_.StartElement("crash"); #if defined(OS_WIN) - xml_writer_.AddAttribute("crash_dump", base::WideToASCII(crash_dump.value())); + xml_writer_.AddAttribute("crash_dump", WideToASCII(crash_dump.value())); #else xml_writer_.AddAttribute("crash_dump", crash_dump.value()); #endif diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index e8afea6..18d78e3 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -307,7 +307,7 @@ class PageLoadTest : public UITest { scoped_ptr<FileVersionInfo> file_info; file_info.reset( FileVersionInfo::CreateFileVersionInfo(base::FilePath(kChromeDll))); - last_change = base::WideToASCII(file_info->last_change()); + last_change = WideToASCII(file_info->last_change()); #elif defined(OS_POSIX) // TODO(fmeawad): On Mac, the version retrieved here belongs to the test // module and not the chrome binary, need to be changed to chrome binary diff --git a/chrome/test/webdriver/commands/file_upload_command.cc b/chrome/test/webdriver/commands/file_upload_command.cc index bffd47b..4469147 100644 --- a/chrome/test/webdriver/commands/file_upload_command.cc +++ b/chrome/test/webdriver/commands/file_upload_command.cc @@ -54,7 +54,7 @@ void FileUploadCommand::ExecutePost(Response* const response) { } #if defined(OS_WIN) - response->SetValue(new base::StringValue(base::WideToUTF8(upload.value()))); + response->SetValue(new base::StringValue(WideToUTF8(upload.value()))); #else response->SetValue(new base::StringValue(upload.value())); #endif diff --git a/chrome/test/webdriver/keycode_text_conversion_unittest.cc b/chrome/test/webdriver/keycode_text_conversion_unittest.cc index ccc99e5..35dd538 100644 --- a/chrome/test/webdriver/keycode_text_conversion_unittest.cc +++ b/chrome/test/webdriver/keycode_text_conversion_unittest.cc @@ -34,7 +34,7 @@ void CheckCharToKeyCode(char character, ui::KeyboardCode key_code, void CheckCantConvertChar(wchar_t character) { std::wstring character_string; character_string.push_back(character); - char16 character_utf16 = base::WideToUTF16(character_string)[0]; + char16 character_utf16 = WideToUTF16(character_string)[0]; ui::KeyboardCode actual_key_code = ui::VKEY_UNKNOWN; int actual_modifiers = 0; EXPECT_FALSE(ConvertCharToKeyCode( diff --git a/chrome/test/webdriver/keycode_text_conversion_win.cc b/chrome/test/webdriver/keycode_text_conversion_win.cc index 85113d0..180c923 100644 --- a/chrome/test/webdriver/keycode_text_conversion_win.cc +++ b/chrome/test/webdriver/keycode_text_conversion_win.cc @@ -31,7 +31,7 @@ std::string ConvertKeyCodeToText(ui::KeyboardCode key_code, int modifiers) { return ""; } else { std::string text; - base::WideToUTF8(chars, code, &text); + WideToUTF8(chars, code, &text); return text; } } diff --git a/chrome/test/webdriver/webdriver_automation.cc b/chrome/test/webdriver/webdriver_automation.cc index 083bf18..f604d78 100644 --- a/chrome/test/webdriver/webdriver_automation.cc +++ b/chrome/test/webdriver/webdriver_automation.cc @@ -129,7 +129,7 @@ bool GetDefaultChromeExe(base::FilePath* browser_exe) { scoped_ptr<base::Environment> env(base::Environment::Create()); std::string home_dir; if (env->GetVar("userprofile", &home_dir)) { - base::FilePath default_location(base::UTF8ToWide(home_dir)); + base::FilePath default_location(UTF8ToWide(home_dir)); if (base::win::GetVersion() < base::win::VERSION_VISTA) { default_location = default_location.Append( L"Local Settings\\Application Data"); @@ -143,15 +143,15 @@ bool GetDefaultChromeExe(base::FilePath* browser_exe) { // Add the system-level location for Chrome. std::string program_dir; if (env->GetVar("ProgramFiles", &program_dir)) { - locations.push_back(base::FilePath(base::UTF8ToWide(program_dir)) + locations.push_back(base::FilePath(UTF8ToWide(program_dir)) .Append(app_from_google)); - chromium_locations.push_back(base::FilePath(base::UTF8ToWide(program_dir)) + chromium_locations.push_back(base::FilePath(UTF8ToWide(program_dir)) .Append(app_from_chromium)); } if (env->GetVar("ProgramFiles(x86)", &program_dir)) { - locations.push_back(base::FilePath(base::UTF8ToWide(program_dir)) + locations.push_back(base::FilePath(UTF8ToWide(program_dir)) .Append(app_from_google)); - chromium_locations.push_back(base::FilePath(base::UTF8ToWide(program_dir)) + chromium_locations.push_back(base::FilePath(UTF8ToWide(program_dir)) .Append(app_from_chromium)); } #elif defined(OS_MACOSX) @@ -450,7 +450,7 @@ void Automation::Init( if (channel_id.empty()) { std::string command_line_str; #if defined(OS_WIN) - command_line_str = base::WideToUTF8(command.GetCommandLineString()); + command_line_str = WideToUTF8(command.GetCommandLineString()); #elif defined(OS_POSIX) command_line_str = command.GetCommandLineString(); #endif diff --git a/chrome/test/webdriver/webdriver_key_converter_unittest.cc b/chrome/test/webdriver/webdriver_key_converter_unittest.cc index 4080359..f36100b 100644 --- a/chrome/test/webdriver/webdriver_key_converter_unittest.cc +++ b/chrome/test/webdriver/webdriver_key_converter_unittest.cc @@ -140,10 +140,9 @@ TEST(WebDriverKeyConverter, WebDriverSpecialNonCharKey) { TEST(WebDriverKeyConverter, FrenchKeyOnEnglishLayout) { WebKeyEvent event_array[] = { CreateKeyDownEvent(ui::VKEY_UNKNOWN, 0), - CreateCharEvent(base::WideToUTF8(L"\u00E9"), - base::WideToUTF8(L"\u00E9"), 0), + CreateCharEvent(WideToUTF8(L"\u00E9"), WideToUTF8(L"\u00E9"), 0), CreateKeyUpEvent(ui::VKEY_UNKNOWN, 0)}; - CheckEventsReleaseModifiers(base::WideToUTF16(L"\u00E9"), + CheckEventsReleaseModifiers(WideToUTF16(L"\u00E9"), event_array, arraysize(event_array)); } diff --git a/chrome/test/webdriver/webdriver_test_util.cc b/chrome/test/webdriver/webdriver_test_util.cc index 6e00d42..ce464b1 100644 --- a/chrome/test/webdriver/webdriver_test_util.cc +++ b/chrome/test/webdriver/webdriver_test_util.cc @@ -32,7 +32,7 @@ RestoreKeyboardLayoutOnDestruct::~RestoreKeyboardLayoutOnDestruct() { #if defined(OS_WIN) bool SwitchKeyboardLayout(const std::string& input_locale_identifier) { HKL layout = LoadKeyboardLayout( - base::UTF8ToWide(input_locale_identifier).c_str(), 0); + UTF8ToWide(input_locale_identifier).c_str(), 0); if (!layout) return false; return !!ActivateKeyboardLayout(layout, 0); |