| 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 f809c045722e6f69de140abebfc0e2ad22783a30..d08dc325fb6149fa543d64984aad33b3bdf91e97 100644
|
| --- a/chrome/browser/extensions/extension_service_unittest.cc
|
| +++ b/chrome/browser/extensions/extension_service_unittest.cc
|
| @@ -62,6 +62,7 @@
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_switches.h"
|
| +#include "chrome/common/extensions/api/content_scripts/content_scripts_handler.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/extension_l10n_util.h"
|
| #include "chrome/common/extensions/extension_manifest_constants.h"
|
| @@ -1126,7 +1127,8 @@ TEST_F(ExtensionServiceTest, LoadAllExtensionsFromDirectorySuccess) {
|
| AddPattern(&expected_patterns, "http://*.google.com/*");
|
| AddPattern(&expected_patterns, "https://*.google.com/*");
|
| const Extension* extension = loaded_[0];
|
| - const extensions::UserScriptList& scripts = extension->content_scripts();
|
| + const extensions::UserScriptList& scripts =
|
| + extensions::ContentScriptsInfo::GetContentScripts(extension);
|
| ASSERT_EQ(2u, scripts.size());
|
| EXPECT_EQ(expected_patterns, scripts[0].url_patterns());
|
| EXPECT_EQ(2u, scripts[0].js_scripts().size());
|
| @@ -1165,7 +1167,8 @@ TEST_F(ExtensionServiceTest, LoadAllExtensionsFromDirectorySuccess) {
|
| EXPECT_EQ(std::string(""), loaded_[1]->description());
|
| EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"),
|
| loaded_[1]->GetBackgroundURL());
|
| - EXPECT_EQ(0u, loaded_[1]->content_scripts().size());
|
| + EXPECT_EQ(
|
| + 0u, extensions::ContentScriptsInfo::GetContentScripts(loaded_[1]).size());
|
| // We don't parse the plugins section on Chrome OS.
|
| #if defined(OS_CHROMEOS)
|
| EXPECT_EQ(0u, loaded_[1]->plugins().size());
|
| @@ -1185,7 +1188,9 @@ TEST_F(ExtensionServiceTest, LoadAllExtensionsFromDirectorySuccess) {
|
| EXPECT_EQ(std::string(good2), loaded_[index]->id());
|
| EXPECT_EQ(std::string("My extension 3"), loaded_[index]->name());
|
| EXPECT_EQ(std::string(""), loaded_[index]->description());
|
| - EXPECT_EQ(0u, loaded_[index]->content_scripts().size());
|
| + EXPECT_EQ(
|
| + 0u,
|
| + extensions::ContentScriptsInfo::GetContentScripts(loaded_[index]).size());
|
| EXPECT_EQ(Extension::INTERNAL, loaded_[index]->location());
|
| };
|
|
|
| @@ -2067,7 +2072,9 @@ TEST_F(ExtensionServiceTest, InstallTheme) {
|
| ValidatePrefKeyCount(++pref_count);
|
| ASSERT_TRUE(extension);
|
| EXPECT_TRUE(extension->is_theme());
|
| - EXPECT_EQ(0u, extension->content_scripts().size());
|
| + EXPECT_EQ(
|
| + 0u,
|
| + extensions::ContentScriptsInfo::GetContentScripts(extension).size());
|
| }
|
|
|
| // A theme with image resources missing (misspelt path).
|
|
|