Skip to content

Commit

Permalink
Addding reference build results for DOM perf tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
asargent@chromium.org committed Aug 25, 2009
1 parent 12c8f8e commit 9db9a8e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions chrome/test/url_fetch_test/url_fetch_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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) {
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 9db9a8e

Please sign in to comment.