OLD | NEW |
---|---|
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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 guid.Data4[6], guid.Data4[7]); | 82 guid.Data4[6], guid.Data4[7]); |
83 bool result = environment->SetVar(kPipeVariableName, | 83 bool result = environment->SetVar(kPipeVariableName, |
84 UTF16ToUTF8(pipe_name_)); | 84 UTF16ToUTF8(pipe_name_)); |
85 EXPECT_TRUE(result); | 85 EXPECT_TRUE(result); |
86 | 86 |
87 // Setup a dummy crash dump server. | 87 // Setup a dummy crash dump server. |
88 callbacks_.reset(new MockCrashServerCallbacks()); | 88 callbacks_.reset(new MockCrashServerCallbacks()); |
89 crash_server_.reset( | 89 crash_server_.reset( |
90 new google_breakpad::CrashGenerationServer( | 90 new google_breakpad::CrashGenerationServer( |
91 pipe_name_, NULL, | 91 pipe_name_, NULL, |
92 NULL, 0, | 92 NULL, 0, |
Mark Mentovai
2012/06/13 19:04:13
All of the zeroes in this statement should be NULL
alexeypa (please no reviews)
2012/06/14 16:13:57
Done.
| |
93 MockCrashServerCallbacks::OnClientDumpRequestCallback, | 93 MockCrashServerCallbacks::OnClientDumpRequestCallback, |
94 callbacks_.get(), | 94 callbacks_.get(), |
95 NULL, 0, | 95 NULL, 0, |
96 NULL, 0, | |
96 false, NULL)); | 97 false, NULL)); |
97 | 98 |
98 result = crash_server_->Start(); | 99 result = crash_server_->Start(); |
99 ASSERT_TRUE(result); | 100 ASSERT_TRUE(result); |
100 } | 101 } |
101 } | 102 } |
102 | 103 |
103 protected: | 104 protected: |
104 scoped_ptr<google_breakpad::CrashGenerationServer> crash_server_; | 105 scoped_ptr<google_breakpad::CrashGenerationServer> crash_server_; |
105 scoped_ptr<MockCrashServerCallbacks> callbacks_; | 106 scoped_ptr<MockCrashServerCallbacks> callbacks_; |
(...skipping 21 matching lines...) Expand all Loading... | |
127 TEST_F(BreakpadWinDeathTest, TestDebugbreak) { | 128 TEST_F(BreakpadWinDeathTest, TestDebugbreak) { |
128 if (callbacks_.get()) { | 129 if (callbacks_.get()) { |
129 EXPECT_CALL(*callbacks_, OnClientDumpRequested()); | 130 EXPECT_CALL(*callbacks_, OnClientDumpRequested()); |
130 } | 131 } |
131 | 132 |
132 // See if __debugbreak() is intercepted. | 133 // See if __debugbreak() is intercepted. |
133 ASSERT_DEATH(__debugbreak(), ""); | 134 ASSERT_DEATH(__debugbreak(), ""); |
134 } | 135 } |
135 | 136 |
136 } // namespace remoting | 137 } // namespace remoting |
OLD | NEW |