Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
39
gaia/apps/homescreen/test/marionette/localization_test.js
Executable file
39
gaia/apps/homescreen/test/marionette/localization_test.js
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
'use strict';
|
||||
var assert = require('assert');
|
||||
|
||||
marionette('Homescreen - Localization', function() {
|
||||
|
||||
var client = marionette.client({
|
||||
profile: require(__dirname + '/client_options.js')
|
||||
});
|
||||
var actions, home, system;
|
||||
|
||||
setup(function() {
|
||||
actions = client.loader.getActions();
|
||||
home = client.loader.getAppClass('homescreen');
|
||||
system = client.loader.getAppClass('system');
|
||||
system.waitForFullyLoaded();
|
||||
home.waitForLaunch();
|
||||
});
|
||||
|
||||
test('Localization updates icon names', function() {
|
||||
var settingsIcon = home.getIconByName('Settings');
|
||||
assert.equal(
|
||||
home.getIconText(settingsIcon),
|
||||
home.localizedAppName('settings', 'en-US'));
|
||||
|
||||
client.switchToFrame();
|
||||
client.executeScript(function() {
|
||||
navigator.mozSettings.createLock().set({
|
||||
'language.current': 'fr-x-psaccent'
|
||||
});
|
||||
});
|
||||
client.switchToFrame(system.getHomescreenIframe());
|
||||
|
||||
// Localization can be async, wait for the content to update
|
||||
var newIconName = home.localizedAppName('settings', 'fr-x-psaccent');
|
||||
client.waitFor(function() {
|
||||
return !!home.getIconByName(newIconName);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue