| 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/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
| 13 #include "chrome/browser/net/url_fixer_upper.h" | 13 #include "chrome/browser/net/url_fixer_upper.h" |
| 14 #include "chrome/common/chrome_constants.h" | 14 #include "chrome/common/chrome_constants.h" |
| 15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/test/automation/tab_proxy.h" | 17 #include "chrome/test/automation/tab_proxy.h" |
| 18 #include "chrome/test/automation/window_proxy.h" | 18 #include "chrome/test/automation/window_proxy.h" |
| 19 #include "chrome/test/chrome_process_util.h" | 19 #include "chrome/test/chrome_process_util.h" |
| 20 #include "chrome/test/ui/ui_test.h" | 20 #include "chrome/test/ui/ui_test.h" |
| 21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 if (use_http) { | 208 if (use_http) { |
| 209 test_url = GURL(std::string(kBaseUrl) + name + "/start.html"); | 209 test_url = GURL(std::string(kBaseUrl) + name + "/start.html"); |
| 210 } else { | 210 } else { |
| 211 test_path = test_path.Append(FILE_PATH_LITERAL("start.html")); | 211 test_path = test_path.Append(FILE_PATH_LITERAL("start.html")); |
| 212 test_url = net::FilePathToFileURL(test_path); | 212 test_url = net::FilePathToFileURL(test_path); |
| 213 } | 213 } |
| 214 | 214 |
| 215 // run N iterations | 215 // run N iterations |
| 216 GURL::Replacements replacements; | 216 GURL::Replacements replacements; |
| 217 const std::string query_string = | 217 const std::string query_string = |
| 218 "iterations=" + IntToString(GetTestIterations()) + "&auto=1"; | 218 "iterations=" + base::IntToString(GetTestIterations()) + "&auto=1"; |
| 219 replacements.SetQuery( | 219 replacements.SetQuery( |
| 220 query_string.c_str(), | 220 query_string.c_str(), |
| 221 url_parse::Component(0, query_string.length())); | 221 url_parse::Component(0, query_string.length())); |
| 222 test_url = test_url.ReplaceComponents(replacements); | 222 test_url = test_url.ReplaceComponents(replacements); |
| 223 | 223 |
| 224 scoped_refptr<TabProxy> tab(GetActiveTab()); | 224 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 225 ASSERT_TRUE(tab.get()); | 225 ASSERT_TRUE(tab.get()); |
| 226 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url)); | 226 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url)); |
| 227 | 227 |
| 228 // Wait for the test to finish. | 228 // Wait for the test to finish. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 InsertTransactions); | 492 InsertTransactions); |
| 493 PAGE_CYCLER_DATABASE_TESTS("update-transactions", | 493 PAGE_CYCLER_DATABASE_TESTS("update-transactions", |
| 494 UpdateTransactions); | 494 UpdateTransactions); |
| 495 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", | 495 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", |
| 496 DeleteTransactions); | 496 DeleteTransactions); |
| 497 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", | 497 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", |
| 498 PseudoRandomTransactions); | 498 PseudoRandomTransactions); |
| 499 #endif | 499 #endif |
| 500 | 500 |
| 501 } // namespace | 501 } // namespace |
| OLD | NEW |