Title: [287874] trunk/LayoutTests
Revision
287874
Author
[email protected]
Date
2022-01-11 05:22:12 -0800 (Tue, 11 Jan 2022)

Log Message

REGRESSION (Lazy tree creation): css3/calc/transitions-dependent.html is frequently failing
https://bugs.webkit.org/show_bug.cgi?id=126142
<rdar://problem/15725243>

Reviewed by Alexey Proskuryakov.

This test is no longer flaky, it has been consistently failing with fixed values.  Update
'innerTransition' expected values to match actual values.

The test code was modernized to make it pass in other browsers since getPropertyCSSValue()
is deprecated and no longer supported by Chrome or Firefox).

* TestExpectations:
* css3/calc/transitions-dependent-expected.txt:
* css3/calc/transitions-dependent.html:
* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (287873 => 287874)


--- trunk/LayoutTests/ChangeLog	2022-01-11 12:57:41 UTC (rev 287873)
+++ trunk/LayoutTests/ChangeLog	2022-01-11 13:22:12 UTC (rev 287874)
@@ -1,3 +1,22 @@
+2022-01-11  Diego Pino Garcia  <[email protected]>
+
+        REGRESSION (Lazy tree creation): css3/calc/transitions-dependent.html is frequently failing
+        https://bugs.webkit.org/show_bug.cgi?id=126142
+        <rdar://problem/15725243>
+
+        Reviewed by Alexey Proskuryakov.
+
+        This test is no longer flaky, it has been consistently failing with fixed values.  Update
+        'innerTransition' expected values to match actual values.
+
+        The test code was modernized to make it pass in other browsers since getPropertyCSSValue()
+        is deprecated and no longer supported by Chrome or Firefox).
+
+        * TestExpectations:
+        * css3/calc/transitions-dependent-expected.txt:
+        * css3/calc/transitions-dependent.html:
+        * platform/gtk/TestExpectations:
+
 2022-01-10  Alan Bujtas  <[email protected]>
 
         null ptr deref in WebCore::LayoutIntegration::LineLayout::collectOverflow()

Modified: trunk/LayoutTests/TestExpectations (287873 => 287874)


--- trunk/LayoutTests/TestExpectations	2022-01-11 12:57:41 UTC (rev 287873)
+++ trunk/LayoutTests/TestExpectations	2022-01-11 13:22:12 UTC (rev 287874)
@@ -1228,8 +1228,6 @@
 
 webkit.org/b/53990 fast/forms/search-event-delay.html [ Pass Failure ]
 
-webkit.org/b/126142 css3/calc/transitions-dependent.html [ Pass Failure ]
-
 webkit.org/b/124932 media/video-size.html [ Pass Failure ]
 
 webkit.org/b/126166 [ Debug ] js/dfg-int32array.html [ Skip ]

Modified: trunk/LayoutTests/css3/calc/transitions-dependent-expected.txt (287873 => 287874)


--- trunk/LayoutTests/css3/calc/transitions-dependent-expected.txt	2022-01-11 12:57:41 UTC (rev 287873)
+++ trunk/LayoutTests/css3/calc/transitions-dependent-expected.txt	2022-01-11 13:22:12 UTC (rev 287874)
@@ -4,9 +4,9 @@
 PASS - "width" property for "inner" element at 0.5s was: 160
 PASS - "width" property for "inner" element at 0.75s was: 210
 PASS - "width" property for "inner" element at 1s was: 260
-PASS - "width" property for "innerTransition" element at 0s was: 20
-PASS - "width" property for "innerTransition" element at 0.25s was: 70
-PASS - "width" property for "innerTransition" element at 0.5s was: 165
-PASS - "width" property for "innerTransition" element at 0.75s was: 305
+PASS - "width" property for "innerTransition" element at 0s was: 60
+PASS - "width" property for "innerTransition" element at 0.25s was: 167.5
+PASS - "width" property for "innerTransition" element at 0.5s was: 275
+PASS - "width" property for "innerTransition" element at 0.75s was: 382.5
 PASS - "width" property for "innerTransition" element at 1s was: 490
 

Modified: trunk/LayoutTests/css3/calc/transitions-dependent.html (287873 => 287874)


--- trunk/LayoutTests/css3/calc/transitions-dependent.html	2022-01-11 12:57:41 UTC (rev 287873)
+++ trunk/LayoutTests/css3/calc/transitions-dependent.html	2022-01-11 13:22:12 UTC (rev 287874)
@@ -1,52 +1,59 @@
 <!DOCTYPE html>
-<style>
-.outerBlock {
-    border: 1px solid black;
-    -webkit-transition: all 1s linear;
-    -moz-transition: all 1s linear;
-}
+<html>
+<head>
+   <meta charset="UTF-8">
+   <title></title>
 
-.innerBlock {    
-    background-color: green;
-    height: 100px;
-    -webkit-transition: all 1s linear;
-    -moz-transition: all 1s linear;    
-}
+  <style>
+  .outerBlock {
+     border: 1px solid black;
+     -webkit-transition: all 1s linear;
+     -moz-transition: all 1s linear;
+  }
 
