Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chrome/test/reliability/page_load_test.cc

Issue 375016: Use GetSwitchValuePath. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/memory_test/memory_test.cc ('k') | webkit/tools/test_shell/node_leak_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 660
661 if (parsed_command_line.HasSwitch(kEndIndexSwitch)) { 661 if (parsed_command_line.HasSwitch(kEndIndexSwitch)) {
662 ASSERT_TRUE( 662 ASSERT_TRUE(
663 StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( 663 StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue(
664 kEndIndexSwitch)), &g_end_index)); 664 kEndIndexSwitch)), &g_end_index));
665 ASSERT_GT(g_end_index, 0); 665 ASSERT_GT(g_end_index, 0);
666 } 666 }
667 667
668 ASSERT_TRUE(g_end_index >= g_start_index); 668 ASSERT_TRUE(g_end_index >= g_start_index);
669 669
670 if (parsed_command_line.HasSwitch(kListSwitch)) { 670 if (parsed_command_line.HasSwitch(kListSwitch))
671 g_url_file_path = FilePath::FromWStringHack( 671 g_url_file_path = parsed_command_line.GetSwitchValuePath(kListSwitch);
672 parsed_command_line.GetSwitchValue(kListSwitch));
673 }
674 672
675 if (parsed_command_line.HasSwitch(kIterationSwitch)) { 673 if (parsed_command_line.HasSwitch(kIterationSwitch)) {
676 ASSERT_TRUE( 674 ASSERT_TRUE(
677 StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( 675 StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue(
678 kIterationSwitch)), &g_iterations)); 676 kIterationSwitch)), &g_iterations));
679 ASSERT_GT(g_iterations, 0); 677 ASSERT_GT(g_iterations, 0);
680 } 678 }
681 679
682 if (parsed_command_line.HasSwitch(kMemoryUsageSwitch)) 680 if (parsed_command_line.HasSwitch(kMemoryUsageSwitch))
683 g_memory_usage = true; 681 g_memory_usage = true;
684 682
685 if (parsed_command_line.HasSwitch(kContinuousLoadSwitch)) 683 if (parsed_command_line.HasSwitch(kContinuousLoadSwitch))
686 g_continuous_load = true; 684 g_continuous_load = true;
687 685
688 if (parsed_command_line.HasSwitch(kEndURLSwitch)) { 686 if (parsed_command_line.HasSwitch(kEndURLSwitch)) {
689 g_end_url = WideToUTF8( 687 g_end_url = WideToUTF8(
690 parsed_command_line.GetSwitchValue(kEndURLSwitch)); 688 parsed_command_line.GetSwitchValue(kEndURLSwitch));
691 } 689 }
692 690
693 if (parsed_command_line.HasSwitch(kLogFileSwitch)) { 691 if (parsed_command_line.HasSwitch(kLogFileSwitch))
694 g_log_file_path = 692 g_log_file_path = parsed_command_line.GetSwitchValuePath(kLogFileSwitch);
695 FilePath::FromWStringHack(
696 parsed_command_line.GetSwitchValue(kLogFileSwitch));
697 }
698 693
699 if (parsed_command_line.HasSwitch(kTimeoutSwitch)) { 694 if (parsed_command_line.HasSwitch(kTimeoutSwitch)) {
700 ASSERT_TRUE( 695 ASSERT_TRUE(
701 StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue( 696 StringToInt(WideToUTF16(parsed_command_line.GetSwitchValue(
702 kTimeoutSwitch)), &g_timeout_ms)); 697 kTimeoutSwitch)), &g_timeout_ms));
703 ASSERT_GT(g_timeout_ms, 0); 698 ASSERT_GT(g_timeout_ms, 0);
704 } 699 }
705 700
706 if (parsed_command_line.HasSwitch(kNoPageDownSwitch)) 701 if (parsed_command_line.HasSwitch(kNoPageDownSwitch))
707 g_page_down = false; 702 g_page_down = false;
708 703
709 if (parsed_command_line.HasSwitch(kNoClearProfileSwitch)) 704 if (parsed_command_line.HasSwitch(kNoClearProfileSwitch))
710 g_clear_profile = false; 705 g_clear_profile = false;
711 706
712 if (parsed_command_line.HasSwitch(kSaveDebugLogSwitch)) { 707 if (parsed_command_line.HasSwitch(kSaveDebugLogSwitch)) {
713 g_save_debug_log = true; 708 g_save_debug_log = true;
714 g_chrome_log_path = logging::GetLogFileName(); 709 g_chrome_log_path = logging::GetLogFileName();
715 // We won't get v8 log unless --no-sandbox is specified. 710 // We won't get v8 log unless --no-sandbox is specified.
716 if (parsed_command_line.HasSwitch(switches::kNoSandbox)) { 711 if (parsed_command_line.HasSwitch(switches::kNoSandbox)) {
717 PathService::Get(base::DIR_CURRENT, &g_v8_log_path); 712 PathService::Get(base::DIR_CURRENT, &g_v8_log_path);
718 g_v8_log_path = g_v8_log_path.AppendASCII(kV8LogFileDefaultName); 713 g_v8_log_path = g_v8_log_path.AppendASCII(kV8LogFileDefaultName);
719 // The command line switch may override the default v8 log path. 714 // The command line switch may override the default v8 log path.
720 if (parsed_command_line.HasSwitch(switches::kJavaScriptFlags)) { 715 if (parsed_command_line.HasSwitch(switches::kJavaScriptFlags)) {
721 CommandLine v8_command_line( 716 CommandLine v8_command_line(
722 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); 717 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags));
723 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { 718 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) {
724 g_v8_log_path = FilePath::FromWStringHack( 719 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch);
725 v8_command_line.GetSwitchValue(kV8LogFileSwitch)); 720 if (!file_util::AbsolutePath(&g_v8_log_path))
726 if (!file_util::AbsolutePath(&g_v8_log_path)) {
727 g_v8_log_path = FilePath(); 721 g_v8_log_path = FilePath();
728 }
729 } 722 }
730 } 723 }
731 } 724 }
732 } 725 }
733 } 726 }
OLDNEW
« no previous file with comments | « chrome/test/memory_test/memory_test.cc ('k') | webkit/tools/test_shell/node_leak_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698