~ubuntu-sdk-team/ubuntu-ui-toolkit/deprecatedThinDivider

« back to all changes in this revision

Viewing changes to tests/unit_x11/tst_components/tst_pagestack.new_header.qml

  • Committer: Tarmac
  • Author(s): Tim Peeters
  • Date: 2015-06-25 14:09:01 UTC
  • mfrom: (1527.2.6 popLoopBug)
  • Revision ID: tarmac-20150625140901-tb6ket0k6zal9w0p
Disable header animations to avoid bugs when popping a PageStack in a loop. Fixes: https://bugs.launchpad.net/bugs/1461729.

Approved by Christian Dywan, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
            waitForHeaderAnimation(mainView);
119
119
        }
120
120
 
 
121
        function test_multipop_bug1461729() {
 
122
            for (var i=0; i < 10; i++) {
 
123
                pageStack.push(pageComponent);
 
124
            }
 
125
            waitForHeaderAnimation(mainView);
 
126
            compare(pageStack.depth, 10, "couldn't push 10 new pages");
 
127
            // When updating depth after animating out the header, depth
 
128
            // is not reliable to be used to guard a loop:
 
129
            while(pageStack.depth > 1) {
 
130
                pageStack.pop();
 
131
            }
 
132
            waitForHeaderAnimation(mainView);
 
133
            compare(pageStack.depth, 1, "popping until one page is left failed. " +
 
134
                        pageStack.depth + " pages left on stack");
 
135
 
 
136
            pageStack.clear();
 
137
            waitForHeaderAnimation(mainView);
 
138
        }
 
139
 
121
140
        function test_active_bug1260116() {
122
141
            pageStack.push(page1);
123
142
            waitForHeaderAnimation(mainView);