}
<<<<<<< TREE
=======
function test_lifecyclePolicy_data() {
return [
{tag: "phone", formFactor: "phone", usageScenario: "phone", suspendsApps: true},
{tag: "tablet", formFactor: "tablet", usageScenario: "tablet", suspendsApps: true},
{tag: "desktop", formFactor: "tablet", usageScenario: "desktop", suspendsApps: false}
]
}
function test_lifecyclePolicy(data) {
loadShell(data.formFactor);
shell.usageScenario = data.usageScenario;
GSettingsController.setLifecycleExemptAppids(["webbrowser-app"]);
var app1 = ApplicationManager.startApplication("camera-app");
waitUntilAppWindowIsFullyLoaded(app1);
var app2 = ApplicationManager.startApplication("webbrowser-app");
waitUntilAppWindowIsFullyLoaded(app2);
var app3 = ApplicationManager.startApplication("libreoffice");
waitUntilAppWindowIsFullyLoaded(app3);
var app4 = ApplicationManager.startApplication("dialer-app");
waitUntilAppWindowIsFullyLoaded(app4);
// Normal background app
compare(app1.requestedState, data.suspendsApps ?
ApplicationInfoInterface.RequestedSuspended :
ApplicationInfoInterface.RequestedRunning);
// Excluded from lifecycle by gsettings
compare(app2.requestedState, ApplicationInfoInterface.RequestedRunning);
// Excluded from lifecycle because app is non-touch
compare(app3.isTouchApp, false); // sanity check our mock, which sets this for us
compare(app3.requestedState, ApplicationInfoInterface.RequestedRunning);
// Focused app
compare(app4.requestedState, ApplicationInfoInterface.RequestedRunning);
}
>>>>>>> MERGE-SOURCE
}
}