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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 return do_log; | 451 return do_log; |
452 } | 452 } |
453 | 453 |
454 void NavigateThroughPageID(std::ofstream& log_file) { | 454 void NavigateThroughPageID(std::ofstream& log_file) { |
455 if (g_append_page_id) { | 455 if (g_append_page_id) { |
456 // For usage 2 | 456 // For usage 2 |
457 for (int i = g_start_page; i <= g_end_page; ++i) { | 457 for (int i = g_start_page; i <= g_end_page; ++i) { |
458 const char* server = g_server_url.empty() ? kDefaultServerUrl : | 458 const char* server = g_server_url.empty() ? kDefaultServerUrl : |
459 g_server_url.c_str(); | 459 g_server_url.c_str(); |
460 std::string test_page_url( | 460 std::string test_page_url( |
461 StringPrintf("%s/page?id=%d", server, i)); | 461 base::StringPrintf("%s/page?id=%d", server, i)); |
462 NavigateToURLLogResult( | 462 NavigateToURLLogResult( |
463 test_page_url, log_file, NULL, g_continuous_load, false); | 463 test_page_url, log_file, NULL, g_continuous_load, false); |
464 } | 464 } |
465 } else { | 465 } else { |
466 // Don't run if running as a standalone program which is for distributed | 466 // Don't run if running as a standalone program which is for distributed |
467 // testing, to avoid mistakenly hitting web sites with many instances. | 467 // testing, to avoid mistakenly hitting web sites with many instances. |
468 if (g_stand_alone) | 468 if (g_stand_alone) |
469 return; | 469 return; |
470 // For usage 1 | 470 // For usage 1 |
471 NavigationMetrics metrics; | 471 NavigationMetrics metrics; |
(...skipping 339 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 |