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

Side by Side Diff: src/client/windows/unittests/exception_handler_death_test.cc

Issue 1994015: Moved exception_handler_test to the more aptly named exception_handler_death_... (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2009, Google Inc. 1 // Copyright 2009, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 &dump_path); 156 &dump_path);
157 157
158 // This HAS to be EXPECT_, because when this test case is executed in the 158 // This HAS to be EXPECT_, because when this test case is executed in the
159 // child process, the server registration will fail due to the named pipe 159 // child process, the server registration will fail due to the named pipe
160 // being the same. 160 // being the same.
161 EXPECT_TRUE(server.Start()); 161 EXPECT_TRUE(server.Start());
162 EXPECT_FALSE(gDumpCallbackCalled); 162 EXPECT_FALSE(gDumpCallbackCalled);
163 ASSERT_DEATH(this->DoCrash(), ""); 163 ASSERT_DEATH(this->DoCrash(), "");
164 EXPECT_TRUE(gDumpCallbackCalled); 164 EXPECT_TRUE(gDumpCallbackCalled);
165 } 165 }
166
167 TEST_F(ExceptionHandlerDeathTest, InvalidParameterTest) {
168 using google_breakpad::ExceptionHandler;
169
170 ASSERT_TRUE(DoesPathExist(temp_path_));
171 ExceptionHandler handler(temp_path_, NULL, NULL, NULL,
172 ExceptionHandler::HANDLER_INVALID_PARAMETER);
173
174 // Disable the message box for assertions
175 _CrtSetReportMode(_CRT_ASSERT, 0);
176
177 // Call with a bad argument. The invalid parameter will be swallowed
178 // and a dump will be generated, the process will exit(0).
179 ASSERT_EXIT(printf(NULL), ::testing::ExitedWithCode(0), "");
166 } 180 }
181 }
OLDNEW
« no previous file with comments | « src/client/windows/unittests/dump_analysis.cc ('k') | src/client/windows/unittests/exception_handler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698