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

Unified Diff: base/win/scoped_handle_unittest.cc

Issue 1779333003: Add test for multithreaded ActiveVerifier behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@handlecreate
Patch Set: nits Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« base/win/scoped_handle_test_dll.cc ('K') | « base/win/scoped_handle_test_dll.cc ('k') | no next file » | 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
index 598e3f4150dd69e6479a772b688dea9cc7655545..d3349c8300e43f58c3168c385fdd9a6b607b6988 100644
--- a/base/win/scoped_handle_unittest.cc
+++ b/base/win/scoped_handle_unittest.cc
@@ -5,10 +5,13 @@
#include <windows.h>
#include <winternl.h>
-#include "base/win/scoped_handle.h"
-
#include <utility>
scottmg 2016/03/11 19:02:19 (is this actually used?)
Will Harris 2016/03/11 20:35:32 no. removed.
+#include "base/files/file_path.h"
+#include "base/scoped_native_library.h"
+#include "base/win/scoped_handle.h"
+#include "base/win/scoped_handle_test_dll.h"
+
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -90,5 +93,17 @@ TEST(ScopedHandleTest, ActiveVerifierUntrackedHandle) {
ASSERT_TRUE(::CloseHandle(handle));
}
+TEST(ScopedHandleTest, MultiModule) {
+ ScopedNativeLibrary module(FilePath(L"scoped_handle_test_dll.dll"));
+
+ typedef decltype(base::win::testing::RunTest)* RunTestFunc;
+
+ ASSERT_TRUE(module.is_valid());
+ RunTestFunc func =
+ reinterpret_cast<RunTestFunc>(module.GetFunctionPointer("RunTest"));
+ ASSERT_NE(nullptr, func);
+ ASSERT_EQ(testing::Result::SUCCESS, func());
+}
+
} // namespace win
} // namespace base
« base/win/scoped_handle_test_dll.cc ('K') | « base/win/scoped_handle_test_dll.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698