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
76
gaia/apps/system/test/marionette/homescreen_navigation_test.js
Executable file
76
gaia/apps/system/test/marionette/homescreen_navigation_test.js
Executable file
|
|
@ -0,0 +1,76 @@
|
|||
'use strict';
|
||||
|
||||
marionette('Homescreen navigation >', function() {
|
||||
var ReflowHelper =
|
||||
require('../../../../tests/jsmarionette/plugins/reflow_helper.js');
|
||||
|
||||
var assert = require('assert');
|
||||
|
||||
var SETTINGS_APP = 'app://settings.gaiamobile.org';
|
||||
|
||||
var client = marionette.client({
|
||||
profile: {
|
||||
prefs: {
|
||||
'browser.safebrowsing.enabled': false,
|
||||
'browser.safebrowsing.malware.enabled': false,
|
||||
'devtools.debugger.forbid-certified-apps': false,
|
||||
'privacy.trackingprotection.enabled': false
|
||||
},
|
||||
settings: {
|
||||
'devtools.overlay': true,
|
||||
'hud.reflows': true,
|
||||
'notifications.resend': false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var sys, settings, homescreen;
|
||||
var reflowHelper;
|
||||
|
||||
function launchSettings() {
|
||||
var settings = sys.waitForLaunch(SETTINGS_APP);
|
||||
client.waitFor(function() {
|
||||
return settings.ariaDisplayed() && !homescreen.ariaDisplayed();
|
||||
});
|
||||
return settings;
|
||||
}
|
||||
|
||||
function goHome() {
|
||||
sys.goHome();
|
||||
client.waitFor(function() {
|
||||
return !settings.ariaDisplayed() && homescreen.ariaDisplayed();
|
||||
});
|
||||
}
|
||||
|
||||
setup(function() {
|
||||
reflowHelper = new ReflowHelper(client);
|
||||
client.switchToFrame();
|
||||
sys = client.loader.getAppClass('system');
|
||||
sys.waitForStartup();
|
||||
|
||||
homescreen = sys.getAppIframe('homescreen.gaiamobile.org');
|
||||
settings = launchSettings();
|
||||
});
|
||||
|
||||
test('Going to the homescreen and back to a warm app', function() {
|
||||
// Since the clock will cause reflows we're disabling it
|
||||
// Also disabling the developer hud because of
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=971008
|
||||
sys.stopDevtools();
|
||||
sys.stopClock();
|
||||
|
||||
goHome();
|
||||
launchSettings();
|
||||
|
||||
reflowHelper.startTracking(sys.URL);
|
||||
client.switchToFrame();
|
||||
|
||||
goHome();
|
||||
launchSettings();
|
||||
|
||||
var count = reflowHelper.getCount();
|
||||
assert(count <= 2, 'we got 2 or less reflows');
|
||||
reflowHelper.stopTracking();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue