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

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

Issue 11726002: Move the parsing of 'update_url' & 'options_page' URLs out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: Created 8 years 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
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 6d56fe0a299a283b8b26675c0fc219789c505ae8..42343cfa70d3893a0e71bbec2e73c847e37699fb 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -66,6 +66,7 @@
#include "chrome/common/extensions/extension_l10n_util.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_resource.h"
+#include "chrome/common/extensions/manifest_url_info.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -2925,8 +2926,9 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtensionAlreadyInstalled) {
// Use AddExtensionImpl() as AddFrom*() would balk.
service_->pending_extension_manager()->AddExtensionImpl(
- good->id(), good->update_url(), Version(), &IsExtension,
- kGoodIsFromSync, kGoodInstallSilently, Extension::INTERNAL);
+ good->id(), extensions::ManifestURLInfo::GetUpdateURL(good),
+ Version(), &IsExtension, kGoodIsFromSync,
+ kGoodInstallSilently, Extension::INTERNAL);
UpdateExtension(good->id(), path, ENABLED);
EXPECT_FALSE(service_->pending_extension_manager()->IsIdPending(kGoodId));
@@ -4697,7 +4699,8 @@ TEST_F(ExtensionServiceTest, GetSyncData) {
EXPECT_EQ(service_->IsExtensionEnabled(good_crx), data.enabled());
EXPECT_EQ(service_->IsIncognitoEnabled(good_crx), data.incognito_enabled());
EXPECT_TRUE(data.version().Equals(*extension->version()));
- EXPECT_EQ(extension->update_url(), data.update_url());
+ EXPECT_EQ(extensions::ManifestURLInfo::GetUpdateURL(extension),
+ data.update_url());
EXPECT_EQ(extension->name(), data.name());
}
@@ -4722,7 +4725,8 @@ TEST_F(ExtensionServiceTest, GetSyncDataTerminated) {
EXPECT_EQ(service_->IsExtensionEnabled(good_crx), data.enabled());
EXPECT_EQ(service_->IsIncognitoEnabled(good_crx), data.incognito_enabled());
EXPECT_TRUE(data.version().Equals(*extension->version()));
- EXPECT_EQ(extension->update_url(), data.update_url());
+ EXPECT_EQ(extensions::ManifestURLInfo::GetUpdateURL(extension),
+ data.update_url());
EXPECT_EQ(extension->name(), data.name());
}

Powered by Google App Engine
This is Rietveld 408576698