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

Side by Side Diff: content/public/test/test_launcher.cc

Issue 11664013: GTTF: No more FLAKY_ . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
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 "content/public/test/test_launcher.h" 5 #include "content/public/test/test_launcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 // Strip out gtest_repeat flag because we can only run one test in the child 415 // Strip out gtest_repeat flag because we can only run one test in the child
416 // process (restarting the browser in the same process is illegal after it 416 // process (restarting the browser in the same process is illegal after it
417 // has been shut down and will actually crash). 417 // has been shut down and will actually crash).
418 switches.erase(kGTestRepeatFlag); 418 switches.erase(kGTestRepeatFlag);
419 419
420 for (CommandLine::SwitchMap::const_iterator iter = switches.begin(); 420 for (CommandLine::SwitchMap::const_iterator iter = switches.begin();
421 iter != switches.end(); ++iter) { 421 iter != switches.end(); ++iter) {
422 new_cmd_line.AppendSwitchNative((*iter).first, (*iter).second); 422 new_cmd_line.AppendSwitchNative((*iter).first, (*iter).second);
423 } 423 }
424 424
425 // Do not let the child ignore failures. We need to propagate the
426 // failure status back to the parent.
427 new_cmd_line.AppendSwitch(base::TestSuite::kStrictFailureHandling);
428
429 base::ScopedTempDir temp_dir; 425 base::ScopedTempDir temp_dir;
430 // Create a new data dir and pass it to the child. 426 // Create a new data dir and pass it to the child.
431 if (!temp_dir.CreateUniqueTempDir() || !temp_dir.IsValid()) { 427 if (!temp_dir.CreateUniqueTempDir() || !temp_dir.IsValid()) {
432 LOG(ERROR) << "Error creating temp data directory"; 428 LOG(ERROR) << "Error creating temp data directory";
433 return -1; 429 return -1;
434 } 430 }
435 431
436 if (!launcher_delegate->AdjustChildProcessCommandLine(&new_cmd_line, 432 if (!launcher_delegate->AdjustChildProcessCommandLine(&new_cmd_line,
437 temp_dir.path())) { 433 temp_dir.path())) {
438 return -1; 434 return -1;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 cycles--; 747 cycles--;
752 } 748 }
753 return exit_code; 749 return exit_code;
754 } 750 }
755 751
756 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { 752 TestLauncherDelegate* GetCurrentTestLauncherDelegate() {
757 return g_launcher_delegate; 753 return g_launcher_delegate;
758 } 754 }
759 755
760 } // namespace content 756 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698