~zsombi/ubuntu-ui-toolkit/listitemSelectModeBugs

« back to all changes in this revision

Viewing changes to tests/unit_x11/tst_components/tst_header.qml

  • Committer: Zsombor Egri
  • Date: 2015-11-16 06:35:05 UTC
  • mfrom: (1664.1.1 listitemSelectModeBugs)
  • Revision ID: zsombor.egri@canonical.com-20151116063505-cwn2qfks7qzk10g9
re-sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
    Flickable {
48
48
        id: flickable
49
 
        anchors.fill: parent
50
 
        contentHeight: height * 2
 
49
        anchors {
 
50
            top: header.flickable ? parent.top : header.bottom
 
51
            left: parent.left
 
52
            right: parent.right
 
53
            bottom: parent.bottom
 
54
        }
 
55
        contentHeight: root.height * 2
51
56
 
52
57
        Grid {
53
58
            id: switchGrid
56
61
            anchors {
57
62
                top: parent.top
58
63
                left: parent.left
59
 
                margins: units.gu(5)
 
64
                leftMargin: units.gu(5)
 
65
                topMargin: 2*root.initialHeaderHeight
60
66
            }
61
67
            Switch {
62
68
                id: lockedSwitch
151
157
        id: otherHeader
152
158
    }
153
159
 
 
160
    Header {
 
161
        id: hiddenHeader
 
162
        exposed: false
 
163
        height: root.initialHeaderHeight
 
164
    }
 
165
 
154
166
    UbuntuTestCase {
155
167
        name: "Header"
156
168
        when: windowShown
201
213
            }
202
214
        }
203
215
 
 
216
        function test_0_initially_hidden() {
 
217
            // Don't show an animation if the header is hidden initially.
 
218
            compare(hiddenHeader.y, -header.height,
 
219
                    "Hidden header has wrong initial y-value.");
 
220
        }
 
221
 
204
222
        function test_reparent_width() {
205
223
            // test initial header width:
206
224
            compare(header.parent, root);
288
306
            wait_for_exposed(true);
289
307
        }
290
308
 
291
 
        function test_scroll_updates_visible() {
 
309
        function test_scroll_updates_exposed() {
292
310
            scroll_down();
293
311
            wait_for_exposed(false, "Scrolling down does not hide header.");
294
312
            scroll_up();