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

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

Issue 2804713002: Update Crashpad to b4095401639ebe2ad33169e5c1d994065cbff1b8 (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/crashpad/crashpad/util/win/registration_protocol_win_test.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class ScopedProcessSuspendTest final : public WinChildProcess { 75 class ScopedProcessSuspendTest final : public WinChildProcess {
76 public: 76 public:
77 ScopedProcessSuspendTest() : WinChildProcess() {} 77 ScopedProcessSuspendTest() : WinChildProcess() {}
78 ~ScopedProcessSuspendTest() {} 78 ~ScopedProcessSuspendTest() {}
79 79
80 private: 80 private:
81 int Run() override { 81 int Run() override {
82 char c; 82 char c;
83 // Wait for notification from parent. 83 // Wait for notification from parent.
84 EXPECT_TRUE(LoggingReadFileExactly(ReadPipeHandle(), &c, sizeof(c))); 84 EXPECT_TRUE(LoggingReadFileExactly(ReadPipeHandle(), &c, sizeof(c)));
85 EXPECT_EQ(' ', c); 85 EXPECT_EQ(c, ' ');
86 return EXIT_SUCCESS; 86 return EXIT_SUCCESS;
87 } 87 }
88 88
89 DISALLOW_COPY_AND_ASSIGN(ScopedProcessSuspendTest); 89 DISALLOW_COPY_AND_ASSIGN(ScopedProcessSuspendTest);
90 }; 90 };
91 91
92 TEST(ScopedProcessSuspend, ScopedProcessSuspend) { 92 TEST(ScopedProcessSuspend, ScopedProcessSuspend) {
93 WinChildProcess::EntryPoint<ScopedProcessSuspendTest>(); 93 WinChildProcess::EntryPoint<ScopedProcessSuspendTest>();
94 std::unique_ptr<WinChildProcess::Handles> handles = WinChildProcess::Launch(); 94 std::unique_ptr<WinChildProcess::Handles> handles = WinChildProcess::Launch();
95 95
(...skipping 14 matching lines...) Expand all
110 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 0)); 110 EXPECT_TRUE(SuspendCountMatches(handles->process.get(), 0));
111 111
112 // Tell the child it's OK to terminate. 112 // Tell the child it's OK to terminate.
113 char c = ' '; 113 char c = ' ';
114 EXPECT_TRUE(WriteFile(handles->write.get(), &c, sizeof(c))); 114 EXPECT_TRUE(WriteFile(handles->write.get(), &c, sizeof(c)));
115 } 115 }
116 116
117 } // namespace 117 } // namespace
118 } // namespace test 118 } // namespace test
119 } // namespace crashpad 119 } // namespace crashpad
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/util/win/registration_protocol_win_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698