Commit 2bcf2448 authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

Fix failing tests in chrome/browser/conflicts

A recent change made it so that only modules loaded in certain process
types are considered for both the IncompatibleApplicationsUpdater and
ModuleBlacklistCacheUpdater, but the tests were not updated.

Bug: 946999
Change-Id: I522f7bbf00eb239de59a9e7401f74a6183f35d84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1542427Reviewed-by: default avatarEtienne Bergeron <etienneb@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#645345}
parent 1871f3d4
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "chrome/browser/conflicts/module_list_filter_win.h" #include "chrome/browser/conflicts/module_list_filter_win.h"
#include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_browser_process.h"
#include "content/public/common/process_type.h"
#include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -80,11 +81,12 @@ constexpr wchar_t kCertificateSubject[] = L"CertificateSubject"; ...@@ -80,11 +81,12 @@ constexpr wchar_t kCertificateSubject[] = L"CertificateSubject";
constexpr wchar_t kDllPath1[] = L"c:\\path\\to\\module.dll"; constexpr wchar_t kDllPath1[] = L"c:\\path\\to\\module.dll";
constexpr wchar_t kDllPath2[] = L"c:\\some\\shellextension.dll"; constexpr wchar_t kDllPath2[] = L"c:\\some\\shellextension.dll";
// Returns a new ModuleInfoData marked as loaded into the process but otherwise // Returns a new ModuleInfoData marked as loaded into the browser process but
// empty. // otherwise empty.
ModuleInfoData CreateLoadedModuleInfoData() { ModuleInfoData CreateLoadedModuleInfoData() {
ModuleInfoData module_data; ModuleInfoData module_data;
module_data.module_properties |= ModuleInfoData::kPropertyLoadedModule; module_data.module_properties |= ModuleInfoData::kPropertyLoadedModule;
module_data.process_types |= ProcessTypeToBit(content::PROCESS_TYPE_BROWSER);
module_data.inspection_result = base::make_optional<ModuleInspectionResult>(); module_data.inspection_result = base::make_optional<ModuleInspectionResult>();
return module_data; return module_data;
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "chrome/browser/conflicts/module_list_filter_win.h" #include "chrome/browser/conflicts/module_list_filter_win.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/install_static/install_util.h" #include "chrome/install_static/install_util.h"
#include "content/public/common/process_type.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace { namespace {
...@@ -46,11 +47,12 @@ constexpr base::FilePath::CharType kDllPath1[] = ...@@ -46,11 +47,12 @@ constexpr base::FilePath::CharType kDllPath1[] =
constexpr base::FilePath::CharType kDllPath2[] = constexpr base::FilePath::CharType kDllPath2[] =
FILE_PATH_LITERAL("c:\\some\\shellextension.dll"); FILE_PATH_LITERAL("c:\\some\\shellextension.dll");
// Returns a new ModuleInfoData marked as loaded into the process but otherwise // Returns a new ModuleInfoData marked as loaded into the browser process but
// empty. // otherwise empty.
ModuleInfoData CreateLoadedModuleInfoData() { ModuleInfoData CreateLoadedModuleInfoData() {
ModuleInfoData module_data; ModuleInfoData module_data;
module_data.module_properties |= ModuleInfoData::kPropertyLoadedModule; module_data.module_properties |= ModuleInfoData::kPropertyLoadedModule;
module_data.process_types |= ProcessTypeToBit(content::PROCESS_TYPE_BROWSER);
module_data.inspection_result = base::make_optional<ModuleInspectionResult>(); module_data.inspection_result = base::make_optional<ModuleInspectionResult>();
return module_data; return module_data;
} }
......
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