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

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

Issue 441333002: Disallow breakaway from job for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 4 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 | « base/test/launcher/unit_test_launcher.cc ('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) 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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests"); 338 new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests");
339 new_cmd_line.AppendSwitchASCII("gtest_filter", test_name); 339 new_cmd_line.AppendSwitchASCII("gtest_filter", test_name);
340 new_cmd_line.AppendSwitch(kSingleProcessTestsFlag); 340 new_cmd_line.AppendSwitch(kSingleProcessTestsFlag);
341 341
342 char* browser_wrapper = getenv("BROWSER_WRAPPER"); 342 char* browser_wrapper = getenv("BROWSER_WRAPPER");
343 343
344 test_launcher->LaunchChildGTestProcess( 344 test_launcher->LaunchChildGTestProcess(
345 new_cmd_line, 345 new_cmd_line,
346 browser_wrapper ? browser_wrapper : std::string(), 346 browser_wrapper ? browser_wrapper : std::string(),
347 TestTimeouts::action_max_timeout(), 347 TestTimeouts::action_max_timeout(),
348 true, 348 base::TestLauncher::USE_JOB_OBJECTS |
349 base::TestLauncher::ALLOW_BREAKAWAY_FROM_JOB,
349 base::Bind(&WrapperTestLauncherDelegate::GTestCallback, 350 base::Bind(&WrapperTestLauncherDelegate::GTestCallback,
350 base::Unretained(this), 351 base::Unretained(this),
351 test_launcher, 352 test_launcher,
352 test_name)); 353 test_name));
353 } 354 }
354 355
355 void WrapperTestLauncherDelegate::RunDependentTest( 356 void WrapperTestLauncherDelegate::RunDependentTest(
356 base::TestLauncher* test_launcher, 357 base::TestLauncher* test_launcher,
357 const std::string test_name, 358 const std::string test_name,
358 const base::TestResult& pre_test_result) { 359 const base::TestResult& pre_test_result) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 500
500 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { 501 TestLauncherDelegate* GetCurrentTestLauncherDelegate() {
501 return g_launcher_delegate; 502 return g_launcher_delegate;
502 } 503 }
503 504
504 ContentMainParams* GetContentMainParams() { 505 ContentMainParams* GetContentMainParams() {
505 return g_params; 506 return g_params;
506 } 507 }
507 508
508 } // namespace content 509 } // namespace content
OLDNEW
« no previous file with comments | « base/test/launcher/unit_test_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698