summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authorchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-14 20:26:41 +0000
committerchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-14 20:26:41 +0000
commit6eb717945d816bb5b5e410183c948cdf136c0be1 (patch)
treeac6e9dd0b44872661f0c5d41f65ad4746d7df984 /chrome/test/ui
parent36779fae2a6b23bf2673021cd12bcf6881c89c98 (diff)
downloadchromium_src-6eb717945d816bb5b5e410183c948cdf136c0be1.zip
chromium_src-6eb717945d816bb5b5e410183c948cdf136c0be1.tar.gz
chromium_src-6eb717945d816bb5b5e410183c948cdf136c0be1.tar.bz2
Add reference build to tab switching tests.
Moves 'UseReferenceBuild' from NewTabUIStartupTest into UITest. Run multiple tab switching tests for the current and reference build. Locate the debug log based on the current browser directory. Reformat the output of the test so we print "times" as our test type instead of "tab_switch" (probably requires a perf dashboard update). BUG=25200 TEST=tab switching test also tests reference build Review URL: http://codereview.chromium.org/491090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/ui_test.cc15
-rw-r--r--chrome/test/ui/ui_test.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index b243140..830150c 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -1425,3 +1425,18 @@ void UITest::PrintSystemCommitCharge(const char* test_name,
std::string trace_name(test_name);
PrintResult("commit_charge", "", "cc" + trace_name, charge, "kb", important);
}
+
+void UITest::UseReferenceBuild() {
+ FilePath dir;
+ PathService::Get(chrome::DIR_TEST_TOOLS, &dir);
+ dir = dir.AppendASCII("reference_build");
+#if defined(OS_WIN)
+ dir = dir.AppendASCII("chrome");
+#elif defined(OS_LINUX)
+ dir = dir.AppendASCII("chrome_linux");
+#elif defined(OS_MACOSX)
+ dir = dir.AppendASCII("chrome_mac");
+#endif
+ browser_directory_ = dir;
+}
+
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 22de5c3..8d8331c 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -463,6 +463,9 @@ class UITest : public testing::Test {
size_t charge,
bool important);
+ // Configures the test to use the reference build.
+ void UseReferenceBuild();
+
private:
// Check that no processes related to Chrome exist, displaying
// the given message if any do.