| 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 // This file provides reliablity test which runs under UI test framework. The | 5 // This file provides reliablity test which runs under UI test framework. The |
| 6 // test is intended to run within QEMU environment. | 6 // test is intended to run within QEMU environment. |
| 7 // | 7 // |
| 8 // Usage 1: reliability_test | 8 // Usage 1: reliability_test |
| 9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly | 9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly |
| 10 // used by buildbot, to verify reliability_test itself runs ok. | 10 // used by buildbot, to verify reliability_test itself runs ok. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "chrome/common/chrome_switches.h" | 53 #include "chrome/common/chrome_switches.h" |
| 54 #include "chrome/common/logging_chrome.h" | 54 #include "chrome/common/logging_chrome.h" |
| 55 #include "chrome/common/pref_names.h" | 55 #include "chrome/common/pref_names.h" |
| 56 #include "chrome/common/pref_service.h" | 56 #include "chrome/common/pref_service.h" |
| 57 #include "chrome/test/automation/automation_messages.h" | 57 #include "chrome/test/automation/automation_messages.h" |
| 58 #include "chrome/test/automation/automation_proxy.h" | 58 #include "chrome/test/automation/automation_proxy.h" |
| 59 #include "chrome/test/automation/browser_proxy.h" | 59 #include "chrome/test/automation/browser_proxy.h" |
| 60 #include "chrome/test/automation/tab_proxy.h" | 60 #include "chrome/test/automation/tab_proxy.h" |
| 61 #include "chrome/test/automation/window_proxy.h" | 61 #include "chrome/test/automation/window_proxy.h" |
| 62 #include "chrome/test/ui/ui_test.h" | 62 #include "chrome/test/ui/ui_test.h" |
| 63 #include "chrome/test/perf/mem_usage.h" | |
| 64 #include "chrome/test/reliability/page_load_test.h" | 63 #include "chrome/test/reliability/page_load_test.h" |
| 65 #include "net/base/net_util.h" | 64 #include "net/base/net_util.h" |
| 66 | 65 |
| 67 namespace { | 66 namespace { |
| 68 | 67 |
| 69 // See comments at the beginning of the file for the definition of switches. | 68 // See comments at the beginning of the file for the definition of switches. |
| 70 const char kSiteSwitch[] = "site"; | 69 const char kSiteSwitch[] = "site"; |
| 71 const char kStartPageSwitch[] = "startpage"; | 70 const char kStartPageSwitch[] = "startpage"; |
| 72 const char kEndPageSwitch[] = "endpage"; | 71 const char kEndPageSwitch[] = "endpage"; |
| 73 const char kListSwitch[] = "list"; | 72 const char kListSwitch[] = "list"; |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 if (!g_log_file_path.empty()) { | 600 if (!g_log_file_path.empty()) { |
| 602 log_file.open(g_log_file_path.value().c_str()); | 601 log_file.open(g_log_file_path.value().c_str()); |
| 603 } | 602 } |
| 604 | 603 |
| 605 for (int k = 0; k < g_iterations; ++k) { | 604 for (int k = 0; k < g_iterations; ++k) { |
| 606 if (g_url_file_path.empty()) { | 605 if (g_url_file_path.empty()) { |
| 607 NavigateThroughPageID(log_file); | 606 NavigateThroughPageID(log_file); |
| 608 } else { | 607 } else { |
| 609 NavigateThroughURLList(log_file); | 608 NavigateThroughURLList(log_file); |
| 610 } | 609 } |
| 611 | |
| 612 // TODO(estade): port. | |
| 613 #if defined(OS_WIN) | |
| 614 if (g_memory_usage) | |
| 615 PrintChromeMemoryUsageInfo(); | |
| 616 #endif // defined(OS_WIN) | |
| 617 } | 610 } |
| 618 | 611 |
| 619 if (!g_end_url.empty()) { | 612 if (!g_end_url.empty()) { |
| 620 NavigateToURLLogResult(g_end_url, log_file, NULL); | 613 NavigateToURLLogResult(g_end_url, log_file, NULL); |
| 621 } | 614 } |
| 622 | 615 |
| 623 log_file.close(); | 616 log_file.close(); |
| 624 } | 617 } |
| 625 | 618 |
| 626 } // namespace | 619 } // namespace |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 g_v8_log_path = FilePath::FromWStringHack( | 724 g_v8_log_path = FilePath::FromWStringHack( |
| 732 v8_command_line.GetSwitchValue(kV8LogFileSwitch)); | 725 v8_command_line.GetSwitchValue(kV8LogFileSwitch)); |
| 733 if (!file_util::AbsolutePath(&g_v8_log_path)) { | 726 if (!file_util::AbsolutePath(&g_v8_log_path)) { |
| 734 g_v8_log_path = FilePath(); | 727 g_v8_log_path = FilePath(); |
| 735 } | 728 } |
| 736 } | 729 } |
| 737 } | 730 } |
| 738 } | 731 } |
| 739 } | 732 } |
| 740 } | 733 } |
| OLD | NEW |