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

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

Issue 209022: Enable page load test on linux (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: dont compile page load test on mac Created 11 years, 3 months 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/chrome.gyp ('k') | chrome/test/ui/ui_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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "chrome/test/automation/automation_messages.h" 56 #include "chrome/test/automation/automation_messages.h"
57 #include "chrome/test/automation/automation_proxy.h" 57 #include "chrome/test/automation/automation_proxy.h"
58 #include "chrome/test/automation/browser_proxy.h" 58 #include "chrome/test/automation/browser_proxy.h"
59 #include "chrome/test/automation/tab_proxy.h" 59 #include "chrome/test/automation/tab_proxy.h"
60 #include "chrome/test/automation/window_proxy.h" 60 #include "chrome/test/automation/window_proxy.h"
61 #include "chrome/test/ui/ui_test.h" 61 #include "chrome/test/ui/ui_test.h"
62 #include "chrome/test/perf/mem_usage.h" 62 #include "chrome/test/perf/mem_usage.h"
63 #include "chrome/test/reliability/page_load_test.h" 63 #include "chrome/test/reliability/page_load_test.h"
64 #include "net/base/net_util.h" 64 #include "net/base/net_util.h"
65 65
66 #if defined(OS_WIN)
67 #define MAYBE_Reliability Reliability
68 #else // defined(OS_WIN)
69 // TODO(estade): port till we can enable this.
70 #define MAYBE_Reliability DISABLED_Reliability
71 #endif // !defined(OS_WIN)
72
73 namespace { 66 namespace {
74 67
75 // 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.
76 const wchar_t kSiteSwitch[] = L"site"; 69 const wchar_t kSiteSwitch[] = L"site";
77 const wchar_t kStartPageSwitch[] = L"startpage"; 70 const wchar_t kStartPageSwitch[] = L"startpage";
78 const wchar_t kEndPageSwitch[] = L"endpage"; 71 const wchar_t kEndPageSwitch[] = L"endpage";
79 const wchar_t kListSwitch[] = L"list"; 72 const wchar_t kListSwitch[] = L"list";
80 const wchar_t kStartIndexSwitch[] = L"startline"; 73 const wchar_t kStartIndexSwitch[] = L"startline";
81 const wchar_t kEndIndexSwitch[] = L"endline"; 74 const wchar_t kEndIndexSwitch[] = L"endline";
82 const wchar_t kIterationSwitch[] = L"iterations"; 75 const wchar_t kIterationSwitch[] = L"iterations";
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // The set is implemented as a std::map. The key is the file name, and 586 // The set is implemented as a std::map. The key is the file name, and
594 // the value is false (the file is not in the set) or true (the file is 587 // the value is false (the file is not in the set) or true (the file is
595 // in the set). The initial value for any key in std::map is 0 (false), 588 // in the set). The initial value for any key in std::map is 0 (false),
596 // which in this case means a new file is not in the set initially, 589 // which in this case means a new file is not in the set initially,
597 // exactly the semantics we want. 590 // exactly the semantics we want.
598 std::map<FilePath, bool> crash_dumps_; 591 std::map<FilePath, bool> crash_dumps_;
599 }; 592 };
600 593
601 } // namespace 594 } // namespace
602 595
603 TEST_F(PageLoadTest, MAYBE_Reliability) { 596 TEST_F(PageLoadTest, Reliability) {
604 std::ofstream log_file; 597 std::ofstream log_file;
605 598
606 if (!g_log_file_path.empty()) { 599 if (!g_log_file_path.empty()) {
607 log_file.open(g_log_file_path.value().c_str()); 600 log_file.open(g_log_file_path.value().c_str());
608 } 601 }
609 602
610 for (int k = 0; k < g_iterations; ++k) { 603 for (int k = 0; k < g_iterations; ++k) {
611 if (g_url_file_path.empty()) { 604 if (g_url_file_path.empty()) {
612 NavigateThroughPageID(log_file); 605 NavigateThroughPageID(log_file);
613 } else { 606 } else {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698