Chromium Code Reviews| 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 |