Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3982)

Unified Diff: chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js

Issue 14494013: Allow API functions and events to have entries in _api_features.json (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests, Stubs now inspects _api_features.json Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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});

Powered by Google App Engine
This is Rietveld 408576698