Bug 964646 part 17 - Add RunningOn.TodoMainThread for marking animations that are known to run on the compositor when they should not; r=dbaron

This patch also ensures that when we have an animation running on the compositor
when it should not that we still compare the values produced on the compositor
and on the main thread so that the visual result is correct even if the
performance characteristics are not.
This commit is contained in:
Brian Birtles 2014-05-19 14:42:49 +09:00
parent 7f3d73ea15
commit c4033d836e

View File

@ -1535,7 +1535,7 @@ addAsyncTest(function *() {
// Bug 847287 - off main thread animations don't cascade correctly
// (todo_is added in subsequent patch)
/*
omta_is("transform", { tx: 200 }, RunningOn.Either,
omta_is("transform", { tx: 200 }, RunningOn.TodoMainThread,
"important author rules override animations");
*/
done_div();
@ -1640,7 +1640,8 @@ function waitForPaintsFlushed() {
const RunningOn = {
MainThread: 0,
Compositor: 1,
Either: 2
Either: 2,
TodoMainThread: 3
};
function omta_is(property, expected, runningOn, desc) {
@ -1693,6 +1694,12 @@ function omta_is_approx(property, expected, runningOn, tolerance, desc) {
actualStr = compositorStr;
break;
case RunningOn.TodoMainThread:
todo(compositorStr === "",
desc + ": should NOT be animating on compositor");
actualStr = compositorStr === "" ? computedStr : compositorStr;
break;
default:
if (compositorStr !== "") {
ok(false, desc + ": should NOT be animating on compositor");
@ -1714,7 +1721,7 @@ function omta_is_approx(property, expected, runningOn, tolerance, desc) {
// For compositor animations do an additional check that they match
// the value calculated on the main thread
if (runningOn === RunningOn.Compositor) {
if (actualStr === compositorStr) {
var computedValue = normalize(computedStr);
if (computedValue === null) {
ok(false, desc + ": test framework should parse computed style" +