OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <windows.h> | 5 #include <windows.h> |
6 #include <DelayIMP.h> | 6 #include <DelayIMP.h> |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
10 #include "base/scoped_native_library.h" | 9 #include "base/scoped_native_library.h" |
11 #include "chrome/app/delay_load_hook_win.h" | 10 #include "chrome/app/delay_load_hook_win.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
13 | 12 |
14 namespace { | 13 namespace { |
15 | 14 |
16 class ChromeDelayLoadHookTest : public testing::Test { | 15 class ChromeDelayLoadHookTest : public testing::Test { |
17 public: | 16 public: |
18 ChromeDelayLoadHookTest() : proc_ptr_(NULL) { | 17 ChromeDelayLoadHookTest() : proc_ptr_(NULL) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 TEST_F(ChromeDelayLoadHookTest, IgnoresUnhandledNotifications) { | 75 TEST_F(ChromeDelayLoadHookTest, IgnoresUnhandledNotifications) { |
77 SetupInfo("kernel32-delay.dll"); | 76 SetupInfo("kernel32-delay.dll"); |
78 | 77 |
79 // The hook should ignore all notifications but the preload notifications. | 78 // The hook should ignore all notifications but the preload notifications. |
80 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteStartProcessing, &info_) == NULL); | 79 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteStartProcessing, &info_) == NULL); |
81 EXPECT_TRUE(ChromeDelayLoadHook(dliNotePreGetProcAddress, &info_) == NULL); | 80 EXPECT_TRUE(ChromeDelayLoadHook(dliNotePreGetProcAddress, &info_) == NULL); |
82 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteEndProcessing, &info_) == NULL); | 81 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteEndProcessing, &info_) == NULL); |
83 EXPECT_TRUE(ChromeDelayLoadHook(dliFailLoadLib, &info_) == NULL); | 82 EXPECT_TRUE(ChromeDelayLoadHook(dliFailLoadLib, &info_) == NULL); |
84 EXPECT_TRUE(ChromeDelayLoadHook(dliFailGetProc, &info_) == NULL); | 83 EXPECT_TRUE(ChromeDelayLoadHook(dliFailGetProc, &info_) == NULL); |
85 } | 84 } |
OLD | NEW |