Bug 1340005 - Part 8: Remove tolerance for omta tests.
Just notice these precision errors are fixed by our other patches (i.e.
not by this patch series). Anyway, it's time to remove the tolerance.
MozReview-Commit-ID: 2ZDoRhuVOL8
--- a/layout/style/test/animation_utils.js
+++ b/layout/style/test/animation_utils.js
@@ -401,25 +401,16 @@ const RunningOn = {
TodoMainThread: 3
};
const ExpectComparisonTo = {
Pass: 1,
Fail: 2
};
-// FIXME: Bug 1340005: We use |RawServoAnimationValue| on the main thread if
-// enabling Servo style backend, and still use |StyleAnimationValue| on the
-// compositor thread. |RawServoAnimationValue| rounds the interpolated results
-// to a nearest |app_units::Au| (i.e. i32), so we might have a tiny difference
-// between the results from getOMTAStyle() and getComputedStyle().
-// Note: 1 AU ~= 60 CSS pixel unit.
-const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
-const toleranceForServoBackend = isStylo ? 0.5 / 60.0 : 0.0;
-
(function() {
window.omta_todo_is = function(elem, property, expected, runningOn, desc,
pseudo) {
return omta_is_approx(elem, property, expected, 0, runningOn, desc,
ExpectComparisonTo.Fail, pseudo);
};
window.omta_is = function(elem, property, expected, runningOn, desc,
@@ -512,17 +503,17 @@ const toleranceForServoBackend = isStylo
// the value calculated on the main thread
if (actualStr === compositorStr) {
var computedValue = normalize(computedStr);
if (computedValue === null) {
ok(false, desc + ": test framework should parse computed style" +
" - got " + computedStr);
return;
}
- okOrTodo(compare(computedValue, actualValue, toleranceForServoBackend),
+ okOrTodo(compare(computedValue, actualValue, 0.0),
desc + ": OMTA style and computed style should be equal" +
" - OMTA " + actualStr + ", computed " + computedStr);
}
};
window.matricesRoughlyEqual = function(a, b, tolerance) {
tolerance = tolerance || 0.00011;
for (var i = 0; i < 4; i++) {