| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/eintr_wrapper.h" | 7 #include "base/eintr_wrapper.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 #endif | 173 #endif |
| 174 UITest::SetUp(); | 174 UITest::SetUp(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 // For HTTP tests, the name must be safe for use in a URL without escaping. | 177 // For HTTP tests, the name must be safe for use in a URL without escaping. |
| 178 void RunPageCycler(const char* name, std::wstring* pages, | 178 void RunPageCycler(const char* name, std::wstring* pages, |
| 179 std::string* timings, bool use_http) { | 179 std::string* timings, bool use_http) { |
| 180 | 180 |
| 181 // Make sure the test data is checked out | 181 // Make sure the test data is checked out |
| 182 FilePath test_path; | 182 FilePath test_path; |
| 183 PathService::Get(base::DIR_EXE, &test_path); | 183 PathService::Get(base::DIR_SOURCE_ROOT, &test_path); |
| 184 test_path = test_path.DirName(); | |
| 185 test_path = test_path.DirName(); | |
| 186 test_path = test_path.Append(FILE_PATH_LITERAL("data")); | 184 test_path = test_path.Append(FILE_PATH_LITERAL("data")); |
| 187 test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler")); | 185 test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler")); |
| 188 test_path = test_path.AppendASCII(name); | 186 test_path = test_path.AppendASCII(name); |
| 189 ASSERT_TRUE(file_util::PathExists(test_path)) << "Missing test data"; | 187 ASSERT_TRUE(file_util::PathExists(test_path)) << "Missing test data"; |
| 190 | 188 |
| 191 #if defined(OS_MACOSX) | 189 #if defined(OS_MACOSX) |
| 192 PopulateUBC(test_path); | 190 PopulateUBC(test_path); |
| 193 #endif | 191 #endif |
| 194 | 192 |
| 195 GURL test_url; | 193 GURL test_url; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 518 |
| 521 TEST_F(PageCyclerTest, BloatHttp) { | 519 TEST_F(PageCyclerTest, BloatHttp) { |
| 522 RunTest("bloat", true); | 520 RunTest("bloat", true); |
| 523 } | 521 } |
| 524 | 522 |
| 525 TEST_F(PageCyclerReferenceTest, BloatHttp) { | 523 TEST_F(PageCyclerReferenceTest, BloatHttp) { |
| 526 RunTest("bloat", true); | 524 RunTest("bloat", true); |
| 527 } | 525 } |
| 528 | 526 |
| 529 } // namespace | 527 } // namespace |
| OLD | NEW |