| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 // For HTTP tests, the name must be safe for use in a URL without escaping. | 178 // For HTTP tests, the name must be safe for use in a URL without escaping. |
| 179 void RunPageCycler(const char* name, std::wstring* pages, | 179 void RunPageCycler(const char* name, std::wstring* pages, |
| 180 std::string* timings, bool use_http) { | 180 std::string* timings, bool use_http) { |
| 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_SOURCE_ROOT, &test_path); | 183 PathService::Get(base::DIR_SOURCE_ROOT, &test_path); |
| 184 test_path = test_path.Append(FILE_PATH_LITERAL("data")); | 184 test_path = test_path.Append(FILE_PATH_LITERAL("data")); |
| 185 test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler")); | 185 test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler")); |
| 186 test_path = test_path.AppendASCII(name); | 186 test_path = test_path.AppendASCII(name); |
| 187 ASSERT_TRUE(file_util::PathExists(test_path)) << "Missing test data"; | 187 ASSERT_TRUE(file_util::PathExists(test_path)) << "Missing test data" |
| 188 << test_path.value(); |
| 188 | 189 |
| 189 #if defined(OS_MACOSX) | 190 #if defined(OS_MACOSX) |
| 190 PopulateUBC(test_path); | 191 PopulateUBC(test_path); |
| 191 #endif | 192 #endif |
| 192 | 193 |
| 193 GURL test_url; | 194 GURL test_url; |
| 194 if (use_http) { | 195 if (use_http) { |
| 195 test_url = GURL(std::string(kBaseUrl) + name + "/start.html"); | 196 test_url = GURL(std::string(kBaseUrl) + name + "/start.html"); |
| 196 } else { | 197 } else { |
| 197 test_path = test_path.Append(FILE_PATH_LITERAL("start.html")); | 198 test_path = test_path.Append(FILE_PATH_LITERAL("start.html")); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 363 |
| 363 // http (localhost) tests | 364 // http (localhost) tests |
| 364 PAGE_CYCLER_HTTP_TESTS("moz", MozHttp); | 365 PAGE_CYCLER_HTTP_TESTS("moz", MozHttp); |
| 365 PAGE_CYCLER_HTTP_TESTS("intl1", Intl1Http); | 366 PAGE_CYCLER_HTTP_TESTS("intl1", Intl1Http); |
| 366 PAGE_CYCLER_HTTP_TESTS("intl2", Intl2Http); | 367 PAGE_CYCLER_HTTP_TESTS("intl2", Intl2Http); |
| 367 PAGE_CYCLER_HTTP_TESTS("dom", DomHttp); | 368 PAGE_CYCLER_HTTP_TESTS("dom", DomHttp); |
| 368 PAGE_CYCLER_HTTP_TESTS("bloat", BloatHttp); | 369 PAGE_CYCLER_HTTP_TESTS("bloat", BloatHttp); |
| 369 | 370 |
| 370 | 371 |
| 371 } // namespace | 372 } // namespace |
| OLD | NEW |