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

Unified Diff: chrome/test/data/extensions/api_test/native_bindings/extension/background.js

Issue 2953133002: [Extensions Bindings] Support chrome.extension.lastError (Closed)
Patch Set: jbroman's, 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/bindings/api_binding_js_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/native_bindings/extension/background.js
diff --git a/chrome/test/data/extensions/api_test/native_bindings/extension/background.js b/chrome/test/data/extensions/api_test/native_bindings/extension/background.js
index 0b6fc9ddd9851573f0b8b5a99600f258d3e810c7..560cecfe0d80be2ea9a946a7f543559e3180969d 100644
--- a/chrome/test/data/extensions/api_test/native_bindings/extension/background.js
+++ b/chrome/test/data/extensions/api_test/native_bindings/extension/background.js
@@ -124,7 +124,11 @@ var tests = [
},
function testLastError() {
chrome.runtime.setUninstallURL('chrome://newtab', function() {
- chrome.test.assertLastError('Invalid URL: "chrome://newtab".');
+ var expectedError = 'Invalid URL: "chrome://newtab".';
+ chrome.test.assertLastError(expectedError);
+ // Explicitly also test the old extension.lastError property.
+ chrome.test.assertTrue(!!chrome.extension.lastError);
+ chrome.test.assertEq(expectedError, chrome.extension.lastError.message);
chrome.test.succeed();
});
},
« no previous file with comments | « no previous file | extensions/renderer/bindings/api_binding_js_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698