~aacid/unity8/moreAsyncAudioCard

« back to all changes in this revision

Viewing changes to tests/qmltests/tst_Shell.qml

  • Committer: Albert Astals Cid
  • Date: 2016-03-10 08:32:16 UTC
  • mfrom: (2136.2.83 unity8)
  • Revision ID: albert.astals@canonical.com-20160310083216-8nnplxl85qx13xd0
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        shellLoader.active = true;
50
50
    }
51
51
 
 
52
    MouseArea {
 
53
        id: clickThroughCatcher
 
54
        anchors.fill: shellContainer
 
55
    }
 
56
 
52
57
    Item {
53
58
        id: shellContainer
54
59
        anchors.left: root.left
291
296
        signalName: "applicationRemoved"
292
297
    }
293
298
 
 
299
    SignalSpy {
 
300
        id: clickThroughSpy
 
301
        target: clickThroughCatcher
 
302
        signalName: "clicked"
 
303
    }
 
304
 
294
305
    Telephony.CallEntry {
295
306
        id: phoneCall
296
307
        phoneNumber: "+447812221111"
1977
1988
                compare(ApplicationManager.findApplication("libreoffice") === null, true);
1978
1989
            }
1979
1990
        }
 
1991
 
 
1992
        function test_inputEventsOnEdgesEndUpInAppSurface_data() {
 
1993
            return [
 
1994
                { tag: "phone", repeaterName: "spreadRepeater" },
 
1995
                { tag: "tablet", repeaterName: "spreadRepeater" },
 
1996
                { tag: "desktop", repeaterName: "appRepeater" },
 
1997
            ]
 
1998
        }
 
1999
 
 
2000
        function test_inputEventsOnEdgesEndUpInAppSurface(data) {
 
2001
            loadShell(data.tag);
 
2002
            shell.usageScenario = data.tag;
 
2003
            waitForRendering(shell);
 
2004
            swipeAwayGreeter();
 
2005
 
 
2006
            // Let's open a fullscreen app
 
2007
            var app = ApplicationManager.startApplication("camera-app");
 
2008
            waitUntilAppWindowIsFullyLoaded(app);
 
2009
 
 
2010
            var appRepeater = findChild(shell, data.repeaterName);
 
2011
            var topmostAppDelegate = appRepeater.itemAt(0);
 
2012
            verify(topmostAppDelegate);
 
2013
 
 
2014
            var topmostSurfaceItem = findChild(topmostAppDelegate, "surfaceItem");
 
2015
            verify(topmostSurfaceItem);
 
2016
 
 
2017
            mouseClick(shell, 1, shell.height / 2);
 
2018
            compare(topmostSurfaceItem.mousePressCount, 1);
 
2019
            compare(topmostSurfaceItem.mouseReleaseCount, 1);
 
2020
 
 
2021
            mouseClick(shell, shell.width - 1, shell.height / 2);
 
2022
            compare(topmostSurfaceItem.mousePressCount, 2);
 
2023
            compare(topmostSurfaceItem.mouseReleaseCount, 2);
 
2024
 
 
2025
            tap(shell, 1, shell.height / 2);
 
2026
            compare(topmostSurfaceItem.touchPressCount, 1);
 
2027
            compare(topmostSurfaceItem.touchReleaseCount, 1);
 
2028
 
 
2029
            tap(shell, shell.width - 1, shell.height / 2);
 
2030
            compare(topmostSurfaceItem.touchPressCount, 2);
 
2031
            compare(topmostSurfaceItem.touchReleaseCount, 2);
 
2032
        }
1980
2033
    }
1981
2034
}