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

Unified Diff: chrome/test/data/extensions/api_test/permissions/optional/background.js

Issue 2937333002: [Extensions Bindings] Update optional permissions tests (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/permissions/optional/background.js
diff --git a/chrome/test/data/extensions/api_test/permissions/optional/background.js b/chrome/test/data/extensions/api_test/permissions/optional/background.js
index 2bf1e17b254872dd0f2489ead96c4565b05c9347..956b655aea1ce3234f9bce4c93246237fa61b0c6 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional/background.js
+++ b/chrome/test/data/extensions/api_test/permissions/optional/background.js
@@ -196,9 +196,13 @@ chrome.test.getConfig(function(config) {
}));
assertTrue(typeof chrome.bookmarks == 'object' &&
chrome.bookmarks != null);
- assertThrows(
- chrome.bookmarks.getTree, [function(){}],
- "'bookmarks' requires a different Feature that is not present.");
+ var nativeBindingsError =
+ "'bookmarks.getTree' is not available in this context.";
+ var jsBindingsError =
+ "'bookmarks' requires a different Feature that is not present.";
+ var regexp =
+ new RegExp(nativeBindingsError + '|' + jsBindingsError);
+ assertThrows(chrome.bookmarks.getTree, [function(){}], regexp);
}
));
},
@@ -295,9 +299,12 @@ chrome.test.getConfig(function(config) {
function(permissions) {
assertTrue(typeof chrome.bookmarks == 'object' &&
chrome.bookmarks != null);
- assertThrows(
- chrome.bookmarks.getTree, [function(){}],
- "'bookmarks' requires a different Feature that is not present.");
+ var nativeBindingsError =
+ "'bookmarks.getTree' is not available in this context.";
+ var jsBindingsError =
+ "'bookmarks' requires a different Feature that is not present.";
+ var regexp = new RegExp(nativeBindingsError + '|' + jsBindingsError);
+ assertThrows(chrome.bookmarks.getTree, [function(){}], regexp);
});
chrome.permissions.request(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698