| Index: chrome/test/data/extensions/api_test/stubs/content_script.js
|
| diff --git a/chrome/test/data/extensions/api_test/stubs/content_script.js b/chrome/test/data/extensions/api_test/stubs/content_script.js
|
| index 409a6e23c5c08eb39ef2693384ea0eaad24858d8..92cde79fcd6c451fab49da8af28c897828cbe01a 100644
|
| --- a/chrome/test/data/extensions/api_test/stubs/content_script.js
|
| +++ b/chrome/test/data/extensions/api_test/stubs/content_script.js
|
| @@ -16,10 +16,14 @@ console.log("asking for api ...");
|
| chrome.extension.sendRequest("getApi", function(apis) {
|
| var apiFeatures = chrome.test.getApiFeatures();
|
| function isAvailableToContentScripts(namespace, path) {
|
| + function checkContexts(contextList) {
|
| + return contextList == 'all' ||
|
| + contextList.indexOf('content_script') != -1;
|
| + }
|
| if (apiFeatures.hasOwnProperty(path))
|
| - return apiFeatures[path]['contexts'].indexOf('content_script') != -1
|
| + return checkContexts(apiFeatures[path]['contexts']);
|
| return apiFeatures.hasOwnProperty(namespace) &&
|
| - apiFeatures[namespace]['contexts'].indexOf('content_script') != -1;
|
| + checkContexts(apiFeatures[namespace]['contexts']);
|
| }
|
|
|
| console.log("got api response");
|
|
|