summaryrefslogtreecommitdiffstats
path: root/chrome/test/startup
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 14:36:33 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 14:36:33 +0000
commitf6d3e11d42746c43869f9c3066ca60d585489cd0 (patch)
tree9fc0c4984d4cdd418680c6203b9262d4f9a7c60c /chrome/test/startup
parent34c70c9f8f89e5293cc9c6de9742adfbba5810bf (diff)
downloadchromium_src-f6d3e11d42746c43869f9c3066ca60d585489cd0.zip
chromium_src-f6d3e11d42746c43869f9c3066ca60d585489cd0.tar.gz
chromium_src-f6d3e11d42746c43869f9c3066ca60d585489cd0.tar.bz2
Make startup_tests print results on Linux.
Switch from wstring to string where needed. Review URL: http://codereview.chromium.org/42303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/startup')
-rw-r--r--chrome/test/startup/feature_startup_test.cc14
-rw-r--r--chrome/test/startup/startup_test.cc18
2 files changed, 16 insertions, 16 deletions
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc
index 28d16e8..770ceb4 100644
--- a/chrome/test/startup/feature_startup_test.cc
+++ b/chrome/test/startup/feature_startup_test.cc
@@ -41,18 +41,18 @@ class NewTabUIStartupTest : public UITest {
static const int kNumCycles = 5;
- void PrintTimings(const wchar_t* label, TimeDelta timings[kNumCycles],
+ void PrintTimings(const char* label, TimeDelta timings[kNumCycles],
bool important) {
- std::wstring times;
+ std::string times;
for (int i = 0; i < kNumCycles; ++i)
- StringAppendF(&times, L"%.2f,", timings[i].InMillisecondsF());
- PrintResultList(L"new_tab", L"", label, times, L"ms", important);
+ StringAppendF(&times, "%.2f,", timings[i].InMillisecondsF());
+ PrintResultList("new_tab", "", label, times, "ms", important);
}
// Run the test, by bringing up a browser and timing the new tab startup.
// |want_warm| is true if we should output warm-disk timings, false if
// we should report cold timings.
- void RunStartupTest(const wchar_t* label, bool want_warm, bool important) {
+ void RunStartupTest(const char* label, bool want_warm, bool important) {
// Install the location of the test profile file.
set_template_user_data(ComputeTypicalUserDataSource());
@@ -103,9 +103,9 @@ class NewTabUIStartupTest : public UITest {
// TODO(pamg): run these tests with a reference build?
TEST_F(NewTabUIStartupTest, PerfCold) {
- RunStartupTest(L"tab_cold", false /* not cold */, true /* important */);
+ RunStartupTest("tab_cold", false /* not cold */, true /* important */);
}
TEST_F(NewTabUIStartupTest, DISABLED_PerfWarm) {
- RunStartupTest(L"tab_warm", true /* cold */, false /* not important */);
+ RunStartupTest("tab_warm", true /* cold */, false /* not important */);
}
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 665b0e6..72b239b 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -28,7 +28,7 @@ class StartupTest : public UITest {
void SetUp() {}
void TearDown() {}
- void RunStartupTest(const wchar_t* graph, const wchar_t* trace,
+ void RunStartupTest(const char* graph, const char* trace,
bool test_cold, bool important) {
const int kNumCycles = 20;
@@ -69,10 +69,10 @@ class StartupTest : public UITest {
}
}
- std::wstring times;
+ std::string times;
for (int i = 0; i < kNumCycles; ++i)
- StringAppendF(&times, L"%.2f,", timings[i].InMillisecondsF());
- PrintResultList(graph, L"", trace, times, L"ms", important);
+ StringAppendF(&times, "%.2f,", timings[i].InMillisecondsF());
+ PrintResultList(graph, "", trace, times, "ms", important);
}
protected:
@@ -110,30 +110,30 @@ class StartupFileTest : public StartupTest {
} // namespace
TEST_F(StartupTest, Perf) {
- RunStartupTest(L"warm", L"t", false /* not cold */, true /* important */);
+ RunStartupTest("warm", "t", false /* not cold */, true /* important */);
}
#if defined(OS_WIN)
// TODO(port): Enable reference tests on other platforms.
TEST_F(StartupReferenceTest, Perf) {
- RunStartupTest(L"warm", L"t_ref", false /* not cold */,
+ RunStartupTest("warm", "t_ref", false /* not cold */,
true /* important */);
}
// TODO(mpcomplete): Should we have reference timings for all these?
TEST_F(StartupTest, PerfCold) {
- RunStartupTest(L"cold", L"t", true /* cold */, false /* not important */);
+ RunStartupTest("cold", "t", true /* cold */, false /* not important */);
}
TEST_F(StartupFileTest, PerfGears) {
- RunStartupTest(L"warm", L"gears", false /* not cold */,
+ RunStartupTest("warm", "gears", false /* not cold */,
false /* not important */);
}
TEST_F(StartupFileTest, PerfColdGears) {
- RunStartupTest(L"cold", L"gears", true /* cold */,
+ RunStartupTest("cold", "gears", true /* cold */,
false /* not important */);
}