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

Unified Diff: chrome/test/data/extensions/api_test/bindings/unavailable_bindings_never_registered/background.js

Issue 2953453002: [Extensions Bindings] Add access checks in custom types (Closed)
Patch Set: lazyboy's 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 | extensions/renderer/api_bindings_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/bindings/unavailable_bindings_never_registered/background.js
diff --git a/chrome/test/data/extensions/api_test/bindings/unavailable_bindings_never_registered/background.js b/chrome/test/data/extensions/api_test/bindings/unavailable_bindings_never_registered/background.js
index d5fd54549a2fd24a0137cdbf3e6c4369ec73ac79..cdab7cec81e5791b7256511359abbed183c6c272 100644
--- a/chrome/test/data/extensions/api_test/bindings/unavailable_bindings_never_registered/background.js
+++ b/chrome/test/data/extensions/api_test/bindings/unavailable_bindings_never_registered/background.js
@@ -39,10 +39,15 @@ function test() {
assertRuntimeIsRegistered();
assertStorageIsRegistered();
+ var jsBindingsError =
+ "'storage' requires a different Feature that is not present.";
+ var nativeBindingsError =
+ "'storage.get' is not available in this context.";
+ var regexp = new RegExp(nativeBindingsError + '|' + jsBindingsError);
// Although storage should throw an error on use since it's removed.
chrome.test.assertThrows(
chrome.storage.local.get, chrome.storage.local, [function(){}],
- "'storage' requires a different Feature that is not present.");
+ regexp);
chrome.test.succeed();
}));
« no previous file with comments | « no previous file | extensions/renderer/api_bindings_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698