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

Unified Diff: chrome/renderer/extensions/extension_api_client_unittest.cc

Issue 174116: chrome.i18n API (accept languages part 1) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « chrome/common/extensions/docs/i18n.html ('k') | chrome/test/data/extensions/api_test/i18n/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/extension_api_client_unittest.cc
===================================================================
--- chrome/renderer/extensions/extension_api_client_unittest.cc (revision 25782)
+++ chrome/renderer/extensions/extension_api_client_unittest.cc (working copy)
@@ -588,3 +588,19 @@
"Uncaught Error: Invalid value for argument 1. "
"Expected 'function' but got 'integer'.");
}
+
+// I18N API
+TEST_F(ExtensionAPIClientTest, GetAcceptLanguages) {
+ ExpectJsFail("chrome.i18n.getAcceptLanguages(32, function(){})",
+ "Uncaught Error: Too many arguments.");
+
+ ExpectJsFail("chrome.i18n.getAcceptLanguages()",
+ "Uncaught Error: Parameter 0 is required.");
+
+ ExpectJsFail("chrome.i18n.getAcceptLanguages('abc')",
+ "Uncaught Error: Invalid value for argument 0. "
+ "Expected 'function' but got 'string'.");
+
+ ExpectJsPass("chrome.i18n.getAcceptLanguages(function(){})",
+ "i18n.getAcceptLanguages", "null");
+}
« no previous file with comments | « chrome/common/extensions/docs/i18n.html ('k') | chrome/test/data/extensions/api_test/i18n/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698