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

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

Issue 2850042: Deprecate more old filepath functions. (Closed)
Patch Set: rebase Created 10 years, 5 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
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/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/env_var.h" 8 #include "base/env_var.h"
9 #include "base/event_recorder.h" 9 #include "base/event_recorder.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 base::MemoryDebug::DumpAllMemoryInUse(); 298 base::MemoryDebug::DumpAllMemoryInUse();
299 } 299 }
300 300
301 // See if we need to run the tests. 301 // See if we need to run the tests.
302 if (layout_test_mode) { 302 if (layout_test_mode) {
303 // Set up for the kind of test requested. 303 // Set up for the kind of test requested.
304 TestShell::TestParams params; 304 TestShell::TestParams params;
305 if (parsed_command_line.HasSwitch(test_shell::kDumpPixels)) { 305 if (parsed_command_line.HasSwitch(test_shell::kDumpPixels)) {
306 // The pixel test flag also gives the image file name to use. 306 // The pixel test flag also gives the image file name to use.
307 params.dump_pixels = true; 307 params.dump_pixels = true;
308 params.pixel_file_name = parsed_command_line.GetSwitchValue( 308 params.pixel_file_name = parsed_command_line.GetSwitchValuePath(
309 test_shell::kDumpPixels); 309 test_shell::kDumpPixels);
310 if (params.pixel_file_name.size() == 0) { 310 if (params.pixel_file_name.empty()) {
311 fprintf(stderr, "No file specified for pixel tests"); 311 fprintf(stderr, "No file specified for pixel tests");
312 exit(1); 312 exit(1);
313 } 313 }
314 } 314 }
315 if (parsed_command_line.HasSwitch(test_shell::kNoTree)) { 315 if (parsed_command_line.HasSwitch(test_shell::kNoTree)) {
316 params.dump_tree = false; 316 params.dump_tree = false;
317 } 317 }
318 318
319 if (!starting_url.is_valid()) { 319 if (!starting_url.is_valid()) {
320 // Watch stdin for URLs. 320 // Watch stdin for URLs.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 TestShell::ShutdownTestShell(); 386 TestShell::ShutdownTestShell();
387 TestShell::CleanupLogging(); 387 TestShell::CleanupLogging();
388 388
389 // Tear down shared StatsTable; prevents unit_tests from leaking it. 389 // Tear down shared StatsTable; prevents unit_tests from leaking it.
390 StatsTable::set_current(NULL); 390 StatsTable::set_current(NULL);
391 delete table; 391 delete table;
392 RemoveSharedMemoryFile(stats_filename); 392 RemoveSharedMemoryFile(stats_filename);
393 393
394 return 0; 394 return 0;
395 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698