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

Side by Side Diff: chrome_frame/test/exception_barrier_unittest.cc

Issue 3705002: Roll gtest 445 -> 446 (Closed)
Patch Set: clang Created 10 years, 2 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 | « build/common.gypi ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "gtest/gtest.h" 5 #include "gtest/gtest.h"
6 #include "chrome_frame/exception_barrier.h" 6 #include "chrome_frame/exception_barrier.h"
7 7
8 namespace { 8 namespace {
9 9
10 // retrieves the top SEH registration record 10 // retrieves the top SEH registration record
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 TEST_F(ExceptionBarrierTest, RegisterUnregister) { 161 TEST_F(ExceptionBarrierTest, RegisterUnregister) {
162 // Assert that registration modifies the chain 162 // Assert that registration modifies the chain
163 // and the registered record as expected 163 // and the registered record as expected
164 EXCEPTION_REGISTRATION* top = GetTopRegistration(); 164 EXCEPTION_REGISTRATION* top = GetTopRegistration();
165 ExceptionBarrierHandlerFunc handler = top->handler; 165 ExceptionBarrierHandlerFunc handler = top->handler;
166 EXCEPTION_REGISTRATION* prev = top->prev; 166 EXCEPTION_REGISTRATION* prev = top->prev;
167 167
168 EXCEPTION_REGISTRATION registration; 168 EXCEPTION_REGISTRATION registration;
169 ::RegisterExceptionRecord(&registration, ExceptionBarrierHandler); 169 ::RegisterExceptionRecord(&registration, ExceptionBarrierHandler);
170 EXPECT_EQ(GetTopRegistration(), &registration); 170 EXPECT_EQ(GetTopRegistration(), &registration);
171 EXPECT_EQ(ExceptionBarrierHandler, registration.handler); 171 EXPECT_EQ(&ExceptionBarrierHandler, registration.handler);
172 EXPECT_EQ(top, registration.prev); 172 EXPECT_EQ(top, registration.prev);
173 173
174 // test the whole chain for good measure 174 // test the whole chain for good measure
175 TestSEHChainSane(); 175 TestSEHChainSane();
176 176
177 // Assert that unregistration restores 177 // Assert that unregistration restores
178 // everything as expected 178 // everything as expected
179 ::UnregisterExceptionRecord(&registration); 179 ::UnregisterExceptionRecord(&registration);
180 EXPECT_EQ(top, GetTopRegistration()); 180 EXPECT_EQ(top, GetTopRegistration());
181 EXPECT_EQ(handler, top->handler); 181 EXPECT_EQ(handler, top->handler);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return TestRegularChaining(top) && TestExceptionBarrierChaining(top); 349 return TestRegularChaining(top) && TestExceptionBarrierChaining(top);
350 } 350 }
351 351
352 // Test that the SEH chain is unmolested by exception barrier, both under 352 // Test that the SEH chain is unmolested by exception barrier, both under
353 // regular unroll, and under exception unroll. 353 // regular unroll, and under exception unroll.
354 TEST_F(ExceptionBarrierTest, SEHChainIsSaneAfterException) { 354 TEST_F(ExceptionBarrierTest, SEHChainIsSaneAfterException) {
355 EXPECT_TRUE(TestChaining()); 355 EXPECT_TRUE(TestChaining());
356 } 356 }
357 357
358 } // namespace 358 } // namespace
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698