Bug 1367306 part 2 - Adjust some test expectation based on whether stylo is being used. r?bholley
MozReview-Commit-ID: BDaiAO5kgaK
--- 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() {