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

Side by Side Diff: chrome/test/perf/dom_checker_uitest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/gpu/gpu_pixel_browsertest.cc ('k') | chrome/test/perf/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) 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 #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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 std::string expected_failures_text; 136 std::string expected_failures_text;
137 bool have_expected_results = ReadExpectedResults(failures_file, 137 bool have_expected_results = ReadExpectedResults(failures_file,
138 &expected_failures_text); 138 &expected_failures_text);
139 if (!have_expected_results) 139 if (!have_expected_results)
140 return false; 140 return false;
141 ParseExpectedFailures(expected_failures_text, expected_failures); 141 ParseExpectedFailures(expected_failures_text, expected_failures);
142 return true; 142 return true;
143 } 143 }
144 144
145 bool WaitUntilTestCompletes(TabProxy* tab) { 145 bool WaitUntilTestCompletes(TabProxy* tab) {
146 return WaitUntilJavaScriptCondition(tab, L"", 146 return WaitUntilJavaScriptCondition(
147 tab,
148 std::wstring(),
147 L"window.domAutomationController.send(automation.IsDone());", 149 L"window.domAutomationController.send(automation.IsDone());",
148 TestTimeouts::large_test_timeout()); 150 TestTimeouts::large_test_timeout());
149 } 151 }
150 152
151 bool GetTestCount(TabProxy* tab, int* test_count) { 153 bool GetTestCount(TabProxy* tab, int* test_count) {
152 return tab->ExecuteAndExtractInt(L"", 154 return tab->ExecuteAndExtractInt(
155 std::wstring(),
153 L"window.domAutomationController.send(automation.GetTestCount());", 156 L"window.domAutomationController.send(automation.GetTestCount());",
154 test_count); 157 test_count);
155 } 158 }
156 159
157 bool GetTestsFailed(TabProxy* tab, ResultsSet* tests_failed) { 160 bool GetTestsFailed(TabProxy* tab, ResultsSet* tests_failed) {
158 std::wstring json_wide; 161 std::wstring json_wide;
159 bool succeeded = tab->ExecuteAndExtractString(L"", 162 bool succeeded = tab->ExecuteAndExtractString(
163 std::wstring(),
160 L"window.domAutomationController.send(" 164 L"window.domAutomationController.send("
161 L" JSON.stringify(automation.GetFailures()));", 165 L" JSON.stringify(automation.GetFailures()));",
162 &json_wide); 166 &json_wide);
163 167
164 // Note that we don't use ASSERT_TRUE here (and in some other places) as it 168 // Note that we don't use ASSERT_TRUE here (and in some other places) as it
165 // doesn't work inside a function with a return type other than void. 169 // doesn't work inside a function with a return type other than void.
166 EXPECT_TRUE(succeeded); 170 EXPECT_TRUE(succeeded);
167 if (!succeeded) 171 if (!succeeded)
168 return false; 172 return false;
169 173
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 TEST_F(DomCheckerTest, DISABLED_Http) { 250 TEST_F(DomCheckerTest, DISABLED_Http) {
247 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) 251 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest))
248 return; 252 return;
249 253
250 ResultsList new_passes, new_failures; 254 ResultsList new_passes, new_failures;
251 RunTest(true, &new_passes, &new_failures); 255 RunTest(true, &new_passes, &new_failures);
252 PrintResults(new_passes, new_failures); 256 PrintResults(new_passes, new_failures);
253 } 257 }
254 258
255 } // namespace 259 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/gpu/gpu_pixel_browsertest.cc ('k') | chrome/test/perf/feature_startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698