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

Side by Side Diff: chrome_frame/crash_reporting/nt_loader_unittest.cc

Issue 9111032: Change over IgnoreReturn to IgnoreResult. remove IgnoreReturn. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix it for realz Created 8 years, 11 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
« no previous file with comments | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/test/mock_ie_event_sink_actions.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome_frame/crash_reporting/nt_loader.h" 5 #include "chrome_frame/crash_reporting/nt_loader.h"
6 6
7 #include <tlhelp32.h> 7 #include <tlhelp32.h>
8 #include <winnt.h> 8 #include <winnt.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 EXPECT_FALSE(OwnsCriticalSection(&cs)); 80 EXPECT_FALSE(OwnsCriticalSection(&cs));
81 81
82 // Make another thread grab it. 82 // Make another thread grab it.
83 base::Thread other("Other threads"); 83 base::Thread other("Other threads");
84 ASSERT_TRUE(other.Start()); 84 ASSERT_TRUE(other.Start());
85 other.message_loop()->PostTask( 85 other.message_loop()->PostTask(
86 FROM_HERE, base::Bind(::EnterCriticalSection, &cs)); 86 FROM_HERE, base::Bind(::EnterCriticalSection, &cs));
87 87
88 base::win::ScopedHandle event(::CreateEvent(NULL, FALSE, FALSE, NULL)); 88 base::win::ScopedHandle event(::CreateEvent(NULL, FALSE, FALSE, NULL));
89 other.message_loop()->PostTask( 89 other.message_loop()->PostTask(
90 FROM_HERE, base::IgnoreReturn<BOOL>(base::Bind(::SetEvent, event.Get()))); 90 FROM_HERE, base::Bind(base::IgnoreResult(::SetEvent), event.Get()));
91 91
92 ASSERT_EQ(WAIT_OBJECT_0, ::WaitForSingleObject(event.Get(), INFINITE)); 92 ASSERT_EQ(WAIT_OBJECT_0, ::WaitForSingleObject(event.Get(), INFINITE));
93 93
94 // We still shouldn't own it - the other thread does. 94 // We still shouldn't own it - the other thread does.
95 EXPECT_FALSE(OwnsCriticalSection(&cs)); 95 EXPECT_FALSE(OwnsCriticalSection(&cs));
96 // And we shouldn't be able to enter it. 96 // And we shouldn't be able to enter it.
97 EXPECT_EQ(0, ::TryEnterCriticalSection(&cs)); 97 EXPECT_EQ(0, ::TryEnterCriticalSection(&cs));
98 98
99 // Make the other thread release it. 99 // Make the other thread release it.
100 other.message_loop()->PostTask( 100 other.message_loop()->PostTask(
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 exceptions_handled = 0; 314 exceptions_handled = 0;
315 set_exception_function(OnCrashDuringUnloadLibrary); 315 set_exception_function(OnCrashDuringUnloadLibrary);
316 316
317 // We should crash during unload. 317 // We should crash during unload.
318 if (module != NULL) 318 if (module != NULL)
319 ::FreeLibrary(module); 319 ::FreeLibrary(module);
320 320
321 EXPECT_EQ(1, exceptions_handled); 321 EXPECT_EQ(1, exceptions_handled);
322 } 322 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/test/mock_ie_event_sink_actions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698