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

Side by Side Diff: base/win/scoped_handle_unittest.cc

Issue 92173002: Merge 237541 "Revert of https://codereview.chromium.org/71013004/" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1721/src/
Patch Set: Created 7 years 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 | « base/win/scoped_handle.h ('k') | base/win/scoped_process_information.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/win/scoped_handle.h" 5 #include "base/win/scoped_handle.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 void CreateHandle(int value, HANDLE* result) { 8 void CreateHandle(int value, HANDLE* result) {
9 *result = reinterpret_cast<HANDLE>(value); 9 *result = reinterpret_cast<HANDLE>(value);
10 } 10 }
(...skipping 11 matching lines...) Expand all
22 22
23 EXPECT_EQ(handle.Get(), reinterpret_cast<HANDLE>(value)); 23 EXPECT_EQ(handle.Get(), reinterpret_cast<HANDLE>(value));
24 HANDLE to_discard = handle.Take(); 24 HANDLE to_discard = handle.Take();
25 25
26 // The standard use case: 26 // The standard use case:
27 value = 183; 27 value = 183;
28 CreateHandle(value, handle.Receive()); 28 CreateHandle(value, handle.Receive());
29 EXPECT_EQ(handle.Get(), reinterpret_cast<HANDLE>(value)); 29 EXPECT_EQ(handle.Get(), reinterpret_cast<HANDLE>(value));
30 to_discard = handle.Take(); 30 to_discard = handle.Take();
31 } 31 }
OLDNEW
« no previous file with comments | « base/win/scoped_handle.h ('k') | base/win/scoped_process_information.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698