Changeset 53097 in webkit


Ignore:
Timestamp:
Jan 11, 2010 1:54:24 PM (14 years ago)
Author:
ojan@chromium.org
Message:

2010-01-11 Ojan Vafai <ojan@chromium.org>

Reviewed by Simon Fraser.

Deflake transitions and animations tests.
https://bugs.webkit.org/show_bug.cgi?id=30029

The transition-end-event tests all had arbitrary timeouts. Give a consistent
timeout to all of them. Give a generous 1 second of buffer to avoid any possibility
of flakiness. If all the transitionEnd events fire before then, the test still
completes without waiting for the timeout.

  • animations/change-keyframes.html: Increase the wiggle room. It's infrequently flaky now, but it is still a tad bit flaky without this extra wiggle room.
  • transitions/repeated-firing-background-color.html: Remove a gratuitous setTimeout.
  • transitions/transition-end-event-all-properties.html:
  • transitions/transition-end-event-attributes.html:
  • transitions/transition-end-event-container.html:
  • transitions/transition-end-event-helpers.js: (runTransitionTest.startTest): (runTransitionTest):
  • transitions/transition-end-event-left.html:
  • transitions/transition-end-event-multiple-01.html:
  • transitions/transition-end-event-multiple-02.html:
  • transitions/transition-end-event-multiple-03.html:
  • transitions/transition-end-event-multiple-04.html:
  • transitions/transition-end-event-nested.html:
  • transitions/transition-end-event-set-none.html:
  • transitions/transition-end-event-transform.html:
  • transitions/transition-end-event-window.html:
  • transitions/zero-duration-with-non-zero-delay-end.html:
