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
44
gaia/tests/jsmarionette/plugins/marionette-apps/test/getself_test.js
Executable file
44
gaia/tests/jsmarionette/plugins/marionette-apps/test/getself_test.js
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
'use strict';
|
||||
|
||||
/* global marionette, setup */
|
||||
|
||||
var assert = require('assert');
|
||||
|
||||
marionette('getself', function() {
|
||||
var getSelf = require('../lib/getself').getSelf;
|
||||
|
||||
marionette.plugin('mozApps', require('../lib/apps'));
|
||||
var client = marionette.client();
|
||||
|
||||
var origins = {
|
||||
system: 'app://system.gaiamobile.org',
|
||||
calendar: 'app://calendar.gaiamobile.org'
|
||||
};
|
||||
|
||||
function testCurrentApp(origin) {
|
||||
test('current app self', function(done) {
|
||||
getSelf(client.mozApps, function(err, app) {
|
||||
assert.equal(app.origin, origins[origin], origin + ' origin');
|
||||
done();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
testCurrentApp('system');
|
||||
|
||||
suite('switch app', function() {
|
||||
setup(function(done) {
|
||||
if (client.isSync) {
|
||||
client.apps.launch(origins.calendar);
|
||||
client.apps.switchToApp(origins.calendar);
|
||||
done();
|
||||
} else {
|
||||
client.apps.launch(origins.calendar, function() {
|
||||
client.apps.switchToApp(origins.calendar, done);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
testCurrentApp('calendar');
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue