diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
commit | 5115474e2e2c773b53fc1e111426e8924deeadb7 (patch) | |
tree | 6bdd56cdd544a3b331db7612781ae347739c4e82 /chrome/test | |
parent | 609990b5b4254601504935427483e3fc22cfde80 (diff) | |
download | chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.zip chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.gz chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.bz2 |
Use %ls instead of %s in wprintf format strings for wchar_t fields.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automation/autocomplete_edit_proxy.h | 18 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 7 | ||||
-rw-r--r-- | chrome/test/memory_test/memory_test.cc | 24 | ||||
-rw-r--r-- | chrome/test/page_cycler/page_cycler_test.cc | 44 | ||||
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/security_tests/ipc_security_tests.cc | 2 |
6 files changed, 53 insertions, 44 deletions
diff --git a/chrome/test/automation/autocomplete_edit_proxy.h b/chrome/test/automation/autocomplete_edit_proxy.h index 608d1f1..01fab33 100644 --- a/chrome/test/automation/autocomplete_edit_proxy.h +++ b/chrome/test/automation/autocomplete_edit_proxy.h @@ -121,11 +121,19 @@ struct ParamTraits<AutocompleteMatchData> { } static void Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"[%S %s %S %S %S %d %s %s %d %s %S]", - p.contents, p.deletable ? "true" : "false", p.description, - p.destination_url, p.fill_into_edit, p.inline_autocomplete_offset, - p.is_history_what_you_typed_match ? "true" : "false", p.provider_name, - p.relevance, p.starred ? "true" : "false", p.str_type)); + std::wstring provider_name_wide = UTF8ToWide(p.provider_name); + l->append(StringPrintf(L"[%ls %ls %ls %ls %ls %d %ls %ls %d %ls %ls]", + p.contents, + p.deletable ? L"true" : L"false", + p.description, + p.destination_url, + p.fill_into_edit, + p.inline_autocomplete_offset, + p.is_history_what_you_typed_match ? L"true" : L"false", + provider_name_wide, + p.relevance, + p.starred ? L"true" : L"false", + p.str_type)); } }; } // namespace IPC diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index c1bd5b8..0d75389e 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -522,7 +522,8 @@ class AutomationProxyTest4 : public UITest { std::wstring SynthesizeJSURL(const std::wstring& value) { std::wstring jscript; SStringPrintf(&jscript, - L"javascript:void(window.domAutomationController.send(%s));", value.c_str()); + L"javascript:void(window.domAutomationController.send(%ls));", + value.c_str()); return jscript; } @@ -599,8 +600,8 @@ std::wstring SynthesizeJSURLForDOMQuery(const std::wstring& id) { std::wstring jscript; SStringPrintf(&jscript, L"javascript:void(window.domAutomationController)"); - StringAppendF(&jscript, L".send(document.getElementById('%s').nodeName);", - id.c_str()); + StringAppendF(&jscript, L".send(document.getElementById('%ls').nodeName);", + id.c_str()); return jscript; } diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc index 9e233de..6b9754b 100644 --- a/chrome/test/memory_test/memory_test.cc +++ b/chrome/test/memory_test/memory_test.cc @@ -250,7 +250,7 @@ class MemoryTest : public UITest { void PrintResults(const wchar_t* test_name, size_t commit_size) { PrintMemoryUsageInfo(test_name); - wprintf(L"%s_commit_charge_kb = %d\n", test_name, commit_size / 1024); + wprintf(L"%ls_commit_charge_kb = %d\n", test_name, commit_size / 1024); } void PrintIOPerfInfo(const wchar_t* test_name) { @@ -288,17 +288,17 @@ class MemoryTest : public UITest { } // print out IO performance - wprintf(L"%s_%s_read_op = %d\n", + wprintf(L"%ls_%ls_read_op = %d\n", test_name, chrome_name, io_counters.ReadOperationCount); - wprintf(L"%s_%s_write_op = %d\n", + wprintf(L"%ls_%ls_write_op = %d\n", test_name, chrome_name, io_counters.WriteOperationCount); - wprintf(L"%s_%s_other_op = %d\n", + wprintf(L"%ls_%ls_other_op = %d\n", test_name, chrome_name, io_counters.OtherOperationCount); - wprintf(L"%s_%s_read_byte = %d K\n", + wprintf(L"%ls_%ls_read_byte = %d K\n", test_name, chrome_name, io_counters.ReadTransferCount / 1024); - wprintf(L"%s_%s_write_byte = %d K\n", + wprintf(L"%ls_%ls_write_byte = %d K\n", test_name, chrome_name, io_counters.WriteTransferCount / 1024); - wprintf(L"%s_%s_other_byte = %d K\n", + wprintf(L"%ls_%ls_other_byte = %d K\n", test_name, chrome_name, io_counters.OtherTransferCount / 1024); } } @@ -334,15 +334,15 @@ class MemoryTest : public UITest { num_chrome_processes++; } } - wprintf(L"%s_browser_vm_final_kb = %d\n", test_name, + wprintf(L"%ls_browser_vm_final_kb = %d\n", test_name, browser_virtual_size / 1024); - wprintf(L"%s_browser_ws_final_kb = %d\n", test_name, + wprintf(L"%ls_browser_ws_final_kb = %d\n", test_name, browser_working_set_size / 1024); - wprintf(L"%s_memory_vm_final_kb = %d\n", test_name, + wprintf(L"%ls_memory_vm_final_kb = %d\n", test_name, virtual_size / 1024); - wprintf(L"%s_memory_ws_final_kb = %d\n", test_name, + wprintf(L"%ls_memory_ws_final_kb = %d\n", test_name, working_set_size / 1024); - wprintf(L"%s_processes = %d\n", test_name, num_chrome_processes); + wprintf(L"%ls_processes = %d\n", test_name, num_chrome_processes); } private: diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc index 39b10b5..921d9e8 100644 --- a/chrome/test/page_cycler/page_cycler_test.cc +++ b/chrome/test/page_cycler/page_cycler_test.cc @@ -144,17 +144,17 @@ class PageCyclerTest : public UITest { } // print out IO performance - wprintf(L"%s_%s_read_op = %d\n", + wprintf(L"%ls_%ls_read_op = %d\n", test_name, chrome_name, io_counters.ReadOperationCount); - wprintf(L"%s_%s_write_op = %d\n", + wprintf(L"%ls_%ls_write_op = %d\n", test_name, chrome_name, io_counters.WriteOperationCount); - wprintf(L"%s_%s_other_op = %d\n", + wprintf(L"%ls_%ls_other_op = %d\n", test_name, chrome_name, io_counters.OtherOperationCount); - wprintf(L"%s_%s_read_byte = %d K\n", + wprintf(L"%ls_%ls_read_byte = %d K\n", test_name, chrome_name, io_counters.ReadTransferCount / 1024); - wprintf(L"%s_%s_write_byte = %d K\n", + wprintf(L"%ls_%ls_write_byte = %d K\n", test_name, chrome_name, io_counters.WriteTransferCount / 1024); - wprintf(L"%s_%s_other_byte = %d K\n", + wprintf(L"%ls_%ls_other_byte = %d K\n", test_name, chrome_name, io_counters.OtherTransferCount / 1024); } } @@ -177,21 +177,21 @@ class PageCyclerTest : public UITest { if (GetMemoryInfo(pid, &peak_virtual_size, ¤t_virtual_size, &peak_working_set_size, ¤t_working_set_size)) { if (pid == chrome_filter.browser_process_id()) { - wprintf(L"%s_browser_vm_peak = %d\n", test_name, peak_virtual_size); - wprintf(L"%s_browser_vm_final = %d\n", test_name, - current_virtual_size); - wprintf(L"%s_browser_ws_peak = %d\n", test_name, - peak_working_set_size); - wprintf(L"%s_browser_ws_final = %d\n", test_name, - current_working_set_size); + wprintf(L"%ls_browser_vm_peak = %d\n", test_name, peak_virtual_size); + wprintf(L"%ls_browser_vm_final = %d\n", test_name, + current_virtual_size); + wprintf(L"%ls_browser_ws_peak = %d\n", test_name, + peak_working_set_size); + wprintf(L"%ls_browser_ws_final = %d\n", test_name, + current_working_set_size); } else { - wprintf(L"%s_render_vm_peak = %d\n", test_name, peak_virtual_size); - wprintf(L"%s_render_vm_final = %d\n", test_name, - current_virtual_size); - wprintf(L"%s_render_ws_peak = %d\n", test_name, + wprintf(L"%ls_render_vm_peak = %d\n", test_name, peak_virtual_size); + wprintf(L"%ls_render_vm_final = %d\n", test_name, + current_virtual_size); + wprintf(L"%ls_render_ws_peak = %d\n", test_name, peak_working_set_size); - wprintf(L"%s_render_ws_final = %d\n", test_name, - current_working_set_size); + wprintf(L"%ls_render_ws_final = %d\n", test_name, + current_working_set_size); } } }; @@ -211,8 +211,8 @@ class PageCyclerTest : public UITest { PrintIOPerfInfo(L"__pc"); printf("\n"); - wprintf(L"__pc_pages = [%s]\n", pages.c_str()); - wprintf(L"__pc_timings = [%s]\n", timings.c_str()); + wprintf(L"__pc_pages = [%ls]\n", pages.c_str()); + wprintf(L"__pc_timings = [%ls]\n", timings.c_str()); } }; @@ -239,7 +239,7 @@ class PageCyclerReferenceTest : public PageCyclerTest { PrintIOPerfInfo(L"__pc_reference"); printf("\n"); - wprintf(L"__pc_reference_timings = [%s]\n", timings.c_str()); + wprintf(L"__pc_reference_timings = [%ls]\n", timings.c_str()); } }; diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index ee59ad6..bdb805b 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -273,7 +273,7 @@ class PageLoadTest : public UITest { // For usage 2 for (int i = start_page; i <= end_page; ++i) { std::wstring test_page_url( - StringPrintf(L"%s/page?id=%d", server_url.c_str(), i)); + StringPrintf(L"%ls/page?id=%d", server_url.c_str(), i)); NavigateToURLLogResult(GURL(test_page_url), log_file, NULL); } } else { diff --git a/chrome/test/security_tests/ipc_security_tests.cc b/chrome/test/security_tests/ipc_security_tests.cc index e85e09b..9ac9b3c 100644 --- a/chrome/test/security_tests/ipc_security_tests.cc +++ b/chrome/test/security_tests/ipc_security_tests.cc @@ -38,7 +38,7 @@ namespace { // Debug output messages prefix. const char kODSMgPrefix[] = "[security] "; // Format of the Chrome browser pipe for plugins. -const wchar_t kChromePluginPipeFmt[] = L"\\\\.\\pipe\\chrome.%s.p%d"; +const wchar_t kChromePluginPipeFmt[] = L"\\\\.\\pipe\\chrome.%ls.p%d"; // Size for the in/out pipe buffers. const int kBufferSize = 1024; |