| 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..930bc07f0ee282b682e81fe0ca2f3fb47efe272a 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
|
| @@ -5,21 +5,6 @@
|
| // Simple success test: we want content-script APIs to be available (like
|
| // sendRequest), but other APIs to be undefined or throw exceptions on access.
|
|
|
| -function runsWithException(f) {
|
| - try {
|
| - var foo = 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) {
|
| - return true;
|
| - } else {
|
| - console.log('Error: incorrect exception message: ' + e.message);
|
| - return false;
|
| - }
|
| - }
|
| -}
|
| -
|
| var success = true;
|
|
|
| // The whole of chrome.storage (arbitrary unprivileged) is unavailable.
|
| @@ -36,7 +21,7 @@ if (chrome.tabs) {
|
| }
|
|
|
| // Parts of chrome.extension are unavailable.
|
| -if (!runsWithException(function() { return chrome.extension.getViews; }))
|
| +if (typeof(chrome.extension.getViews) != 'undefined')
|
| success = false;
|
|
|
| chrome.extension.sendRequest({success: success});
|
|
|