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

Side by Side Diff: base/win/scoped_process_information_unittest.cc

Issue 191483002: Get rid of multiprocess_test's debug_on_start arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore ipc_switches.* Created 6 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 | « base/test/multiprocess_test_android.cc ('k') | base/win/startup_information_unittest.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 <windows.h> 5 #include <windows.h>
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/process/kill.h" 10 #include "base/process/kill.h"
(...skipping 28 matching lines...) Expand all
39 MULTIPROCESS_TEST_MAIN(ReturnSeven) { 39 MULTIPROCESS_TEST_MAIN(ReturnSeven) {
40 return 7; 40 return 7;
41 } 41 }
42 42
43 MULTIPROCESS_TEST_MAIN(ReturnNine) { 43 MULTIPROCESS_TEST_MAIN(ReturnNine) {
44 return 9; 44 return 9;
45 } 45 }
46 46
47 void ScopedProcessInformationTest::DoCreateProcess( 47 void ScopedProcessInformationTest::DoCreateProcess(
48 const std::string& main_id, PROCESS_INFORMATION* process_handle) { 48 const std::string& main_id, PROCESS_INFORMATION* process_handle) {
49 std::wstring cmd_line = 49 std::wstring cmd_line = MakeCmdLine(main_id).GetCommandLineString();
50 this->MakeCmdLine(main_id, false).GetCommandLineString();
51 STARTUPINFO startup_info = {}; 50 STARTUPINFO startup_info = {};
52 startup_info.cb = sizeof(startup_info); 51 startup_info.cb = sizeof(startup_info);
53 52
54 EXPECT_TRUE(::CreateProcess(NULL, 53 EXPECT_TRUE(::CreateProcess(NULL,
55 const_cast<wchar_t*>(cmd_line.c_str()), 54 const_cast<wchar_t*>(cmd_line.c_str()),
56 NULL, NULL, false, 0, NULL, NULL, 55 NULL, NULL, false, 0, NULL, NULL,
57 &startup_info, process_handle)); 56 &startup_info, process_handle));
58 } 57 }
59 58
60 TEST_F(ScopedProcessInformationTest, InitiallyInvalid) { 59 TEST_F(ScopedProcessInformationTest, InitiallyInvalid) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 157
159 base::win::ScopedProcessInformation process_info; 158 base::win::ScopedProcessInformation process_info;
160 process_info.Set(base_struct); 159 process_info.Set(base_struct);
161 160
162 EXPECT_EQ(kProcessId, process_info.process_id()); 161 EXPECT_EQ(kProcessId, process_info.process_id());
163 EXPECT_EQ(kThreadId, process_info.thread_id()); 162 EXPECT_EQ(kThreadId, process_info.thread_id());
164 EXPECT_EQ(kProcessHandle, process_info.process_handle()); 163 EXPECT_EQ(kProcessHandle, process_info.process_handle());
165 EXPECT_EQ(kThreadHandle, process_info.thread_handle()); 164 EXPECT_EQ(kThreadHandle, process_info.thread_handle());
166 base_struct = process_info.Take(); 165 base_struct = process_info.Take();
167 } 166 }
OLDNEW
« no previous file with comments | « base/test/multiprocess_test_android.cc ('k') | base/win/startup_information_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698