diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automation/autocomplete_edit_proxy.h | 4 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 3 | ||||
-rw-r--r-- | chrome/test/interactive_ui/view_event_test_base.cc | 6 | ||||
-rw-r--r-- | chrome/test/page_cycler/page_cycler_test.cc | 4 | ||||
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 12 | ||||
-rw-r--r-- | chrome/test/startup/startup_test.cc | 3 | ||||
-rw-r--r-- | chrome/test/sync/engine/test_id_factory.h | 10 | ||||
-rw-r--r-- | chrome/test/ui/npapi_uitest.cc | 3 | ||||
-rw-r--r-- | chrome/test/ui/ui_layout_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 6 |
10 files changed, 30 insertions, 27 deletions
diff --git a/chrome/test/automation/autocomplete_edit_proxy.h b/chrome/test/automation/autocomplete_edit_proxy.h index 5dcf8af..7f5aa90 100644 --- a/chrome/test/automation/autocomplete_edit_proxy.h +++ b/chrome/test/automation/autocomplete_edit_proxy.h @@ -91,13 +91,13 @@ struct ParamTraits<AutocompleteMatchData> { l->append(L"["); l->append(UTF8ToWide(p.provider_name)); l->append(L" "); - l->append(IntToWString(p.relevance)); + l->append(UTF8ToWide(base::IntToString(p.relevance))); l->append(L" "); l->append(p.deletable ? L"true" : L"false"); l->append(L" "); l->append(p.fill_into_edit); l->append(L" "); - l->append(IntToWString(p.inline_autocomplete_offset)); + l->append(UTF8ToWide(base::IntToString(p.inline_autocomplete_offset))); l->append(L" "); l->append(UTF8ToWide(p.destination_url.spec())); l->append(L" "); diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 8c37bc5..5d7e2be 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -9,6 +9,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/scoped_nsautorelease_pool.h" +#include "base/string_number_conversions.h" #include "base/test/test_file_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" @@ -330,7 +331,7 @@ void InProcessBrowserTest::QuitBrowsers() { void InProcessBrowserTest::TimedOut() { std::string error_message = "Test timed out. Each test runs for a max of "; - error_message += IntToString(initial_timeout_); + error_message += base::IntToString(initial_timeout_); error_message += " ms (kInitialTimeoutInMS)."; GTEST_NONFATAL_FAILURE_(error_message.c_str()); diff --git a/chrome/test/interactive_ui/view_event_test_base.cc b/chrome/test/interactive_ui/view_event_test_base.cc index 8936d57..476445f 100644 --- a/chrome/test/interactive_ui/view_event_test_base.cc +++ b/chrome/test/interactive_ui/view_event_test_base.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 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. @@ -10,7 +10,7 @@ #include "base/compiler_specific.h" #include "base/message_loop.h" -#include "base/string_util.h" +#include "base/string_number_conversions.h" #include "chrome/browser/automation/ui_controls.h" #include "chrome/test/ui_test_utils.h" #include "views/view.h" @@ -165,7 +165,7 @@ void ViewEventTestBase::RunTestMethod(Task* task) { void ViewEventTestBase::TimedOut() { std::string error_message = "Test timed out. Each test runs for a max of "; - error_message += IntToString(kTimeoutInMS); + error_message += base::IntToString(kTimeoutInMS); error_message += " ms (kTimeoutInMS)."; GTEST_NONFATAL_FAILURE_(error_message.c_str()); diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc index 276c446..a980139 100644 --- a/chrome/test/page_cycler/page_cycler_test.cc +++ b/chrome/test/page_cycler/page_cycler_test.cc @@ -8,7 +8,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/string_util.h" +#include "base/string_number_conversions.h" #include "base/sys_string_conversions.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/common/chrome_constants.h" @@ -215,7 +215,7 @@ class PageCyclerTest : public UITest { // run N iterations GURL::Replacements replacements; const std::string query_string = - "iterations=" + IntToString(GetTestIterations()) + "&auto=1"; + "iterations=" + base::IntToString(GetTestIterations()) + "&auto=1"; replacements.SetQuery( query_string.c_str(), url_parse::Component(0, query_string.length())); diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index f2eba67..148eb54 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -627,10 +627,10 @@ void SetPageRange(const CommandLine& parsed_command_line) { if (parsed_command_line.HasSwitch(kStartPageSwitch)) { ASSERT_TRUE(parsed_command_line.HasSwitch(kEndPageSwitch)); ASSERT_TRUE( - StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( + base::StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( kStartPageSwitch)), &g_start_page)); ASSERT_TRUE( - StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( + base::StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( kEndPageSwitch)), &g_end_page)); ASSERT_TRUE(g_start_page > 0 && g_end_page > 0); ASSERT_TRUE(g_start_page < g_end_page); @@ -645,14 +645,14 @@ void SetPageRange(const CommandLine& parsed_command_line) { if (parsed_command_line.HasSwitch(kStartIndexSwitch)) { ASSERT_TRUE( - StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( + base::StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( kStartIndexSwitch)), &g_start_index)); ASSERT_GT(g_start_index, 0); } if (parsed_command_line.HasSwitch(kEndIndexSwitch)) { ASSERT_TRUE( - StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( + base::StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( kEndIndexSwitch)), &g_end_index)); ASSERT_GT(g_end_index, 0); } @@ -664,7 +664,7 @@ void SetPageRange(const CommandLine& parsed_command_line) { if (parsed_command_line.HasSwitch(kIterationSwitch)) { ASSERT_TRUE( - StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( + base::StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( kIterationSwitch)), &g_iterations)); ASSERT_GT(g_iterations, 0); } @@ -685,7 +685,7 @@ void SetPageRange(const CommandLine& parsed_command_line) { if (parsed_command_line.HasSwitch(kTimeoutSwitch)) { ASSERT_TRUE( - StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( + base::StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( kTimeoutSwitch)), &g_timeout_ms)); ASSERT_GT(g_timeout_ms, 0); } diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc index a4ec1b9..ef25566 100644 --- a/chrome/test/startup/startup_test.cc +++ b/chrome/test/startup/startup_test.cc @@ -6,6 +6,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/platform_thread.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/sys_info.h" #include "base/test/test_file_util.h" @@ -226,7 +227,7 @@ class StartupTest : public UITest { if (nth_timed_tab > 0) { // Display only the time necessary to load the first n tabs. times.clear(); - name = name_base + "-" + IntToString(nth_timed_tab); + name = name_base + "-" + base::IntToString(nth_timed_tab); for (int i = 0; i < numCycles; ++i) StringAppendF(×, "%.2f,", timings[i].nth_tab_stop_ms); PrintResultList(graph, "", name.c_str(), times, "ms", important); diff --git a/chrome/test/sync/engine/test_id_factory.h b/chrome/test/sync/engine/test_id_factory.h index 70f4bba..9ae0469 100644 --- a/chrome/test/sync/engine/test_id_factory.h +++ b/chrome/test/sync/engine/test_id_factory.h @@ -10,7 +10,7 @@ #include <string> -#include "base/string_util.h" +#include "base/string_number_conversions.h" #include "chrome/browser/sync/syncable/syncable_id.h" namespace browser_sync { @@ -33,9 +33,9 @@ class TestIdFactory { if (value == 0) return root(); else if (value < 0) - return syncable::Id::CreateFromClientString(Int64ToString(value)); + return syncable::Id::CreateFromClientString(base::Int64ToString(value)); else - return syncable::Id::CreateFromServerId(Int64ToString(value)); + return syncable::Id::CreateFromServerId(base::Int64ToString(value)); } // Create a local ID from a name. @@ -51,13 +51,13 @@ class TestIdFactory { // Autogenerate a fresh local ID. syncable::Id NewLocalId() { return syncable::Id::CreateFromClientString( - std::string("_auto ") + IntToString(-next_value())); + std::string("_auto ") + base::IntToString(-next_value())); } // Autogenerate a fresh server ID. syncable::Id NewServerId() { return syncable::Id::CreateFromServerId( - std::string("_auto ") + IntToString(next_value())); + std::string("_auto ") + base::IntToString(next_value())); } private: diff --git a/chrome/test/ui/npapi_uitest.cc b/chrome/test/ui/npapi_uitest.cc index 440faf2..253532d 100644 --- a/chrome/test/ui/npapi_uitest.cc +++ b/chrome/test/ui/npapi_uitest.cc @@ -21,6 +21,7 @@ #include "base/file_path.h" #include "base/keyboard_codes.h" +#include "base/string_number_conversions.h" #include "chrome/browser/net/url_request_mock_http_job.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/url_constants.h" @@ -54,7 +55,7 @@ TEST_F(NPAPITester, FLAKY_ManyPlugins) { for (int i = 1; i <= 15; i++) { SCOPED_TRACE(StringPrintf("Waiting for plugin #%d", i)); - ASSERT_NO_FATAL_FAILURE(WaitForFinish("arguments", IntToString(i), + ASSERT_NO_FATAL_FAILURE(WaitForFinish("arguments", base::IntToString(i), url, kTestCompleteCookie, kTestCompleteSuccess, action_max_timeout_ms())); diff --git a/chrome/test/ui/ui_layout_test.cc b/chrome/test/ui/ui_layout_test.cc index 6c5415f..59486f6 100644 --- a/chrome/test/ui/ui_layout_test.cc +++ b/chrome/test/ui/ui_layout_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 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. @@ -6,7 +6,7 @@ #include "base/file_util.h" #include "base/path_service.h" -#include "base/string_util.h" +#include "base/string_number_conversions.h" #include "base/test/test_file_util.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" @@ -175,7 +175,7 @@ void UILayoutTest::RunLayoutTest(const std::string& test_case_file_name, // Creates a new cookie name. We will have to use a new cookie because // this function could be called multiple times. std::string status_cookie(kTestCompleteCookie); - status_cookie += IntToString(test_count_); + status_cookie += base::IntToString(test_count_); test_count_++; // Reads the layout test HTML file. diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index dde980e..e29c373 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -22,7 +22,7 @@ #include "base/process_util.h" #include "base/scoped_ptr.h" #include "base/scoped_temp_dir.h" -#include "base/string_util.h" +#include "base/string_number_conversions.h" #include "base/test/test_file_util.h" #include "base/time.h" #include "chrome/app/chrome_dll_resource.h" @@ -738,7 +738,7 @@ DictionaryValue* UITestBase::GetLocalState() { DictionaryValue* UITestBase::GetDefaultProfilePreferences() { FilePath path; PathService::Get(chrome::DIR_USER_DATA, &path); - path = path.AppendASCII(WideToASCII(chrome::kNotSignedInProfile)); + path = path.AppendASCII(WideToUTF8(chrome::kNotSignedInProfile)); return LoadDictionaryValueFromPath(path.Append(chrome::kPreferencesFilename)); } @@ -1228,7 +1228,7 @@ void UITestBase::UpdateHistoryDates() { ASSERT_TRUE(db.Open(history)); Time yesterday = Time::Now() - TimeDelta::FromDays(1); - std::string yesterday_str = Int64ToString(yesterday.ToInternalValue()); + std::string yesterday_str = base::Int64ToString(yesterday.ToInternalValue()); std::string query = StringPrintf( "UPDATE segment_usage " "SET time_slot = %s " |