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

Unified Diff: chrome/renderer/resources/extensions/apitest.js

Issue 10815028: Make ActiveTabPermissionManager also grant the tabs permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 8 years, 5 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/renderer/resources/extensions/apitest.js
diff --git a/chrome/renderer/resources/extensions/apitest.js b/chrome/renderer/resources/extensions/apitest.js
index a29f09791b57c5cf10a46a5172edf5f64ad2d98b..6d8ea0ebb5ad363350e87a5ec7c6f16fd102734e 100644
--- a/chrome/renderer/resources/extensions/apitest.js
+++ b/chrome/renderer/resources/extensions/apitest.js
@@ -189,6 +189,13 @@
}
};
+ chrome.test.assertLastError = function(expectedError) {
+ chrome.test.assertEq(typeof(expectedError), 'string');
+ chrome.test.assertTrue(chrome.runtime.lastError != undefined,
+ "No lastError, but expected " + expectedError);
+ chrome.test.assertEq(expectedError, chrome.runtime.lastError.message);
+ }
+
function safeFunctionApply(func, arguments) {
try {
if (func)
@@ -211,10 +218,7 @@
if (expectedError == null) {
chrome.test.assertNoLastError();
} else {
- chrome.test.assertEq(typeof(expectedError), 'string');
- chrome.test.assertTrue(chrome.runtime.lastError != undefined,
- "No lastError, but expected " + expectedError);
- chrome.test.assertEq(expectedError, chrome.runtime.lastError.message);
+ chrome.test.assertLastError(expectedError);
}
if (func) {
« no previous file with comments | « chrome/renderer/extensions/extension_dispatcher.cc ('k') | chrome/test/data/extensions/api_test/active_tab/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698