Ubuntu Pastebin

Paste from Saviq at Tue, 27 Oct 2015 21:10:04 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        }
<<<<<<< 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
    }
}
Download as text