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

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

Issue 1495403002: Observe adding external extensions via windows registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 11 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/external_loader.cc ('k') | chrome/browser/extensions/external_provider_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/external_policy_loader_unittest.cc
diff --git a/chrome/browser/extensions/external_policy_loader_unittest.cc b/chrome/browser/extensions/external_policy_loader_unittest.cc
index 8714eaeeb99189822d73e1691f16fdaaf3c74e58..3807ee7a50ad44e3fcf5decf03b7e8c8c7c43188 100644
--- a/chrome/browser/extensions/external_policy_loader_unittest.cc
+++ b/chrome/browser/extensions/external_policy_loader_unittest.cc
@@ -16,6 +16,7 @@
#include "chrome/test/base/testing_profile.h"
#include "components/syncable_prefs/testing_pref_service_syncable.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/browser/external_install_info.h"
#include "extensions/browser/external_provider_interface.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/extension.h"
@@ -70,35 +71,27 @@ class MockExternalPolicyProviderVisitor
EXPECT_TRUE(expected_extensions_.empty());
}
- bool OnExternalExtensionFileFound(const std::string& id,
- const Version* version,
- const base::FilePath& path,
- Manifest::Location unused,
- int unused2,
- bool unused3,
- bool unused4) override {
+ bool OnExternalExtensionFileFound(
+ const extensions::ExternalInstallInfoFile& info) override {
ADD_FAILURE() << "There should be no external extensions from files.";
return false;
}
- bool OnExternalExtensionUpdateUrlFound(const std::string& id,
- const std::string& install_parameter,
- const GURL& update_url,
- Manifest::Location location,
- int unused1,
- bool unused2) override {
+ bool OnExternalExtensionUpdateUrlFound(
+ const extensions::ExternalInstallInfoUpdateUrl& info,
+ bool is_initial_load) override {
// Extension has the correct location.
- EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location);
+ EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, info.download_location);
// Provider returns the correct location when asked.
Manifest::Location location1;
scoped_ptr<Version> version1;
- provider_->GetExtensionDetails(id, &location1, &version1);
+ provider_->GetExtensionDetails(info.extension_id, &location1, &version1);
EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location1);
EXPECT_FALSE(version1.get());
// Remove the extension from our list.
- EXPECT_EQ(1U, expected_extensions_.erase(id));
+ EXPECT_EQ(1U, expected_extensions_.erase(info.extension_id));
return true;
}
@@ -108,6 +101,14 @@ class MockExternalPolicyProviderVisitor
EXPECT_TRUE(provider->IsReady());
}
+ void OnExternalProviderUpdateComplete(
+ const ExternalProviderInterface* provider,
+ const ScopedVector<ExternalInstallInfoUpdateUrl>& update_url_extensions,
+ const ScopedVector<ExternalInstallInfoFile>& file_extensions,
+ const std::set<std::string>& removed_extensions) override {
+ ADD_FAILURE() << "Only win registry provider is expected to call this.";
+ }
+
private:
std::set<std::string> expected_extensions_;
« no previous file with comments | « chrome/browser/extensions/external_loader.cc ('k') | chrome/browser/extensions/external_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698