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

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest build for windows. Created 5 years, 10 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/extensions/extension_service.cc ('k') | chrome/browser/extensions/startup_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 947c60014f1e935407933b8120c92ba29b9da384..679c7ebd2cc51e01b317cf144ae73ea0ea2ddd7b 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -826,7 +826,8 @@ class ExtensionServiceTest : public extensions::ExtensionServiceTestBase,
content::WindowedNotificationObserver observer(
extensions::NOTIFICATION_CRX_INSTALLER_DONE,
base::Bind(&IsCrxInstallerDone, &installer));
- service()->UpdateExtension(id, path, true, &installer);
+ service()->UpdateExtension(extensions::CRXFileInfo(id, path), true,
+ &installer);
if (installer)
observer.Wait();
@@ -2717,7 +2718,8 @@ TEST_F(ExtensionServiceTest, UpdateExtensionDuringShutdown) {
// Update should fail and extension should not be updated.
path = data_dir().AppendASCII("good2.crx");
- bool updated = service()->UpdateExtension(good_crx, path, true, NULL);
+ bool updated = service()->UpdateExtension(
+ extensions::CRXFileInfo(good_crx, path), true, NULL);
ASSERT_FALSE(updated);
ASSERT_EQ(
"1.0.0.0",
@@ -6763,7 +6765,7 @@ TEST_F(ExtensionServiceTest, InstallPriorityExternalLocalFile) {
// We don't want the extension to be installed. A path that doesn't
// point to a valid CRX ensures this.
- const base::FilePath kInvalidPathToCrx = base::FilePath();
+ const base::FilePath kInvalidPathToCrx(FILE_PATH_LITERAL("invalid_path"));
const int kCreationFlags = 0;
const bool kDontMarkAcknowledged = false;
@@ -6967,7 +6969,7 @@ TEST_F(ExtensionServiceTest, ConcurrentExternalLocalFile) {
Version kVersion123("1.2.3");
Version kVersion124("1.2.4");
Version kVersion125("1.2.5");
- const base::FilePath kInvalidPathToCrx = base::FilePath();
+ const base::FilePath kInvalidPathToCrx(FILE_PATH_LITERAL("invalid_path"));
const int kCreationFlags = 0;
const bool kDontMarkAcknowledged = false;
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/startup_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698