Commit e04ddbbf authored by Chris Davis's avatar Chris Davis Committed by Commit Bot

Fix delayload unit tests to handle is_multi_dll_chrome set to false

This change fixes an issue with the delayloads_unittest.cc not
respecting the is_multi_dll_chrome set to false.  This is needed
in anticipation of the change to merge chrome.dll and
chrome_child.dll.

Bug: http://crbug.com/726150
Change-Id: Iccc35c2bcb2b952c871da2fa43eff211fb1df3c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809671
Commit-Queue: Chris Davis <chrdavis@microsoft.com>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarCliff Smolinsky <cliffsmo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#699423}
parent 66ee381e
...@@ -91,12 +91,30 @@ TEST_F(DelayloadsTest, ChromeDllDelayloadsCheck) { ...@@ -91,12 +91,30 @@ TEST_F(DelayloadsTest, ChromeDllDelayloadsCheck) {
"target was built, instead of delayloads_unittests.exe"; "target was built, instead of delayloads_unittests.exe";
static const char* const kValidFilePatterns[] = { static const char* const kValidFilePatterns[] = {
"KERNEL32.dll", "KERNEL32.dll",
"chrome_elf.dll", "chrome_elf.dll",
// On 64 bit the Version API's like VerQueryValue come from VERSION.dll. #if !defined(CHROME_MULTIPLE_DLL_BROWSER)
// It depends on kernel32, advapi32 and api-ms-win-crt*.dll. This should "DWrite.dll",
// be ok. "ADVAPI32.dll",
"VERSION.dll", "CRYPT32.dll",
"dbghelp.dll",
"dhcpcsvc.DLL",
"IPHLPAPI.DLL",
"ntdll.dll",
"OLEAUT32.dll",
"Secur32.dll",
"UIAutomationCore.DLL",
"USERENV.dll",
"WINHTTP.dll",
"WINMM.dll",
"WINSPOOL.DRV",
"WINTRUST.dll",
"WS2_32.dll",
#endif // CHROME_MULTIPLE_DLL_BROWSER
// On 64 bit the Version API's like VerQueryValue come from VERSION.dll.
// It depends on kernel32, advapi32 and api-ms-win-crt*.dll. This should
// be ok.
"VERSION.dll",
}; };
// Make sure all of chrome.dll's imports are in the valid imports list. // Make sure all of chrome.dll's imports are in the valid imports list.
...@@ -156,6 +174,8 @@ TEST_F(DelayloadsTest, DISABLED_ChromeDllLoadSanityTestImpl) { ...@@ -156,6 +174,8 @@ TEST_F(DelayloadsTest, DISABLED_ChromeDllLoadSanityTestImpl) {
EXPECT_EQ(nullptr, ::GetModuleHandle(L"user32.dll")); EXPECT_EQ(nullptr, ::GetModuleHandle(L"user32.dll"));
} }
#if defined(CHROME_MULTIPLE_DLL_BROWSER)
TEST_F(DelayloadsTest, ChromeChildDllDelayloadsCheck) { TEST_F(DelayloadsTest, ChromeChildDllDelayloadsCheck) {
base::FilePath dll; base::FilePath dll;
ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &dll)); ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &dll));
...@@ -255,6 +275,8 @@ TEST_F(DelayloadsTest, DISABLED_ChromeChildDllLoadSanityTestImpl) { ...@@ -255,6 +275,8 @@ TEST_F(DelayloadsTest, DISABLED_ChromeChildDllLoadSanityTestImpl) {
} }
} }
#endif // CHROME_MULTIPLE_DLL_BROWSER
TEST_F(DelayloadsTest, ChromeElfDllDelayloadsCheck) { TEST_F(DelayloadsTest, ChromeElfDllDelayloadsCheck) {
base::FilePath dll; base::FilePath dll;
ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &dll)); ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &dll));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment