| Index: chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc
|
| diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc b/chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc
|
| index fd05f38a86297bab8bebdababfeb7c266853edc7..64e29f933c7f61d9f81fcc1d34481242e4970fbf 100644
|
| --- a/chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc
|
| +++ b/chrome/common/extensions/manifest_handlers/content_scripts_manifest_unittest.cc
|
| @@ -67,4 +67,20 @@ TEST_F(ContentScriptsManifestTest, ScriptableHosts) {
|
| EXPECT_EQ(expected, scriptable_hosts);
|
| }
|
|
|
| +TEST_F(ContentScriptsManifestTest, ContentScriptIds) {
|
| + scoped_refptr<Extension> extension1 =
|
| + LoadAndExpectSuccess("content_script_yahoo.json");
|
| + scoped_refptr<Extension> extension2 =
|
| + LoadAndExpectSuccess("content_script_yahoo.json");
|
| + const UserScriptList& user_scripts1 =
|
| + ContentScriptsInfo::GetContentScripts(extension1);
|
| + ASSERT_EQ(1u, user_scripts1.size());
|
| + int64 id = user_scripts1[0].id();
|
| + const UserScriptList& user_scripts2 =
|
| + ContentScriptsInfo::GetContentScripts(extension2);
|
| + ASSERT_EQ(1u, user_scripts2.size());
|
| + // The id of the content script should be one higher than the previous.
|
| + EXPECT_EQ(id + 1, user_scripts2[0].id());
|
| +}
|
| +
|
| } // namespace extensions
|
|
|