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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/chromedriver/test_util.cc ('k') | chrome/test/perf/frame_rate/frame_rate_tests.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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 L"window.domAutomationController.send(" 160 L"window.domAutomationController.send("
161 L" JSON.stringify(automation.GetFailures()));", 161 L" JSON.stringify(automation.GetFailures()));",
162 &json_wide); 162 &json_wide);
163 163
164 // Note that we don't use ASSERT_TRUE here (and in some other places) as it 164 // 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. 165 // doesn't work inside a function with a return type other than void.
166 EXPECT_TRUE(succeeded); 166 EXPECT_TRUE(succeeded);
167 if (!succeeded) 167 if (!succeeded)
168 return false; 168 return false;
169 169
170 std::string json = WideToUTF8(json_wide); 170 std::string json = base::WideToUTF8(json_wide);
171 JSONStringValueSerializer deserializer(json); 171 JSONStringValueSerializer deserializer(json);
172 scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL)); 172 scoped_ptr<Value> value(deserializer.Deserialize(NULL, NULL));
173 173
174 EXPECT_TRUE(value.get()); 174 EXPECT_TRUE(value.get());
175 if (!value.get()) 175 if (!value.get())
176 return false; 176 return false;
177 177
178 EXPECT_TRUE(value->IsType(Value::TYPE_LIST)); 178 EXPECT_TRUE(value->IsType(Value::TYPE_LIST));
179 if (!value->IsType(Value::TYPE_LIST)) 179 if (!value->IsType(Value::TYPE_LIST))
180 return false; 180 return false;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 TEST_F(DomCheckerTest, DISABLED_Http) { 246 TEST_F(DomCheckerTest, DISABLED_Http) {
247 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest)) 247 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDomCheckerTest))
248 return; 248 return;
249 249
250 ResultsList new_passes, new_failures; 250 ResultsList new_passes, new_failures;
251 RunTest(true, &new_passes, &new_failures); 251 RunTest(true, &new_passes, &new_failures);
252 PrintResults(new_passes, new_failures); 252 PrintResults(new_passes, new_failures);
253 } 253 }
254 254
255 } // namespace 255 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/test_util.cc ('k') | chrome/test/perf/frame_rate/frame_rate_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698