Bug 1547922 part 1 - Fix broken flex layout tests. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Tue, 30 Apr 2019 10:03:29 +0200
changeset 530908 3de2f935e2d2658dda91deba799149ee29ce3837
parent 530907 0f8f181540096810ec288bcb0954a798c05491ee
child 530909 a5c14dc63aa6449d97c1a73918b7b6fbf33735c0
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1547922
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547922 part 1 - Fix broken flex layout tests. r=dholbert The flex item tests in this file are completely broken... First, there's a typo in the flex container style when concatenating: "... teal" + containerSizeDecl since you end up with "... tealinline-size:..." etc. Second, none of the tests actaully test anything at all, which you can see by removing the "+ subtest.candStyle" part on the reflow root candidate -- the test still pass! The reason for that is that its child (inner) has a solid purple border so when changing its size it will render differently and make the test pass regardless of any change that we intended to test. After fixing those two bugs it turns out that two of the subtests don't produce a rendering change at all, so those tests are bogus and needs to be rewritten. (I'm commenting them out for now.) Differential Revision: https://phabricator.services.mozilla.com/D29324
layout/generic/test/test_dynamic_reflow_root_disallowal.html
--- a/layout/generic/test/test_dynamic_reflow_root_disallowal.html
+++ b/layout/generic/test/test_dynamic_reflow_root_disallowal.html
@@ -223,28 +223,29 @@ https://bugzilla.mozilla.org/show_bug.cg
     },
     { desc: "flex-basis-auto-width-auto",
       candStyle: "flex-basis:auto;width:auto;",
     },
     // For percent flex-basis, we're concerned with cases where the percent
     // triggers content-based sizing during the flex container's intrinsic
     // sizing step.  So we need to get the container to be intrinsically sized;
     // hence the use of the (optional) "isContainerIntrinsicallySized" flag.
-    { desc: "flex-basis-pct",
-      candStyle: "flex-basis:80%;",
-      isContainerIntrinsicallySized: true,
-    },
+// FIXME(bug 1548078): the following two tests fail to produce a rendering difference:
+//    { desc: "flex-basis-pct",
+//      candStyle: "flex-basis:80%;",
+//      isContainerIntrinsicallySized: true,
+//    },
+//    { desc: "flex-basis-calc-pct",
+//      candStyle: "flex-basis:calc(10px + 80%);",
+//      isContainerIntrinsicallySized: true,
+//    },
     { desc: "flex-basis-from-pct-isize",
       candStyle: "inline-size:80%",
       isContainerIntrinsicallySized: true,
     },
-    { desc: "flex-basis-calc-pct",
-      candStyle: "flex-basis:calc(10px + 80%);",
-      isContainerIntrinsicallySized: true,
-    },
     { desc: "flex-basis-from-calc-pct-isize",
       candStyle: "inline-size:calc(10px + 80%);",
       isContainerIntrinsicallySized: true,
     },
     // Testing the magic "min-main-size:auto" keyword
     // and other intrinsic min/max sizes
     { desc: "flex-min-inline-size-auto",
       candStyle: "flex:0 5px;min-inline-size:auto",
@@ -272,35 +273,34 @@ https://bugzilla.mozilla.org/show_bug.cg
       "max-content" : "100px";
     let containerSizeDecl =
       "inline-size: " + containerSizeVal + "; " +
       "block-size: " + containerSizeVal + ";";
     let containerFlexDirectionDecl = "flex-direction: " +
       (subtest.isContainerColumnOriented ? "column" : "row") + ";"
 
     let flexContainer = createStyledDiv("display: flex; \
-                                         border: 2px solid teal" +
+                                         border: 2px solid teal; " +
                                          containerSizeDecl +
                                          containerFlexDirectionDecl);
 
     let simpleItem = createStyledDiv("border: 1px solid gray; \
                                       background: yellow; \
                                       min-inline-size: 10px; \
                                       flex: 1");
 
     // The reflow root candidate
     // (Note that we use min-width:0/min-height:0 by default, but subtests
     // might override that with other values in 'candStyle'.)
     let cand = createStyledDiv(gReflowRootCandidateStyles +
                                " min-width: 0; min-height: 0; " +
                                subtest.candStyle);
 
     // Something whose size we can adjust, inside the reflow root candidate:
-    let inner = createStyledDiv("height:20px; width:20px; \
-                                 border: 1px solid purple");
+    let inner = createStyledDiv("height:20px; width:20px");
 
     cand.appendChild(inner);
     flexContainer.appendChild(simpleItem);
     flexContainer.appendChild(cand);
     gFBody.appendChild(flexContainer);
 
     let tweakFunc = function() {
       inner.style.width = inner.style.height = "40px";