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

Side by Side Diff: chrome_elf/ntdll_cache_unittest.cc

Issue 85403005: Cache ntdll exports in ELF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: x64 fix and a test Created 7 years 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 | Annotate | Revision Log
« chrome_elf/ntdll_cache.cc ('K') | « chrome_elf/ntdll_cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <windows.h>
6
7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h"
9 #include "chrome_elf/ntdll_cache.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace {
13
14 // Test fixtures -------------------------------------------------------------
15
16 class NTDLLCacheTest : public testing::Test {
17 protected:
18 virtual void SetUp() OVERRIDE {
19 InitCache();
20 }
21
22 };
robertshield 2013/12/06 22:08:50 nit: feels like there should be a extra blank line
23 // Tests ---------------------------------------------------------------------
24 TEST_F(NTDLLCacheTest, NtDLLCacheSanityCheck) {
25 HMODULE ntdll_handle = ::GetModuleHandle(L"ntdll.dll");
26 // Grab a couple random entries from the cache and make sure they match the
27 // addresses exported by ntdll.
28 EXPECT_EQ(::GetProcAddress(ntdll_handle, "A_SHAFinal"),
29 g_ntdll_lookup["A_SHAFinal"]);
30 EXPECT_EQ(::GetProcAddress(ntdll_handle, "ZwTraceControl"),
31 g_ntdll_lookup["ZwTraceControl"]);
32 }
33
34 } // namespace
robertshield 2013/12/06 22:08:50 nit: two spaces before //
OLDNEW
« chrome_elf/ntdll_cache.cc ('K') | « chrome_elf/ntdll_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698