Changeset 109595 in webkit
- Timestamp:
- Mar 2, 2012 12:01:10 PM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109594 r109595 1 2012-03-02 Julien Chaffraix <jchaffraix@webkit.org> 2 3 [chromium] Layout test fast/events/overflow-events.html is flaky 4 https://bugs.webkit.org/show_bug.cgi?id=52064 5 6 Reviewed by Simon Fraser. 7 8 Try to make the test less flaky. 9 10 * fast/events/overflow-events.html: 11 Ensure that the 'overflow' events arrive one at a time in order (there is no guarantee that they *do* dispatch 12 though). Also added a clearer message if we fail the test. That should help us if the test is still flaky. 13 1 14 2012-03-02 Maciej Stachowiak <mjs@apple.com> 2 15 -
trunk/LayoutTests/fast/events/overflow-events.html
r65226 r109595 2 2 <head> 3 3 <script> 4 function setupTest() { 5 var horizontalOverflow = testResults[currentTest][1]; 6 if (horizontalOverflow) { 7 document.getElementById('child').style.width = '200px'; 8 } else { 9 document.getElementById('child').style.width = '50px'; 10 } 11 12 var verticalOverflow = testResults[currentTest][2]; 13 if (verticalOverflow) { 14 document.getElementById('child').style.height = '200px'; 15 } else { 16 document.getElementById('child').style.height = '50px'; 17 } 18 } 19 20 function finished(result) 21 { 22 document.getElementById('result').innerHTML = result; 23 24 if (window.layoutTestController) 25 layoutTestController.notifyDone(); 26 } 27 28 function nextTest() { 29 if (currentTest == testResults.length) { 30 finished("SUCCESS"); 31 return; 32 } 33 34 forceLayout(); 35 setupTest(); 36 forceLayout(); 37 } 38 4 39 function overflowChanged(event) { 5 40 var result = [event.orient, event.horizontalOverflow, event.verticalOverflow]; 6 41 7 if ('' + result == testResults[currentTest++]) 8 numSuccessful ++; 9 if (testResults.length == numSuccessful) 10 document.getElementById('result').innerHTML = "SUCCESS"; 42 if ('' + result == testResults[currentTest]) { 43 currentTest++; 44 nextTest(); 45 } else 46 finished("FAILURE: expected " + testResults[currentTest] + " got " + result); 11 47 } 12 48 … … 16 52 17 53 function runTest() { 18 if (window.layoutTestController) 54 if (window.layoutTestController) { 19 55 layoutTestController.dumpAsText(); 56 layoutTestController.waitUntilDone(); 57 } 20 58 21 59 testResults = [[OverflowEvent.HORIZONTAL, true, false], … … 30 68 31 69 currentTest = 0; 32 numSuccessful = 0;33 70 34 71 var c = document.getElementById('container'); 35 72 c.addEventListener('overflowchanged', overflowChanged, false); 36 37 forceLayout(); 38 document.getElementById('child').style.width='200px'; 39 40 forceLayout(); 41 document.getElementById('child').style.width='50px'; 42 forceLayout(); 43 44 document.getElementById('child').style.height='200px'; 45 forceLayout(); 46 document.getElementById('child').style.height='50px'; 47 forceLayout(); 48 49 forceLayout(); 50 document.getElementById('child').style.width='200px'; 51 document.getElementById('child').style.height='200px'; 52 forceLayout(); 53 54 document.getElementById('child').style.width='50px'; 55 document.getElementById('child').style.height='50px'; 56 forceLayout(); 57 58 document.getElementById('child').style.height='200px'; 59 forceLayout(); 60 61 document.getElementById('child').style.width='200px'; 62 document.getElementById('child').style.height='50px'; 63 forceLayout(); 64 65 document.getElementById('child').style.width='50px'; 66 document.getElementById('child').style.height='200px'; 67 forceLayout(); 68 73 nextTest(); 69 74 } 70 75 </script>
Note: See TracChangeset
for help on using the changeset viewer.