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

Side by Side Diff: test/win/win_child_process_test.cc

Issue 1164453003: Refactor multiprocess test code to allow multiple child processes to be launched. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@multiprocess_test
Patch Set: Tweaks. Created 5 years, 6 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 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include "test/win/win_multiprocess.h" 15 #include "test/win/win_child_process.h"
16 16
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "gtest/gtest.h" 18 #include "gtest/gtest.h"
19 19
20 namespace crashpad { 20 namespace crashpad {
21 namespace test { 21 namespace test {
22 namespace { 22 namespace {
23 23
24 class TestWinMultiprocess final : public WinMultiprocess { 24 class TestWinChildProcess final : public WinChildProcess {
25 public: 25 public:
26 TestWinMultiprocess() : WinMultiprocess() {} 26 TestWinChildProcess() : WinChildProcess() {}
27 27
28 ~TestWinMultiprocess() {} 28 ~TestWinChildProcess() {}
29 29
30 private: 30 private:
31 // WinMultiprocess will have already exercised the pipes. 31 // WinChildProcess will have already exercised the pipes.
32 void WinMultiprocessParent() override {} 32 void Run() override {}
33 33
34 void WinMultiprocessChild() override {} 34 DISALLOW_COPY_AND_ASSIGN(TestWinChildProcess);
35
36 DISALLOW_COPY_AND_ASSIGN(TestWinMultiprocess);
37 }; 35 };
38 36
39 TEST(WinMultiprocess, WinMultiprocess) { 37 TEST(WinChildProcessTest, WinChildProcess) {
40 TestWinMultiprocess win_multiprocess; 38 WinChildProcess::EntryPoint<TestWinChildProcess>();
41 win_multiprocess.Run(); 39
40 WinChildProcess::Launch();
42 } 41 }
scottmg 2015/06/01 21:53:22 Could you add a test that launches multiple child
erikwright (departed) 2015/06/24 20:01:35 Done.
43 42
44 } // namespace 43 } // namespace
45 } // namespace test 44 } // namespace test
46 } // namespace crashpad 45 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698