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

Side by Side Diff: util/win/scoped_process_suspend_test.cc

Issue 1357833002: win: Get Crashpad compiling under VS2015 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: include Created 5 years, 3 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
« no previous file with comments | « util/win/process_info.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 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,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 DISALLOW_COPY_AND_ASSIGN(ScopedProcessSuspendTest); 88 DISALLOW_COPY_AND_ASSIGN(ScopedProcessSuspendTest);
89 }; 89 };
90 90
91 TEST(ScopedProcessSuspend, ScopedProcessSuspend) { 91 TEST(ScopedProcessSuspend, ScopedProcessSuspend) {
92 WinChildProcess::EntryPoint<ScopedProcessSuspendTest>(); 92 WinChildProcess::EntryPoint<ScopedProcessSuspendTest>();
93 scoped_ptr<WinChildProcess::Handles> handles = WinChildProcess::Launch(); 93 scoped_ptr<WinChildProcess::Handles> handles = WinChildProcess::Launch();
94 94
95 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 0)); 95 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 0));
96 96
97 { 97 {
98 ScopedProcessSuspend suspend(handles->process.get()); 98 ScopedProcessSuspend suspend0(handles->process.get());
99 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 1)); 99 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 1));
100 100
101 { 101 {
102 ScopedProcessSuspend suspend(handles->process.get()); 102 ScopedProcessSuspend suspend1(handles->process.get());
103 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 2)); 103 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 2));
104 } 104 }
105 105
106 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 1)); 106 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 1));
107 } 107 }
108 108
109 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 0)); 109 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 0));
110 110
111 // Tell the child it's OK to terminate. 111 // Tell the child it's OK to terminate.
112 char c = ' '; 112 char c = ' ';
113 EXPECT_TRUE(WriteFile(handles->write.get(), &c, sizeof(c))); 113 EXPECT_TRUE(WriteFile(handles->write.get(), &c, sizeof(c)));
114 } 114 }
115 115
116 } // namespace 116 } // namespace
117 } // namespace test 117 } // namespace test
118 } // namespace crashpad 118 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/win/process_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698