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

Side by Side Diff: chrome/test/ui/sunspider_uitest.cc

Issue 113722: Make automation proxy objects to ref_counted. That allows to process async no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/ui/omnibox_uitest.cc ('k') | chrome/test/ui/ui_test.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 20 matching lines...) Expand all
31 dom_automation_enabled_ = true; 31 dom_automation_enabled_ = true;
32 show_window_ = true; 32 show_window_ = true;
33 } 33 }
34 34
35 void RunTest() { 35 void RunTest() {
36 FilePath::StringType start_file(kStartFile); 36 FilePath::StringType start_file(kStartFile);
37 FilePath test_path = GetSunSpiderDir(); 37 FilePath test_path = GetSunSpiderDir();
38 test_path = test_path.Append(start_file); 38 test_path = test_path.Append(start_file);
39 GURL test_url(net::FilePathToFileURL(test_path)); 39 GURL test_url(net::FilePathToFileURL(test_path));
40 40
41 scoped_ptr<TabProxy> tab(GetActiveTab()); 41 scoped_refptr<TabProxy> tab(GetActiveTab());
42 tab->NavigateToURL(test_url); 42 tab->NavigateToURL(test_url);
43 43
44 // Wait for the test to finish. 44 // Wait for the test to finish.
45 ASSERT_TRUE(WaitUntilTestCompletes(tab.get(), test_url)); 45 ASSERT_TRUE(WaitUntilTestCompletes(tab.get(), test_url));
46 46
47 PrintResults(tab.get()); 47 PrintResults(tab.get());
48 } 48 }
49 49
50 protected: 50 protected:
51 bool reference_; // True if this is a reference build. 51 bool reference_; // True if this is a reference build.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 RunTest(); 140 RunTest();
141 } 141 }
142 142
143 TEST_F(SunSpiderReferenceTest, Perf) { 143 TEST_F(SunSpiderReferenceTest, Perf) {
144 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunSunSpider)) 144 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunSunSpider))
145 return; 145 return;
146 146
147 RunTest(); 147 RunTest();
148 } 148 }
OLDNEW
« no previous file with comments | « chrome/test/ui/omnibox_uitest.cc ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698