| Index: chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js
|
| diff --git a/chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js b/chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js
|
| index 572f28047d6e70af9e6b7d1067db10fe3743bd9d..0858517a9c7fd39dcbf6b0b038ededab2f0a3d31 100644
|
| --- a/chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js
|
| +++ b/chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js
|
| @@ -11,7 +11,7 @@ function runsWithException(f) {
|
| console.log('Error: ' + f + '" doesn\'t throw exception.');
|
| return false;
|
| } catch (e) {
|
| - if (e.message.indexOf(' can only be used in extension processes.') > -1) {
|
| + if (e.message.indexOf(' cannot be used in this context.') > -1) {
|
| return true;
|
| } else {
|
| console.log('Error: incorrect exception message: ' + e.message);
|
| @@ -28,11 +28,18 @@ if (chrome.storage) {
|
| success = false;
|
| }
|
|
|
| -// Ditto chrome.tabs, though it's special because it's a dependency of the
|
| -// partially unprivileged chrome.extension.
|
| -if (chrome.tabs) {
|
| - console.log('Error: chrome.tabs exists, it shouldn\'t.');
|
| - success = false;
|
| +// Ditto all children of chrome.tabs.
|
| +for (p in chrome.tabs) {
|
| + if (chrome.tabs.hasOwnProperty(p)) {
|
| + if (["remove", "create", "update"].indexOf(p) == -1) {
|
| + if (!runsWithException(
|
| + function(p) { return chrome.tabs[p]; }.bind(null, p))) {
|
| + console.log(p);
|
| + success = false;
|
| + break;
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
| // Parts of chrome.extension are unavailable.
|
|
|