| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/string_piece.h" | |
| 13 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
| 14 #include "base/test/test_timeouts.h" | 13 #include "base/test/test_timeouts.h" |
| 15 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/browser/net/url_fixer_upper.h" | 15 #include "chrome/browser/net/url_fixer_upper.h" |
| 17 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
| 18 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
| 19 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 20 #include "chrome/test/automation/tab_proxy.h" | 19 #include "chrome/test/automation/tab_proxy.h" |
| 21 #include "chrome/test/automation/window_proxy.h" | 20 #include "chrome/test/automation/window_proxy.h" |
| 22 #include "chrome/test/base/chrome_process_util.h" | 21 #include "chrome/test/base/chrome_process_util.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 324 |
| 326 static bool HasDatabaseErrors(const std::string timings) { | 325 static bool HasDatabaseErrors(const std::string timings) { |
| 327 size_t pos = 0; | 326 size_t pos = 0; |
| 328 size_t new_pos = 0; | 327 size_t new_pos = 0; |
| 329 std::string time_str; | 328 std::string time_str; |
| 330 int time = 0; | 329 int time = 0; |
| 331 do { | 330 do { |
| 332 new_pos = timings.find(',', pos); | 331 new_pos = timings.find(',', pos); |
| 333 if (new_pos == std::string::npos) | 332 if (new_pos == std::string::npos) |
| 334 new_pos = timings.length(); | 333 new_pos = timings.length(); |
| 335 if (!base::StringToInt(base::StringPiece(timings.begin() + pos, | 334 if (!base::StringToInt(timings.begin() + pos, |
| 336 timings.begin() + new_pos), | 335 timings.begin() + new_pos, |
| 337 &time)) { | 336 &time)) { |
| 338 LOG(ERROR) << "Invalid time reported: " << time_str; | 337 LOG(ERROR) << "Invalid time reported: " << time_str; |
| 339 return true; | 338 return true; |
| 340 } | 339 } |
| 341 if (time < 0) { | 340 if (time < 0) { |
| 342 switch (time) { | 341 switch (time) { |
| 343 case -1: | 342 case -1: |
| 344 LOG(ERROR) << "Error while opening the database."; | 343 LOG(ERROR) << "Error while opening the database."; |
| 345 break; | 344 break; |
| 346 case -2: | 345 case -2: |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", | 530 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", |
| 532 DeleteTransactions); | 531 DeleteTransactions); |
| 533 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", | 532 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", |
| 534 PseudoRandomTransactions); | 533 PseudoRandomTransactions); |
| 535 #endif | 534 #endif |
| 536 | 535 |
| 537 // Indexed DB tests. | 536 // Indexed DB tests. |
| 538 PAGE_CYCLER_IDB_TESTS("basic_insert", BasicInsert); | 537 PAGE_CYCLER_IDB_TESTS("basic_insert", BasicInsert); |
| 539 | 538 |
| 540 } // namespace | 539 } // namespace |
| OLD | NEW |