| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // The id of the extension in localized_extension.crx. |
| 6 var localizedId = "oolblhbomdbcpmafphaodhjfcgbihcdg"; |
| 7 |
| 8 var tests = [ |
| 9 |
| 10 // This tests an install passing a localized name. |
| 11 function localizeName() { |
| 12 // See things through all the way to a successful install. |
| 13 listenOnce(chrome.management.onInstalled, callbackPass(function(info) { |
| 14 assertEq(info.id, localizedId); |
| 15 })); |
| 16 |
| 17 var manifest = getManifest('localized_extension/manifest.json'); |
| 18 var messages = getManifest('localized_extension/_locales/fr/messages.json'); |
| 19 getIconData(function(icon) { |
| 20 // Begin installing. |
| 21 chrome.webstorePrivate.beginInstallWithManifest2( |
| 22 { 'id':localizedId, 'iconData': icon, 'manifest': manifest, |
| 23 'localizedName': 'Le Title', 'locale': 'fr' }, |
| 24 callbackPass(function(result) { |
| 25 assertEq(result, ""); |
| 26 chrome.webstorePrivate.completeInstall(localizedId, callbackPass()); |
| 27 })); |
| 28 }); |
| 29 } |
| 30 |
| 31 ]; |
| 32 |
| 33 runTests(tests); |
| 34 |
| OLD | NEW |