| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 std::string suffix("_"); | 653 std::string suffix("_"); |
| 654 suffix.append(base::IntToString(index)); | 654 suffix.append(base::IntToString(index)); |
| 655 return debug_log_path.InsertBeforeExtensionASCII(suffix); | 655 return debug_log_path.InsertBeforeExtensionASCII(suffix); |
| 656 } | 656 } |
| 657 | 657 |
| 658 void SaveDebugLog(const base::FilePath& log_path, const std::wstring& log_id, | 658 void SaveDebugLog(const base::FilePath& log_path, const std::wstring& log_id, |
| 659 std::ofstream& log_file, int index) { | 659 std::ofstream& log_file, int index) { |
| 660 if (!log_path.empty()) { | 660 if (!log_path.empty()) { |
| 661 base::FilePath saved_log_file_path = | 661 base::FilePath saved_log_file_path = |
| 662 ConstructSavedDebugLogPath(log_path, index); | 662 ConstructSavedDebugLogPath(log_path, index); |
| 663 if (file_util::Move(log_path, saved_log_file_path)) { | 663 if (base::Move(log_path, saved_log_file_path)) { |
| 664 log_file << " " << log_id << "=" << saved_log_file_path.value(); | 664 log_file << " " << log_id << "=" << saved_log_file_path.value(); |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 } | 667 } |
| 668 | 668 |
| 669 // Rename the chrome and v8 debug log files if existing, and save the file | 669 // Rename the chrome and v8 debug log files if existing, and save the file |
| 670 // paths in the log_file provided. | 670 // paths in the log_file provided. |
| 671 void SaveDebugLogs(std::ofstream& log_file) { | 671 void SaveDebugLogs(std::ofstream& log_file) { |
| 672 static int url_count = 1; | 672 static int url_count = 1; |
| 673 SaveDebugLog(g_chrome_log_path, L"chrome_log", log_file, url_count); | 673 SaveDebugLog(g_chrome_log_path, L"chrome_log", log_file, url_count); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 if (!g_end_url.empty()) { | 811 if (!g_end_url.empty()) { |
| 812 NavigateToURLLogResult( | 812 NavigateToURLLogResult( |
| 813 g_end_url, log_file, NULL, g_continuous_load, false); | 813 g_end_url, log_file, NULL, g_continuous_load, false); |
| 814 } | 814 } |
| 815 | 815 |
| 816 log_file.close(); | 816 log_file.close(); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace | 819 } // namespace |
| 820 | 820 |
| OLD | NEW |