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

Side by Side Diff: chrome/test/data/extensions/api_test/i18n/test.js

Issue 1208993011: New thin layer of API extension chrome.i18n.detectLanguage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // i18n api test 5 // i18n api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.I18N --lib=browser_tests 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.I18N --lib=browser_tests
7 7
8 var testCallback = chrome.test.testCallback; 8 var testCallback = chrome.test.testCallback;
9 var callbackPass = chrome.test.callbackPass; 9 var callbackPass = chrome.test.callbackPass;
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 chrome.test.log("Creating tab..."); 52 chrome.test.log("Creating tab...");
53 chrome.tabs.create({ 53 chrome.tabs.create({
54 url: TEST_FILE_URL 54 url: TEST_FILE_URL
55 }); 55 });
56 chrome.test.succeed(); 56 chrome.test.succeed();
57 }, 57 },
58 function getUILanguage() { 58 function getUILanguage() {
59 chrome.test.assertEq('en-US', chrome.i18n.getUILanguage()); 59 chrome.test.assertEq('en-US', chrome.i18n.getUILanguage());
60 chrome.test.succeed(); 60 chrome.test.succeed();
61 } 61 }
62 /*,
Takashi Toyoshima 2015/07/08 03:19:42 Why this part is commented out? If this does not w
amalika 2015/07/08 21:58:03 Done.
63 function detectLanguage() {
64 chrome.i18n.detectLanguage("hello", callbackPass(function(results) {
65 chrome.test.assertEq(results.length, 2);
66 chrome.test.assertEq(results[0], "en-US");
67 chrome.test.assertEq(results[1], "en");
68 }));
69 }
70 */
62 ]); 71 ]);
63 }); 72 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698