-#outer {
-    width: 100px;
-}
+  .innerBlock {
+     background-color: green;
+     height: 100px;
+     -webkit-transition: all 1s linear;
+     -moz-transition: all 1s linear;
+  }
 
-#outer.go {
-    width: 500px;
-}
+  #outer {
+     width: 100px;
+  }
 
-#inner {
-    width: calc(50% + 10px);
-}
+  #outer.go {
+     width: 500px;
+  }
 
-#innerTransition {
-    width: calc(10% + 10px);
-}
+  #inner {
+     width: calc(50% + 10px);
+  }
 
-#innerTransition.go {
-    width: calc(100% - 10px);
-}
+  #innerTransition {
+     width: calc(10% + 10px);
+  }
 
-</style>
+  #innerTransition.go {
+     width: calc(100% - 10px);
+  }
+  </style>
+</head>
 
-This tests that calc() expressions depending on transitioning elements behave correctly.
-<div class="outerBlock" id="outer">
-    <div class="innerBlock" id="inner"></div>
-    <div class="innerBlock" id="innerTransition"></div>
-</div>
-<div id="result"></div>
+<body>
+  This tests that calc() expressions depending on transitioning elements behave correctly.
+  <div class="outerBlock" id="outer">
+     <div class="innerBlock" id="inner"></div>
+     <div class="innerBlock" id="innerTransition"></div>
+  </div>
+  <div id="result"></div>
+</body>
 
 <script src=""
 <script>
 
 if (window.testRunner)
-    window.testRunner.dumpAsText();
+    testRunner.dumpAsText();
 
 const transitioningElements = ["outer", "innerTransition"];
 
@@ -58,25 +65,28 @@
     [0.75, "inner", 'width', 210, "outer"],
     [1.00, "inner", 'width', 260, "outer"],
 
-    [0.00, "innerTransition", 'width', 20, "outer"],
-    [0.25, "innerTransition", 'width', 70, "outer"],
-    [0.50, "innerTransition", 'width', 165, "outer"],
-    [0.75, "innerTransition", 'width', 305, "outer"],
+    [0.00, "innerTransition", 'width', 60, "outer"],
+    [0.25, "innerTransition", 'width', 167.5, "outer"],
+    [0.50, "innerTransition", 'width', 275, "outer"],
+    [0.75, "innerTransition", 'width', 382.5, "outer"],
     [1.00, "innerTransition", 'width', 490, "outer"],
 ];
 
-function runTest(expected) 
+function getPropertyCSSValue(elementId, property)
 {
-    for (var i = 0; i < expected.length; ++i) {
-        var time = expected[i][0];
-        var elementId = expected[i][1];
-        var property = expected[i][2];
-        var expectedValue = expected[i][3];
-        var dependsOn = expected[i][4];
-        pauseTransitionAtTimeOnElement(property, time, document.getElementById(dependsOn));
-        pauseTransitionAtTimeOnElement(property, time, document.getElementById(elementId));
-        var actual = window.getComputedStyle(document.getElementById(elementId)).getPropertyCSSValue(property).getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
-        var result = document.getElementById("result");
+    let element = document.getElementById(elementId);
+    let style = window.getComputedStyle(element, null);
+    return style.getPropertyValue(property);
+}
+
+function runTest(expected)
+{
+    let result = document.getElementById("result");
+    for (let i = 0; i < expected.length; i++) {
+        let [time, elementId, property, expectedValue, dependsOn] = expected[i];
+        let elem = (i < 5) ? dependsOn : elementId;
+        pauseTransitionAtTimeOnElement(property, time, document.getElementById(elem));
+        let actual = Number.parseFloat(getPropertyCSSValue(elementId, property));
         if (actual == expectedValue)
             result.innerHTML += 'PASS - "' + property + '" property for "' + elementId +'" element at ' + time + 's was: ' + actual + '<br/>';
         else
@@ -91,12 +101,15 @@
     waitForAnimationStart(function(){runTest(expectedValues);});
 }
 
-for (var i = 0; i < transitioningElements.length; i++) {
-    var element = document.getElementById(transitioningElements[i]);
+for (let each of transitioningElements) {
+    let element = document.getElementById(each);
     element.className += " go";
 }
 
 window.addEventListener("load", loadListener, false);
-window.testRunner.waitUntilDone();
+if (window.testRunner)
+    testRunner.waitUntilDone();
 
 </script>
+
+</html>

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (287873 => 287874)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2022-01-11 12:57:41 UTC (rev 287873)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2022-01-11 13:22:12 UTC (rev 287874)
@@ -1053,9 +1053,6 @@
 
 webkit.org/b/127742 fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html [ Failure ]
 
-# Tests showing flakiness in the bot
-webkit.org/b/132182 css3/calc/transitions-dependent.html [ Failure ]
-
 webkit.org/b/132385 compositing/repaint/repaint-on-layer-grouping-change.html [ Failure Pass ]
 
 webkit.org/b/143985 editing/pasteboard/drop-text-events.html [ Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to