Location:
trunk/LayoutTests
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53096 r53097  
     12010-01-11  Ojan Vafai  <ojan@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Deflake transitions and animations tests.
     6        https://bugs.webkit.org/show_bug.cgi?id=30029
     7       
     8        The transition-end-event tests all had arbitrary timeouts. Give a consistent
     9        timeout to all of them. Give a generous 1 second of buffer to avoid any possibility
     10        of flakiness. If all the transitionEnd events fire before then, the test still
     11        completes without waiting for the timeout.
     12
     13        * animations/change-keyframes.html:
     14        Increase the wiggle room. It's infrequently flaky now, but it is still
     15        a tad bit flaky without this extra wiggle room.
     16        * transitions/repeated-firing-background-color.html:
     17        Remove a gratuitous setTimeout.
     18        * transitions/transition-end-event-all-properties.html:
     19        * transitions/transition-end-event-attributes.html:
     20        * transitions/transition-end-event-container.html:
     21        * transitions/transition-end-event-helpers.js:
     22        (runTransitionTest.startTest):
     23        (runTransitionTest):
     24        * transitions/transition-end-event-left.html:
     25        * transitions/transition-end-event-multiple-01.html:
     26        * transitions/transition-end-event-multiple-02.html:
     27        * transitions/transition-end-event-multiple-03.html:
     28        * transitions/transition-end-event-multiple-04.html:
     29        * transitions/transition-end-event-nested.html:
     30        * transitions/transition-end-event-set-none.html:
     31        * transitions/transition-end-event-transform.html:
     32        * transitions/transition-end-event-window.html:
     33        * transitions/zero-duration-with-non-zero-delay-end.html:
     34
    1352010-01-11  Darin Adler  <darin@apple.com>
    236
  • trunk/LayoutTests/animations/change-keyframes.html

    r52837 r53097  
    5656        keyframes.deleteRule("100%");
    5757        keyframes.insertRule("0% { top: 50px; }");
    58         keyframes.insertRule("30% { top: 100px; }");
     58        keyframes.insertRule("10% { top: 100px; }");
    5959        keyframes.insertRule("50% { top: 100px; }");
    6060        keyframes.insertRule("100% { top: 150px; }");
  • trunk/LayoutTests/transitions/repeated-firing-background-color.html

    r40102 r53097  
    2020      layoutTestController.notifyDone();
    2121    }
    22    
     22
    2323    if (window.layoutTestController) {
    2424        layoutTestController.dumpAsText();
    2525        layoutTestController.waitUntilDone();
    26         window.setTimeout(checkRunning, 300);           
    2726    }
    2827  </script>
     
    3332
    3433<script type="text/javascript" charset="utf-8">
     34
     35    document.getElementById('foo').addEventListener('webkitTransitionEnd', function() {
     36        checkRunning()
     37    });
     38
    3539    document.getElementById("foo").className="trans";
    3640</script>
  • trunk/LayoutTests/transitions/transition-end-event-all-properties.html

    r39384 r53097  
    5353    }
    5454   
    55     runTransitionTest(expectedEndEvents, 1.0, setupTest);
     55    runTransitionTest(expectedEndEvents, setupTest);
    5656   
    5757  </script>
  • trunk/LayoutTests/transitions/transition-end-event-attributes.html

    r39384 r53097  
    2828    }
    2929   
    30     runTransitionTest(expectedEndEvents, 0.7, setupTest);
     30    runTransitionTest(expectedEndEvents, setupTest);
    3131   
    3232  </script>
  • trunk/LayoutTests/transitions/transition-end-event-container.html

    r39384 r53097  
    3030    }
    3131   
    32     runTransitionTest(expectedEndEvents, 0.7, setupTest);
     32    runTransitionTest(expectedEndEvents, setupTest);
    3333  </script>
    3434</head>
  • trunk/LayoutTests/transitions/transition-end-event-helpers.js

    r41837 r53097  
    3737Function parameters:
    3838    expected [required]: an array of arrays defining the expected parameter values for the recorded transition end events (see below)
    39     timeout [required]:
    4039    callback [optional]: a function to be executed just before the test starts (none by default)
    4140
     
    4746
    4847*/
    49 function runTransitionTest(expected, timeout, callback)
     48function runTransitionTest(expected, callback)
    5049{
    5150  _expectedEventCount = expected.length;
     
    136135  }
    137136
    138   function startTest(expected, timeout, callback)
     137  function startTest(expected, callback)
    139138  {
    140139    if (callback)
    141140      callback();
    142141   
     142    var maxTime = 0;
     143
    143144    for (var i=0; i < expected.length; ++i) {
    144145      if (expected[i][3]) {
     
    146147        box.addEventListener("webkitTransitionEnd", recordTransitionEndEvent, false);
    147148      }
     149
     150      var time = expected[i][2];
     151      if (time > maxTime)
     152          maxTime = time;
    148153    }
    149154   
    150155    _endFunction = function() { processEndEvents(expected); };
    151     window.setTimeout(_endFunction, timeout * 1000);
     156    // Add one second of fudge. We don't just use the run-webkit-tests timeout
     157    // because processEndEvents gives more information on what failed.
     158    window.setTimeout(_endFunction, maxTime * 1000 + 1000);
    152159  }
    153160 
    154   window.addEventListener('load', function() { startTest(expected, timeout, callback) }, false);
     161  window.addEventListener('load', function() { startTest(expected, callback) }, false);
    155162}
  • trunk/LayoutTests/transitions/transition-end-event-left.html

    r39384 r53097  
    2828    }
    2929   
    30     runTransitionTest(expectedEndEvents, 0.7, setupTest);
    31    
     30    runTransitionTest(expectedEndEvents, setupTest);
    3231  </script>
    3332</head>
  • trunk/LayoutTests/transitions/transition-end-event-multiple-01.html

    r39384 r53097  
    3535    }
    3636   
    37     runTransitionTest(expectedEndEvents, 0.7, setupTest);
     37    runTransitionTest(expectedEndEvents, setupTest);
    3838   
    3939  </script>
  • trunk/LayoutTests/transitions/transition-end-event-multiple-02.html

    r39384 r53097  
    5555    }
    5656   
    57     runTransitionTest(expectedEndEvents, 1.0, setupTest);
     57    runTransitionTest(expectedEndEvents, setupTest);
    5858   
    5959  </script>
  • trunk/LayoutTests/transitions/transition-end-event-multiple-03.html

    r40874 r53097  
    7878    }
    7979   
    80     runTransitionTest(expectedEndEvents, 2.0, setupTest);
     80    runTransitionTest(expectedEndEvents, setupTest);
    8181   
    8282  </script>
  • trunk/LayoutTests/transitions/transition-end-event-multiple-04.html

    r39384 r53097  
    6969    }
    7070   
    71     runTransitionTest(expectedEndEvents, 1.0, setupTest);
     71    runTransitionTest(expectedEndEvents, setupTest);
    7272   
    7373  </script>
  • trunk/LayoutTests/transitions/transition-end-event-nested.html

    r40480 r53097  
    7878    }
    7979   
    80     runTransitionTest(expectedEndEvents, 2.0, setupTest);
     80    runTransitionTest(expectedEndEvents, setupTest);
    8181   
    8282  </script>
  • trunk/LayoutTests/transitions/transition-end-event-set-none.html

    r39384 r53097  
    5252    }
    5353   
    54     runTransitionTest(expectedEndEvents, 0.5, setupTest);
     54    runTransitionTest(expectedEndEvents, setupTest);
    5555   
    5656  </script>
  • trunk/LayoutTests/transitions/transition-end-event-transform.html

    r39384 r53097  
    2929    }
    3030   
    31     runTransitionTest(expectedEndEvents, 0.7, setupTest);
     31    runTransitionTest(expectedEndEvents, setupTest);
    3232   
    3333  </script>
  • trunk/LayoutTests/transitions/transition-end-event-window.html

    r39384 r53097  
    3030    }
    3131   
    32     runTransitionTest(expectedEndEvents, 0.7, setupTest);
     32    runTransitionTest(expectedEndEvents, setupTest);
    3333   
    3434  </script>
  • trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-end.html

    r51150 r53097  
    6060        var target = document.getElementById('target');
    6161        target.style.left = '200px';
    62        
    63         window.setTimeout(runTest, 0);
     62        runTest();
    6463      }
    6564    }
Note: See TracChangeset for help on using the changeset viewer.