diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 17:12:09 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 17:12:09 +0000 |
commit | 9db9a8ed63bf7d194e687151d86f47eab7292206 (patch) | |
tree | f7511a1336a5685cf95461f2ca2a6111a1ff87ce | |
parent | 12c8f8ebcd8d24e1ae70eb6e76b03c18e54278ab (diff) | |
download | chromium_src-9db9a8ed63bf7d194e687151d86f47eab7292206.zip chromium_src-9db9a8ed63bf7d194e687151d86f47eab7292206.tar.gz chromium_src-9db9a8ed63bf7d194e687151d86f47eab7292206.tar.bz2 |
Addding reference build results for DOM perf tests
BUG=http://crbug.com/17577
TEST=none
Review URL: http://codereview.chromium.org/171075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24242 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/url_fetch_test/url_fetch_test.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc index 57654b4..75be5ab 100644 --- a/chrome/test/url_fetch_test/url_fetch_test.cc +++ b/chrome/test/url_fetch_test/url_fetch_test.cc @@ -6,6 +6,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/string_util.h" +#include "chrome/common/chrome_paths.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/ui/ui_test.h" @@ -24,6 +25,24 @@ class UrlFetchTest : public UITest { std::string javascript_variable; }; + void SetUp() { + const CommandLine *cmdLine = CommandLine::ForCurrentProcess(); + if (cmdLine->HasSwitch(L"reference_build")) { + 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; + } + UITest::SetUp(); + } + void RunTest(const GURL& url, const char *waitCookieName, const char *waitCookieValue, const wchar_t *varToFetch, UrlFetchTestResult *result) { @@ -84,6 +103,9 @@ bool writeValueToFile(std::string value, std::wstring filePath) { // --jsvar_output=<filepath> // Write the value of the variable named by '--jsvar' to a file at the given // path. +// +// --reference_build +// Use the reference build of chrome for the test. TEST_F(UrlFetchTest, UrlFetch) { const CommandLine *cmdLine = CommandLine::ForCurrentProcess(); |