Bug 1367306 part 2 - Adjust some test expectation based on whether stylo is being used. r?bholley draft
authorXidorn Quan <me@upsuper.org>
Wed, 21 Jun 2017 15:25:41 +1000
changeset 597889 3143631f66a5a8e66692c18ef85e08d42bc7a4d3
parent 597888 128b864d4e43e9f57f110a780cdb015ca3598054
child 634355 1af0a73e3e7e2d3bcde9f596a1bfa3b150aaa4cc
push id65074
push userxquan@mozilla.com
push dateWed, 21 Jun 2017 05:26:15 +0000
reviewersbholley
bugs1367306
milestone56.0a1
Bug 1367306 part 2 - Adjust some test expectation based on whether stylo is being used. r?bholley MozReview-Commit-ID: BDaiAO5kgaK
dom/canvas/test/test_canvas_font_setter.html
layout/style/test/stylo-failures.md
layout/style/test/test_variables.html
--- a/dom/canvas/test/test_canvas_font_setter.html
+++ b/dom/canvas/test/test_canvas_font_setter.html
@@ -25,18 +25,19 @@ cx.font = "bold 12px serif; background: 
 is(cx.font, "italic 16px sans-serif", "invalid font should be ignored");
 
 cx.font = "bold 12px/3.0 serif";
 is(cx.font, "bold 12px serif", "line-height should be dropped");
 cx.font = "inherit";
 is(cx.font, "bold 12px serif", "inherit should be ignored");
 cx.font = "boold 18px sans-serif";
 is(cx.font, "bold 12px serif", "syntax error should be ignored");
+let systemFontCheck = SpecialPowers.DOMWindowUtils.isStyledByServo ? is : todo_is;
 cx.font = "menu";
-todo_is(cx.font, "menu", "system fonts should work");
+systemFontCheck(cx.font, "menu", "system fonts should work");
 
 function textmeas() {
   return cx.measureText("hello").width;
 }
 
 cx.font = "66px serif";
 var w_at_66 = textmeas();
 cx.font = "20px serif";
--- a/layout/style/test/stylo-failures.md
+++ b/layout/style/test/stylo-failures.md
@@ -118,17 +118,16 @@ to mochitest command.
 ## Assertions
 
 ## Need Gecko change
 
 * Servo is correct but Gecko is wrong
   * Gecko rejects calc() in -webkit-gradient bug 1363349
     * test_property_syntax_errors.html `-webkit-gradient` [20]
 * test_specified_value_serialization.html `-webkit-radial-gradient`: bug 1367299 [1]
-* test_variables.html `var(--var6)`: irrelevant test for stylo bug 1367306 [1]
 
 ## Unknown / Unsure
 
 * test_selectors_on_anonymous_content.html: xbl and :nth-child [1]
 * test_parse_rule.html `rgb(0, 128, 0)`: color properties not getting computed [5]
 
 ## Ignore
 
--- a/layout/style/test/test_variables.html
+++ b/layout/style/test/test_variables.html
@@ -86,16 +86,20 @@ var tests = [
     var cs = window.getComputedStyle(element);
 
     is(cs.item(cs.length - 1), "--SomeVariableName", "custom property name returned by item() on computed style");
     is(cs[cs.length - 1], "--SomeVariableName", "custom property name returned by indexed getter on style declaration");
   },
 
   function() {
     // https://bugzilla.mozilla.org/show_bug.cgi?id=969756
+    if (SpecialPowers.DOMWindowUtils.isStyledByServo) {
+      // This test is irrelevant when using stylo.
+      return;
+    }
     var test6 = document.getElementById("test6");
     test6.textContent = "p { font: var(--var6) hangul mongolian; font-size-adjust: none; }";
     var declaration = test6.sheet.cssRules[0].style;
     test6.style.color = "white";
     is(declaration.getPropertyValue("-x-system-font"), " var(--var6) hangul mongolian");
   },
 
   function() {