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

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

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 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..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.

Powered by Google App Engine
This is Rietveld 408576698