aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/unittests/crash_generation_server_test.cc
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-13 22:20:30 +0000
committercdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-13 22:20:30 +0000
commit9a3de4160b4808b89c367126027533323690915e (patch)
tree96d42ce81be9754abd8d4a3cf3718ab36e7abc1c /src/client/windows/unittests/crash_generation_server_test.cc
parentFix file descriptor leaks in ExternalDumper test (diff)
downloadbreakpad-9a3de4160b4808b89c367126027533323690915e.tar.xz
Expose a callback to allow crash server implementations to defer the uploading of crash dumps to a later time. The client can provide a crash_id when the dump is performed and then at a later time connect again and request that the crash id be uploaded triggering an implementation defined callback.
BUG=473 TEST=CrashGenerationServerTest.* Review URL: https://breakpad.appspot.com/379001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@952 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/unittests/crash_generation_server_test.cc')
-rw-r--r--src/client/windows/unittests/crash_generation_server_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/windows/unittests/crash_generation_server_test.cc b/src/client/windows/unittests/crash_generation_server_test.cc
index ce49439c..cf95d43f 100644
--- a/src/client/windows/unittests/crash_generation_server_test.cc
+++ b/src/client/windows/unittests/crash_generation_server_test.cc
@@ -65,6 +65,7 @@ class CrashGenerationServerTest : public ::testing::Test {
CallOnClientConnected, &mock_callbacks_,
CallOnClientDumpRequested, &mock_callbacks_,
CallOnClientExited, &mock_callbacks_,
+ CallOnClientUploadRequested, &mock_callbacks_,
false,
NULL),
thread_id_(0),
@@ -82,6 +83,8 @@ class CrashGenerationServerTest : public ::testing::Test {
const std::wstring* file_path));
MOCK_METHOD1(OnClientExited,
void(const google_breakpad::ClientInfo* client_info));
+ MOCK_METHOD1(OnClientUploadRequested,
+ void(const DWORD crash_id));
};
enum ClientFault {
@@ -248,6 +251,11 @@ class CrashGenerationServerTest : public ::testing::Test {
OnClientExited(client_info);
}
+ static void CallOnClientUploadRequested(void* context, const DWORD crash_id) {
+ static_cast<MockCrashGenerationServerCallbacks*>(context)->
+ OnClientUploadRequested(crash_id);
+ }
+
DWORD thread_id_;
EXCEPTION_POINTERS* exception_pointers_;
MDRawAssertionInfo assert_info_;