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

Side by Side Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 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 | « webkit/plugins/npapi/plugin_lib_mac.mm ('k') | no next file » | 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 "app/app_switches.h" 5 #include "app/app_switches.h"
6 #include "app/gfx/gl/gl_implementation.h" 6 #include "app/gfx/gl/gl_implementation.h"
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Treat the first argument as the initial URL to open. 234 // Treat the first argument as the initial URL to open.
235 GURL starting_url; 235 GURL starting_url;
236 236
237 FilePath path; 237 FilePath path;
238 PathService::Get(base::DIR_SOURCE_ROOT, &path); 238 PathService::Get(base::DIR_SOURCE_ROOT, &path);
239 path = path.AppendASCII("webkit").AppendASCII("data") 239 path = path.AppendASCII("webkit").AppendASCII("data")
240 .AppendASCII("test_shell").AppendASCII("index.html"); 240 .AppendASCII("test_shell").AppendASCII("index.html");
241 starting_url = net::FilePathToFileURL(path); 241 starting_url = net::FilePathToFileURL(path);
242 242
243 const std::vector<CommandLine::StringType>& args = parsed_command_line.args(); 243 const std::vector<CommandLine::StringType>& args = parsed_command_line.args();
244 if (args.size() > 0) { 244 if (!args.empty()) {
245 GURL url(args[0]); 245 GURL url(args[0]);
246 if (url.is_valid()) { 246 if (url.is_valid()) {
247 starting_url = url; 247 starting_url = url;
248 } else { 248 } else {
249 // Treat as a relative file path. 249 // Treat as a relative file path.
250 FilePath path = FilePath(args[0]); 250 FilePath path = FilePath(args[0]);
251 file_util::AbsolutePath(&path); 251 file_util::AbsolutePath(&path);
252 starting_url = net::FilePathToFileURL(path); 252 starting_url = net::FilePathToFileURL(path);
253 } 253 }
254 } 254 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 TestShell::ShutdownTestShell(); 348 TestShell::ShutdownTestShell();
349 TestShell::CleanupLogging(); 349 TestShell::CleanupLogging();
350 350
351 // Tear down shared StatsTable; prevents unit_tests from leaking it. 351 // Tear down shared StatsTable; prevents unit_tests from leaking it.
352 base::StatsTable::set_current(NULL); 352 base::StatsTable::set_current(NULL);
353 delete table; 353 delete table;
354 RemoveSharedMemoryFile(stats_filename); 354 RemoveSharedMemoryFile(stats_filename);
355 355
356 return 0; 356 return 0;
357 } 357 }
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_lib_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698