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

Unified Diff: base/win/scoped_handle_unittest.cc

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix delegate_execute for google_chrome_build Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/scoped_handle.h ('k') | base/win/scoped_process_information.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_handle_unittest.cc
diff --git a/base/win/scoped_handle_unittest.cc b/base/win/scoped_handle_unittest.cc
deleted file mode 100644
index e0d8b467094eaa5f92c5f54196a31024783be583..0000000000000000000000000000000000000000
--- a/base/win/scoped_handle_unittest.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/win/scoped_handle.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-void CreateHandle(int value, HANDLE* result) {
- *result = reinterpret_cast<HANDLE>(value);
-}
-
-TEST(ScopedHandleTest, Receive) {
- base::win::ScopedHandle handle;
- int value = 51;
-
- {
- // This is not really the expected use case, but it is a very explicit test.
- base::win::ScopedHandle::Receiver a = handle.Receive();
- HANDLE* pointer = a;
- *pointer = reinterpret_cast<HANDLE>(value);
- }
-
- EXPECT_EQ(handle.Get(), reinterpret_cast<HANDLE>(value));
- HANDLE to_discard = handle.Take();
-
- // The standard use case:
- value = 183;
- CreateHandle(value, handle.Receive());
- EXPECT_EQ(handle.Get(), reinterpret_cast<HANDLE>(value));
- to_discard = handle.Take();
-}
« 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