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

Side by Side Diff: chrome/app/delay_load_hook_unittest_win.cc

Issue 644903002: Replacing the OVERRIDE with override and in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extrafile added Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/app/client_util.cc ('k') | chrome/app/signature_validator_win_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if defined(_WIN32_WINNT_WIN8) && _MSC_VER < 1700 6 #if defined(_WIN32_WINNT_WIN8) && _MSC_VER < 1700
7 // The Windows 8 SDK defines FACILITY_VISUALCPP in winerror.h, and in 7 // The Windows 8 SDK defines FACILITY_VISUALCPP in winerror.h, and in
8 // delayimp.h previous to VS2012. 8 // delayimp.h previous to VS2012.
9 #undef FACILITY_VISUALCPP 9 #undef FACILITY_VISUALCPP
10 #endif 10 #endif
11 #include <DelayIMP.h> 11 #include <DelayIMP.h>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/scoped_native_library.h" 15 #include "base/scoped_native_library.h"
16 #include "chrome/app/delay_load_hook_win.h" 16 #include "chrome/app/delay_load_hook_win.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace { 19 namespace {
20 20
21 class ChromeDelayLoadHookTest : public testing::Test { 21 class ChromeDelayLoadHookTest : public testing::Test {
22 public: 22 public:
23 ChromeDelayLoadHookTest() : proc_ptr_(NULL) { 23 ChromeDelayLoadHookTest() : proc_ptr_(NULL) {
24 } 24 }
25 25
26 virtual void SetUp() OVERRIDE { 26 virtual void SetUp() override {
27 SetupInfo("kernel32.dll"); 27 SetupInfo("kernel32.dll");
28 } 28 }
29 29
30 void SetupInfo(const char* dll_name) { 30 void SetupInfo(const char* dll_name) {
31 info_.cb = sizeof(info_); 31 info_.cb = sizeof(info_);
32 info_.pidd = NULL; 32 info_.pidd = NULL;
33 info_.ppfn = &proc_ptr_; 33 info_.ppfn = &proc_ptr_;
34 info_.szDll = dll_name; 34 info_.szDll = dll_name;
35 info_.dlp.fImportByName = TRUE; 35 info_.dlp.fImportByName = TRUE;
36 info_.dlp.szProcName = "CreateFileA"; 36 info_.dlp.szProcName = "CreateFileA";
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 TEST_F(ChromeDelayLoadHookTest, IgnoresUnhandledNotifications) { 81 TEST_F(ChromeDelayLoadHookTest, IgnoresUnhandledNotifications) {
82 SetupInfo("kernel32-delay.dll"); 82 SetupInfo("kernel32-delay.dll");
83 83
84 // The hook should ignore all notifications but the preload notifications. 84 // The hook should ignore all notifications but the preload notifications.
85 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteStartProcessing, &info_) == NULL); 85 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteStartProcessing, &info_) == NULL);
86 EXPECT_TRUE(ChromeDelayLoadHook(dliNotePreGetProcAddress, &info_) == NULL); 86 EXPECT_TRUE(ChromeDelayLoadHook(dliNotePreGetProcAddress, &info_) == NULL);
87 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteEndProcessing, &info_) == NULL); 87 EXPECT_TRUE(ChromeDelayLoadHook(dliNoteEndProcessing, &info_) == NULL);
88 EXPECT_TRUE(ChromeDelayLoadHook(dliFailLoadLib, &info_) == NULL); 88 EXPECT_TRUE(ChromeDelayLoadHook(dliFailLoadLib, &info_) == NULL);
89 EXPECT_TRUE(ChromeDelayLoadHook(dliFailGetProc, &info_) == NULL); 89 EXPECT_TRUE(ChromeDelayLoadHook(dliFailGetProc, &info_) == NULL);
90 } 90 }
OLDNEW
« no previous file with comments | « chrome/app/client_util.cc ('k') | chrome/app/signature_validator_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698