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

Unified Diff: chrome/browser/win/enumerate_modules_model_unittest.cc

Issue 2720513005: Add InspectModule() that returns a populated ModuleInspectionResult struct (Closed)
Patch Set: Another Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/win/enumerate_modules_model.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/enumerate_modules_model_unittest.cc
diff --git a/chrome/browser/win/enumerate_modules_model_unittest.cc b/chrome/browser/win/enumerate_modules_model_unittest.cc
index 1649ada265bc070e613a6747382aa13a1a8e1ebe..27b1ad3ee81931f386da68114e8efb986b146e9e 100644
--- a/chrome/browser/win/enumerate_modules_model_unittest.cc
+++ b/chrome/browser/win/enumerate_modules_model_unittest.cc
@@ -80,46 +80,3 @@ TEST_F(EnumerateModulesTest, NormalizeEntry) {
EXPECT_EQ(expected.recommended_action, test.recommended_action);
}
}
-
-const ModuleEnumerator::Module kStandardModule =
- { kType, kStatus, L"c:\\foo\\bar.dll", L"", L"Prod", L"Desc", L"1.0",
- ModuleEnumerator::NONE };
-const ModuleEnumerator::Module kStandardModuleNoDescription =
- { kType, kStatus, L"c:\\foo\\bar.dll", L"", L"Prod", L"", L"1.0",
- ModuleEnumerator::NONE };
-const ModuleEnumerator::Module kStandardModuleNoSignature =
- { kType, kStatus, L"c:\\foo\\bar.dll", L"", L"Prod", L"Desc", L"1.0",
- ModuleEnumerator::NONE };
-
-const struct CollapsePathList {
- base::string16 expected_result;
- base::string16 test_case;
-} kCollapsePathList[] = {
- // Negative testing (should not collapse this path).
- { base::ASCIIToUTF16("c:\\a\\a.dll"), base::ASCIIToUTF16("c:\\a\\a.dll") },
- // These two are to test that we select the maximum collapsed path.
- { base::ASCIIToUTF16("%foo%\\a.dll"), base::ASCIIToUTF16("c:\\foo\\a.dll") },
- { base::ASCIIToUTF16("%x%\\a.dll"),
- base::ASCIIToUTF16("c:\\foo\\bar\\a.dll") },
-};
-
-TEST_F(EnumerateModulesTest, CollapsePath) {
- base::test::ScopedTaskScheduler scoped_task_scheduler;
- ModuleEnumerator module_enumerator(nullptr);
- module_enumerator.path_mapping_.clear();
- module_enumerator.path_mapping_.push_back(
- std::make_pair(L"c:\\foo\\", L"%foo%"));
- module_enumerator.path_mapping_.push_back(
- std::make_pair(L"c:\\foo\\bar\\", L"%x%"));
-
- for (size_t i = 0; i < arraysize(kCollapsePathList); ++i) {
- ModuleEnumerator::Module module;
- module.location = kCollapsePathList[i].test_case;
- module_enumerator.CollapsePath(&module);
-
- SCOPED_TRACE("Test case no " + base::IntToString(i) + ": '" +
- base::UTF16ToASCII(kCollapsePathList[i].expected_result) +
- "'");
- EXPECT_EQ(kCollapsePathList[i].expected_result, module.location);
- }
-}
« no previous file with comments | « chrome/browser/win/enumerate_modules_model.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698