OLD | NEW |
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 "chrome/browser/install_verification/win/loaded_modules_snapshot.h" | 5 #include "chrome/browser/install_verification/win/loaded_modules_snapshot.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <Windows.h> | 8 #include <Windows.h> |
8 | 9 |
9 #include <algorithm> | 10 #include <algorithm> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/bind.h" | 13 #include "base/bind.h" |
13 #include "base/callback_helpers.h" | 14 #include "base/callback_helpers.h" |
14 #include "chrome/browser/install_verification/win/module_verification_test.h" | 15 #include "chrome/browser/install_verification/win/module_verification_test.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
(...skipping 11 matching lines...) Expand all Loading... |
28 | 29 |
29 HMODULE new_dll = ::LoadLibrary(L"msvidc32.dll"); | 30 HMODULE new_dll = ::LoadLibrary(L"msvidc32.dll"); |
30 ASSERT_NE(static_cast<HMODULE>(NULL), new_dll); | 31 ASSERT_NE(static_cast<HMODULE>(NULL), new_dll); |
31 base::ScopedClosureRunner release_new_dll( | 32 base::ScopedClosureRunner release_new_dll( |
32 base::Bind(base::IgnoreResult(&::FreeLibrary), new_dll)); | 33 base::Bind(base::IgnoreResult(&::FreeLibrary), new_dll)); |
33 ASSERT_TRUE(GetLoadedModulesSnapshot(&snapshot)); | 34 ASSERT_TRUE(GetLoadedModulesSnapshot(&snapshot)); |
34 ASSERT_GT(snapshot.size(), original_snapshot_size); | 35 ASSERT_GT(snapshot.size(), original_snapshot_size); |
35 ASSERT_NE(snapshot.end(), | 36 ASSERT_NE(snapshot.end(), |
36 std::find(snapshot.begin(), snapshot.end(), new_dll)); | 37 std::find(snapshot.begin(), snapshot.end(), new_dll)); |
37 } | 38 } |
OLD | NEW |