diff options
25 files changed, 188 insertions, 188 deletions
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index c89a9fa..72a7c1e 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -21,6 +21,7 @@ #endif // TOOLKIT_VIEWS #include "chrome/common/extensions/extension.h" #include "chrome/common/notification_service.h" +#include "chrome/common/url_constants.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -39,6 +40,25 @@ static std::wstring GetInstallWarning(Extension* extension) { if (!extension->plugins().empty()) return l10n_util::GetString(IDS_EXTENSION_PROMPT_WARNING_NEW_FULL_ACCESS); + // We also show the severe warning if the extension has access to any file:// + // URLs. They aren't *quite* as dangerous as full access to the system via + // NPAPI, but pretty dang close. Content scripts are currently the only way + // that extension can get access to file:// URLs. + for (UserScriptList::const_iterator script = + extension->content_scripts().begin(); + script != extension->content_scripts().end(); + ++script) { + for (UserScript::PatternList::const_iterator pattern = + script->url_patterns().begin(); + pattern != script->url_patterns().end(); + ++pattern) { + if (pattern->scheme() == chrome::kFileScheme) { + return l10n_util::GetString( + IDS_EXTENSION_PROMPT_WARNING_NEW_FULL_ACCESS); + } + } + } + // Otherwise, we go in descending order of severity: all hosts, several hosts, // a single host, no hosts. For each of these, we also have a variation of the // message for when api permissions are also requested. diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc index f076b37..00089ae 100644 --- a/chrome/browser/extensions/extension_startup_unittest.cc +++ b/chrome/browser/extensions/extension_startup_unittest.cc @@ -131,9 +131,12 @@ class ExtensionStartupTestBase void TestInjection(bool expect_css, bool expect_script) { // Load a page affected by the content script and test to see the effect. - HTTPTestServer* server = StartHTTPServer(); - GURL url = server->TestServerPage("file/extensions/test_file.html"); - ui_test_utils::NavigateToURL(browser(), url); + FilePath test_file; + PathService::Get(chrome::DIR_TEST_DATA, &test_file); + test_file = test_file.AppendASCII("extensions") + .AppendASCII("test_file.html"); + + ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_file)); bool result = false; ui_test_utils::ExecuteJavaScriptAndExtractBool( diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index 5024757..f9af689 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -539,11 +539,11 @@ TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectorySuccess) { extension->toolstrips(); ASSERT_EQ(2u, scripts.size()); EXPECT_EQ(3u, scripts[0].url_patterns().size()); - EXPECT_EQ("http://*.google.com/*", + EXPECT_EQ("file://*", scripts[0].url_patterns()[0].GetAsString()); - EXPECT_EQ("https://*.google.com/*", + EXPECT_EQ("http://*.google.com/*", scripts[0].url_patterns()[1].GetAsString()); - EXPECT_EQ("http://localhost/*", + EXPECT_EQ("https://*.google.com/*", scripts[0].url_patterns()[2].GetAsString()); EXPECT_EQ(2u, scripts[0].js_scripts().size()); ExtensionResource resource00(scripts[0].js_scripts()[0].extension_root(), diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 9230067..bc23ce5 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -191,10 +191,6 @@ const char kEnableFastback[] = "enable-fastback"; // testing, for example page cycler and layout tests. See bug 1157243. const char kEnableFileCookies[] = "enable-file-cookies"; -// By default, js content scripts are not allowed on file://. They are needed -// for page cycler tests. See http://crbug.com/27877. -const char kEnableJsOnFileUrls[] = "enable-content-script-on-file-urls"; - // Disable LocalStorage. const char kDisableLocalStorage[] = "disable-local-storage"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 1402cb5..f521615 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -70,7 +70,6 @@ extern const char kEnableExperimentalWebGL[]; extern const char kEnableExtensionTimelineApi[]; extern const char kEnableFastback[]; extern const char kEnableFileCookies[]; -extern const char kEnableJsOnFileUrls[]; extern const char kDisableLocalStorage[]; extern const char kEnableLogging[]; extern const char kEnableMonitorProfile[]; diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html index 96b5b65..a20dcd9 100644 --- a/chrome/common/extensions/docs/content_scripts.html +++ b/chrome/common/extensions/docs/content_scripts.html @@ -321,9 +321,6 @@ They <b>cannot</b>: <li> Make cross-site XMLHttpRequests </li> - <li> - Execute on file:// urls. - </li> </ul> <p> diff --git a/chrome/common/extensions/docs/static/content_scripts.html b/chrome/common/extensions/docs/static/content_scripts.html index 80d1fc4..0c5bcd9 100644 --- a/chrome/common/extensions/docs/static/content_scripts.html +++ b/chrome/common/extensions/docs/static/content_scripts.html @@ -40,9 +40,6 @@ They <b>cannot</b>: <li> Make cross-site XMLHttpRequests </li> - <li> - Execute on file:// urls. - </li> </ul> <p> diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 93428a58..ce31c80 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -244,20 +244,11 @@ bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script, IntToString(definition_index), IntToString(j)); return false; } - std::string scheme = pattern.scheme(); - if (scheme == "file") { - // No content scripts are allowed unless the command line override switch - // was provided. - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableJsOnFileUrls)) { - continue; - } - } result->add_url_pattern(pattern); } - // Include/exclude globs (mostly for Greasemonkey compatibility). + // include/exclude globs (mostly for Greasemonkey compat) if (!LoadGlobsHelper(content_script, definition_index, keys::kIncludeGlobs, error, &UserScript::add_glob, result)) { return false; @@ -268,7 +259,7 @@ bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script, return false; } - // js and css keys. + // js and css keys ListValue* js = NULL; if (content_script->HasKey(keys::kJs) && !content_script->GetList(keys::kJs, &js)) { diff --git a/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json index f77a996..585083e 100644 --- a/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json +++ b/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -19,7 +19,7 @@ "permissions": ["tabs", "http://*.google.com/*", "https://*.google.com/*"], "content_scripts": [ { - "matches": ["http://*.google.com/*", "https://*.google.com/*", "http://localhost/*"], + "matches": ["file://*", "http://*.google.com/*", "https://*.google.com/*"], "js": ["script1.js", "script2.js"], "css": ["style1.css", "style2.css", "style2.css"] }, diff --git a/chrome/test/data/extensions/good/Preferences b/chrome/test/data/extensions/good/Preferences index 85bdee3..42a2713 100644 --- a/chrome/test/data/extensions/good/Preferences +++ b/chrome/test/data/extensions/good/Preferences @@ -26,7 +26,7 @@ "permissions": ["tabs", "http://*.google.com/*", "https://*.google.com/*"], "content_scripts": [ { - "matches": ["http://*.google.com/*", "https://*.google.com/*", "http://localhost/*"], + "matches": ["file://*", "http://*.google.com/*", "https://*.google.com/*"], "js": ["script1.js", "script2.js"], "css": ["style1.css", "style2.css", "style2.css"] }, @@ -50,7 +50,7 @@ "permissions": ["tabs"], "content_scripts": [ { - "matches": ["http://localhost/*"], + "matches": ["file://*"], "js": ["page.js"] } ] diff --git a/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json index 56597f2..56fdb6c 100755 --- a/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts1/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -3,6 +3,6 @@ "version": "1.0.0.0", "name": "1 content script", "content_scripts": [ - { "matches": ["http://*/*"], "js": ["script.js"] } + { "matches": ["file://*"], "js": ["script.js"] } ] } diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ahbojlbmpfcbogfblmekncilheldhjga/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ahbojlbmpfcbogfblmekncilheldhjga/1.0/manifest.json index 7f8e56c..ebb23bbd 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ahbojlbmpfcbogfblmekncilheldhjga/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ahbojlbmpfcbogfblmekncilheldhjga/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test10", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJc5hNAjdKE1Rf/xYR7qkCRqoHDqZ69XRNh0NkYvir4XGlE7uqg7x2EhilkXqeoEmGJdqBYH601CgfRK0bmDbF+zlGvgW20ld4pmhWlBjZBi7ZoqLRK4UkBC7EFnIdxVHb+rQtEYK+1nTzX6WKMaNtPKjs2oTRMchZdpDyLRhmaQIDAQAB", - "name": "test10", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test10",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJc5hNAjdKE1Rf/xYR7qkCRqoHDqZ69XRNh0NkYvir4XGlE7uqg7x2EhilkXqeoEmGJdqBYH601CgfRK0bmDbF+zlGvgW20ld4pmhWlBjZBi7ZoqLRK4UkBC7EFnIdxVHb+rQtEYK+1nTzX6WKMaNtPKjs2oTRMchZdpDyLRhmaQIDAQAB",
+ "name": "test10",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/coomonpcecmahbfkifeohkbgicpcfdgf/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/coomonpcecmahbfkifeohkbgicpcfdgf/1.0/manifest.json index f40f296..a325a89 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/coomonpcecmahbfkifeohkbgicpcfdgf/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/coomonpcecmahbfkifeohkbgicpcfdgf/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test1", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbg9bDLfP2MkNebiYmIIrmP8TKyGR/a1Ul26PYbj/6UCvUN5aVZfZKKH8S7FEp3vCunIOF8h+JPugcMmJRTOhylqEjIAJBWI6CgljgS1CfGnHraeixrfRL6odFKqTc+cQr/TwlCGpK5qjtczX4LsJGRmxKA6upm+B81m8AiAUMJQIDAQAB", - "name": "test1", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test1",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbg9bDLfP2MkNebiYmIIrmP8TKyGR/a1Ul26PYbj/6UCvUN5aVZfZKKH8S7FEp3vCunIOF8h+JPugcMmJRTOhylqEjIAJBWI6CgljgS1CfGnHraeixrfRL6odFKqTc+cQr/TwlCGpK5qjtczX4LsJGRmxKA6upm+B81m8AiAUMJQIDAQAB",
+ "name": "test1",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/dhminefdpfgdedodgdilagiencggdcpm/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/dhminefdpfgdedodgdilagiencggdcpm/1.0/manifest.json index e80e576..80ba6292 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/dhminefdpfgdedodgdilagiencggdcpm/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/dhminefdpfgdedodgdilagiencggdcpm/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test7", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9D6Byfx1I8upJ+M2KXJZU6Evgm3VgvFFfmxJI65i5glm/trQujqBPU+BxiD4OZPX23Fas4wLsDkc0zN/NV04irgeVKlbslg5giojeWzJgenmLvpcw5CDP+tTgIpWV207nuVpqG2kdrP2zx8vgaSUuVUdIUF5mrbdHkYjnXkFzXwIDAQAB", - "name": "test7", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test7",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9D6Byfx1I8upJ+M2KXJZU6Evgm3VgvFFfmxJI65i5glm/trQujqBPU+BxiD4OZPX23Fas4wLsDkc0zN/NV04irgeVKlbslg5giojeWzJgenmLvpcw5CDP+tTgIpWV207nuVpqG2kdrP2zx8vgaSUuVUdIUF5mrbdHkYjnXkFzXwIDAQAB",
+ "name": "test7",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/kgfhjcinicjnlcbnbacbkbjdbafnlckn/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/kgfhjcinicjnlcbnbacbkbjdbafnlckn/1.0/manifest.json index fc6c9e7..25293e9 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/kgfhjcinicjnlcbnbacbkbjdbafnlckn/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/kgfhjcinicjnlcbnbacbkbjdbafnlckn/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test9", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2t6hjZyu4jS8UIHLxJMZoxAWDULi7PGC8pmA9LLe9NiDWG5UB68Se7olodYE/4fvuEc4r7JM1guz3r8FDvgZ+djxMXsldY5A683PxNpGEJf1bZfqDb2xUX4LlKgcNFcwMZpAza2BPZu+OlcIX/n9XodgP4+e55A3IxeuMIs5uKQIDAQAB", - "name": "test9", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test9",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2t6hjZyu4jS8UIHLxJMZoxAWDULi7PGC8pmA9LLe9NiDWG5UB68Se7olodYE/4fvuEc4r7JM1guz3r8FDvgZ+djxMXsldY5A683PxNpGEJf1bZfqDb2xUX4LlKgcNFcwMZpAza2BPZu+OlcIX/n9XodgP4+e55A3IxeuMIs5uKQIDAQAB",
+ "name": "test9",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ledhkldokbafdcbmepdigjmkabmombel/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ledhkldokbafdcbmepdigjmkabmombel/1.0/manifest.json index fa5db2c..8e18a65 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ledhkldokbafdcbmepdigjmkabmombel/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ledhkldokbafdcbmepdigjmkabmombel/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test4", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8VBNzk/hJkrU1xOU5c7JLJfMs379GV2bl7IqnbeofUNUCWjRhi65bX/snHCdnRam1leS2dXESiBAW2+hP7BsIeQvlIM+TVUNOJrVtIhOl7QSQh1WlI00lif5nM9hi2F4sLmGpCpI83WkJjUuuoY+0U9XTJkInY2JU8WTZvEXpeQIDAQAB", - "name": "test4", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test4",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8VBNzk/hJkrU1xOU5c7JLJfMs379GV2bl7IqnbeofUNUCWjRhi65bX/snHCdnRam1leS2dXESiBAW2+hP7BsIeQvlIM+TVUNOJrVtIhOl7QSQh1WlI00lif5nM9hi2F4sLmGpCpI83WkJjUuuoY+0U9XTJkInY2JU8WTZvEXpeQIDAQAB",
+ "name": "test4",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/lgmapeiimomfdbfphldobhhpoaoafaci/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/lgmapeiimomfdbfphldobhhpoaoafaci/1.0/manifest.json index 5d9d019..7bfe9d3 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/lgmapeiimomfdbfphldobhhpoaoafaci/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/lgmapeiimomfdbfphldobhhpoaoafaci/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test3", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVvOzMOzU9zxnpj+nQUcWVdW76rYlfVaDWYmOgoNrXN2C1WsB6GE+nxsjGgA3t2AP5M9Vwq9b3CCI5CCHEzWaZGGQ7qrSidU2gosNUb8n7O3K95BnqMOdrIlnN2/Z5POdfjGRN2BNpSdQ8UVjD8wZPJ7E7JIFdizGz70TV6lMNyQIDAQAB", - "name": "test3", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test3",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVvOzMOzU9zxnpj+nQUcWVdW76rYlfVaDWYmOgoNrXN2C1WsB6GE+nxsjGgA3t2AP5M9Vwq9b3CCI5CCHEzWaZGGQ7qrSidU2gosNUb8n7O3K95BnqMOdrIlnN2/Z5POdfjGRN2BNpSdQ8UVjD8wZPJ7E7JIFdizGz70TV6lMNyQIDAQAB",
+ "name": "test3",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/maemolkcfjifpmigoecmpfphmebnebpk/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/maemolkcfjifpmigoecmpfphmebnebpk/1.0/manifest.json index 15ece5e..f6b40f0 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/maemolkcfjifpmigoecmpfphmebnebpk/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/maemolkcfjifpmigoecmpfphmebnebpk/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test2", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2nUfTHAG9rZ14Vq+JCUCU6OxuCkQ+Q6s6RA2h+mnJL8op4IBdOqZN038lmsl2rFhKz1rP/YPS4AP/LyiTfqL8e12GLw4nm71AM/LqeATzfFrvcFYCXy75ewhmBoOHMGQNe8JfaZ+0baUP7DnUiag91GiRmuAbqQGxLhdU6Qp3+wIDAQAB", - "name": "test2", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test2",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2nUfTHAG9rZ14Vq+JCUCU6OxuCkQ+Q6s6RA2h+mnJL8op4IBdOqZN038lmsl2rFhKz1rP/YPS4AP/LyiTfqL8e12GLw4nm71AM/LqeATzfFrvcFYCXy75ewhmBoOHMGQNe8JfaZ+0baUP7DnUiag91GiRmuAbqQGxLhdU6Qp3+wIDAQAB",
+ "name": "test2",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mdeggakgacjccnbfbhbihfchoidihkaf/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mdeggakgacjccnbfbhbihfchoidihkaf/1.0/manifest.json index 4d2fc82..c5e5e16 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mdeggakgacjccnbfbhbihfchoidihkaf/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mdeggakgacjccnbfbhbihfchoidihkaf/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test8", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuuuaBElvU9XfeQLZ+w7YijIjQ/UOtUCzPApLZ1jurBC2BtTKVffL/ZzBEjGeYJZGqrbYeXxoIuM++UlWTGwxeOhGyO3zE0qgqlx9C8ufgaFAXY+fnLXnsrN18UupRGesuvmBEfvI0Lgp0fMKgAFBd5AEwdsrTLqkNK0pkGelEHwIDAQAB", - "name": "test8", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test8",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuuuaBElvU9XfeQLZ+w7YijIjQ/UOtUCzPApLZ1jurBC2BtTKVffL/ZzBEjGeYJZGqrbYeXxoIuM++UlWTGwxeOhGyO3zE0qgqlx9C8ufgaFAXY+fnLXnsrN18UupRGesuvmBEfvI0Lgp0fMKgAFBd5AEwdsrTLqkNK0pkGelEHwIDAQAB",
+ "name": "test8",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mgonfebmjopdoipblbijejncibmgmcol/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mgonfebmjopdoipblbijejncibmgmcol/1.0/manifest.json index 09aef9b..da1f2ee 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mgonfebmjopdoipblbijejncibmgmcol/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/mgonfebmjopdoipblbijejncibmgmcol/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test5", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEII3rgPbgU4VEmHo4aKRVVujGhBqg2vhKXqtWnS7Yw5OJWkzFFa/Yb9Tz3/3m6HIh7cVCPP8RG4Ssro6JEDPHCwJU8ILMcgZkKtzOOFt2bybQBmVc1cTEOkSIfS9ktQPANi7ljxOqqDelyB6uwhGe4VZ324f/e4TISMBA+ejgkwIDAQAB", - "name": "test5", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test5",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEII3rgPbgU4VEmHo4aKRVVujGhBqg2vhKXqtWnS7Yw5OJWkzFFa/Yb9Tz3/3m6HIh7cVCPP8RG4Ssro6JEDPHCwJU8ILMcgZkKtzOOFt2bybQBmVc1cTEOkSIfS9ktQPANi7ljxOqqDelyB6uwhGe4VZ324f/e4TISMBA+ejgkwIDAQAB",
+ "name": "test5",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ohmmlgjlmaadhojogadklhlidfpdeoca/1.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ohmmlgjlmaadhojogadklhlidfpdeoca/1.0/manifest.json index 67c8190..a284020 100644 --- a/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ohmmlgjlmaadhojogadklhlidfpdeoca/1.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts10/Default/Extensions/ohmmlgjlmaadhojogadklhlidfpdeoca/1.0/manifest.json @@ -1,10 +1,10 @@ -{ - "content_scripts": [ { - "js": [ "script.js" ], - "matches": [ "http://*/*" ] - } ], - "description": "test6", - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDH/GGfuKiHDPMppIwuuRndAchnsz2iH6up9e5s+W6gsHtus37rkUvbUnCkx+ThE5F4Fj/C/rMYwGgCLe30HowD5BocOM0PF50aeYotlH4uystL2Gj/U1oSuBt+Mqn/MuR9U8nQnFvcDQeyG/09iPwC2faj7/LNnu0rT+dtYk0GnQIDAQAB", - "name": "test6", - "version": "1.0" -} +{
+ "content_scripts": [ {
+ "js": [ "script.js" ],
+ "matches": [ "file://*", "http://*/*" ]
+ } ],
+ "description": "test6",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDH/GGfuKiHDPMppIwuuRndAchnsz2iH6up9e5s+W6gsHtus37rkUvbUnCkx+ThE5F4Fj/C/rMYwGgCLe30HowD5BocOM0PF50aeYotlH4uystL2Gj/U1oSuBt+Mqn/MuR9U8nQnFvcDQeyG/09iPwC2faj7/LNnu0rT+dtYk0GnQIDAQAB",
+ "name": "test6",
+ "version": "1.0"
+}
diff --git a/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json b/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json index 29f2dba..d1f993b 100755 --- a/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json +++ b/chrome/test/data/extensions/profiles/content_scripts50/Default/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/manifest.json @@ -3,55 +3,55 @@ "version": "1.0.0.0", "name": "50 content scripts", "content_scripts": [ - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] }, - { "matches": ["http://*/*"], "js": ["script.js"] } + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] }, + { "matches": ["file://*"], "js": ["script.js"] } ] } diff --git a/chrome/test/data/extensions/subscribe_page_action/manifest.json b/chrome/test/data/extensions/subscribe_page_action/manifest.json index 6dec439..b33afa8 100644 --- a/chrome/test/data/extensions/subscribe_page_action/manifest.json +++ b/chrome/test/data/extensions/subscribe_page_action/manifest.json @@ -1,7 +1,7 @@ { "name": "RSS Subscription Extension", "description": "Adds one-click subscription to your toolbar", - "version": "1.6.3", + "version": "1.6.4", "permissions": [ "tabs", "http://*/*" @@ -9,7 +9,7 @@ "background_page": "background.html", "content_scripts": [ { - "matches": ["http://*/*"], + "matches": ["http://*/*", "file://*.*"], "js": ["feed_finder.js"] } ], diff --git a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json index c09e818..eac2f95 100644 --- a/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json +++ b/chrome/test/data/extensions/ui/create_extension_detail_value_expected_output/good-extension1.json @@ -9,7 +9,7 @@ "order": 2, "content_scripts": [ { - "matches": ["http://*.google.com/*", "https://*.google.com/*", "http://localhost/*"], + "matches": ["file://*", "http://*.google.com/*", "https://*.google.com/*"], "js": ["script1.js", "script2.js"], "css": ["style1.css", "style2.css", "style2.css"] }, diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc index 40e5372..8dcabfd 100644 --- a/chrome/test/page_cycler/page_cycler_test.cc +++ b/chrome/test/page_cycler/page_cycler_test.cc @@ -162,9 +162,6 @@ class PageCyclerTest : public UITest { // Expose garbage collection for the page cycler tests. launch_arguments_.AppendSwitchWithValue(switches::kJavaScriptFlags, L"--expose_gc"); - // Page cycler tests need to run content scripts on file:// urls. - launch_arguments_.AppendSwitch(switches::kEnableJsOnFileUrls); - #if defined(OS_MACOSX) static rlim_t initial_fd_limit = GetFileDescriptorLimit(); fd_limit_ = initial_fd_limit; |