summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 20:43:01 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 20:43:01 +0000
commit5bf3935ad9cc7c8c402c7c513fd7b32e749806f8 (patch)
tree2948a02595ab8f3013a58a295a998abbf0047e9e /chrome/test
parent3e4d3e73750b959d949d8d040ec71c7634cc11a8 (diff)
downloadchromium_src-5bf3935ad9cc7c8c402c7c513fd7b32e749806f8.zip
chromium_src-5bf3935ad9cc7c8c402c7c513fd7b32e749806f8.tar.gz
chromium_src-5bf3935ad9cc7c8c402c7c513fd7b32e749806f8.tar.bz2
Change getLanguage to detectLanguage, and incorporate corresponding changes, in tab extensions. Also, use ISO language (e.g. "fr" instead of "French") as return language.
BUG=none TEST=Enable extensions, add the given toolstrip as extension. For a page, the language of the page should be returned as ISO language (e.g., "french" as "fr") Review URL: http://codereview.chromium.org/149627 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html4
-rw-r--r--chrome/test/data/extensions/samples/cld/toolstrip.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html b/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html
index cf87fe5..5d8d673 100644
--- a/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html
+++ b/chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html
@@ -13,8 +13,8 @@ function testTabsAPI() {
// function to make sure it can be used as an extension API. This will pass if
// the browser navigates to a page in French language before this is called.
function testTabsLanguageAPI() {
- chrome.tabs.getLanguage(null, function(language) {
- window.domAutomationController.send(language == 'FRENCH');
+ chrome.tabs.detectLanguage(null, function(language) {
+ window.domAutomationController.send(language == 'fr');
});
}
diff --git a/chrome/test/data/extensions/samples/cld/toolstrip.html b/chrome/test/data/extensions/samples/cld/toolstrip.html
index 726a030..03851c2b 100644
--- a/chrome/test/data/extensions/samples/cld/toolstrip.html
+++ b/chrome/test/data/extensions/samples/cld/toolstrip.html
@@ -11,7 +11,7 @@ LICENSE file.
var selectedId = -1;
function refreshLanguage() {
console.log("refeshing...");
- chrome.tabs.getLanguage(null, function(language) {
+ chrome.tabs.detectLanguage(null, function(language) {
document.getElementById("languageDiv").innerHTML = language;
});
}