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

Side by Side Diff: chrome/test/page_cycler/page_cycler_test.cc

Issue 3137040: GTTF: Extract performance-testing-specific parts of UITestBase to UIPerfTest.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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/test/memory_test/memory_test.cc ('k') | chrome/test/startup/feature_startup_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/net/url_fixer_upper.h" 14 #include "chrome/browser/net/url_fixer_upper.h"
15 #include "chrome/common/chrome_constants.h" 15 #include "chrome/common/chrome_constants.h"
16 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/test/automation/tab_proxy.h" 18 #include "chrome/test/automation/tab_proxy.h"
19 #include "chrome/test/automation/window_proxy.h" 19 #include "chrome/test/automation/window_proxy.h"
20 #include "chrome/test/chrome_process_util.h" 20 #include "chrome/test/chrome_process_util.h"
21 #include "chrome/test/test_switches.h" 21 #include "chrome/test/test_switches.h"
22 #include "chrome/test/ui/ui_test.h" 22 #include "chrome/test/ui/ui_perf_test.h"
23 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
24 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
25 25
26 #if defined(OS_MACOSX) 26 #if defined(OS_MACOSX)
27 #include <string.h> 27 #include <string.h>
28 #include <sys/resource.h> 28 #include <sys/resource.h>
29 #endif 29 #endif
30 30
31 #ifndef NDEBUG 31 #ifndef NDEBUG
32 #define TEST_ITERATIONS 2 32 #define TEST_ITERATIONS 2
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 // Read the file fully to get it into the cache. 145 // Read the file fully to get it into the cache.
146 // We don't care what the contents are. 146 // We don't care what the contents are.
147 if (file_util::ReadFileToString(path, NULL)) 147 if (file_util::ReadFileToString(path, NULL))
148 ++loaded; 148 ++loaded;
149 } 149 }
150 } 150 }
151 LOG(INFO) << "Buffer cache should be primed with " << loaded << " files."; 151 LOG(INFO) << "Buffer cache should be primed with " << loaded << " files.";
152 } 152 }
153 153
154 class PageCyclerTest : public UITest { 154 class PageCyclerTest : public UIPerfTest {
155 protected: 155 protected:
156 bool print_times_only_; 156 bool print_times_only_;
157 int num_test_iterations_; 157 int num_test_iterations_;
158 #if defined(OS_MACOSX) 158 #if defined(OS_MACOSX)
159 rlim_t fd_limit_; 159 rlim_t fd_limit_;
160 #endif 160 #endif
161 public: 161 public:
162 PageCyclerTest() 162 PageCyclerTest()
163 : print_times_only_(false) { 163 : print_times_only_(false) {
164 show_window_ = true; 164 show_window_ = true;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 InsertTransactions); 511 InsertTransactions);
512 PAGE_CYCLER_DATABASE_TESTS("update-transactions", 512 PAGE_CYCLER_DATABASE_TESTS("update-transactions",
513 UpdateTransactions); 513 UpdateTransactions);
514 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", 514 PAGE_CYCLER_DATABASE_TESTS("delete-transactions",
515 DeleteTransactions); 515 DeleteTransactions);
516 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", 516 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions",
517 PseudoRandomTransactions); 517 PseudoRandomTransactions);
518 #endif 518 #endif
519 519
520 } // namespace 520 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/memory_test/memory_test.cc ('k') | chrome/test/startup/feature_startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698