Bug 964646 part 16 - Add OMTA tests for !important rules and animations; r=dbaron

This patch adds tests for the handling of author !important rules and animations
based on similar tests in test_animations.html but for animations that run on
the compositor thread.

Due to bug 847287, these tests don't pass and are partly disabled. Subsequent
patches add todo_is tests for this.
This commit is contained in:
Brian Birtles 2014-05-19 14:42:49 +09:00
parent cfec9f5bd6
commit 7469c3bbeb

View File

@ -82,6 +82,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=964646
100% { transform: translate(20px); animation-timing-function: ease-out }
}
@keyframes always_fifty {
from, to { transform: translate(50px) }
}
@keyframes multiprop {
0% {
transform: translate(10px); opacity: 0.3;
@ -1510,6 +1514,33 @@ addAsyncTest(function *() {
done_div();
});
// test_animations.html includes a test that UA !important rules override
// animations. Unfortunately, there do not appear to be any UA !important rules
// for opacity or transform except for one targetting a pseudo-element and
// pseudo elements are not animated on the compositor. As a result we cannot
// currently test this behavior.
// Test that author !important rules override animations, but
// that animations override regular author rules.
addAsyncTest(function *() {
new_div("animation: always_fifty 1s linear infinite; " +
"transform: translate(200px)");
yield waitForPaints();
omta_is("transform", { tx: 50 }, RunningOn.Compositor,
"animations override regular author rules");
done_div();
new_div("animation: always_fifty 1s linear infinite; " +
"transform: translate(200px) ! important;");
yield waitForPaints();
// Bug 847287 - off main thread animations don't cascade correctly
// (todo_is added in subsequent patch)
/*
omta_is("transform", { tx: 200 }, RunningOn.Either,
"important author rules override animations");
*/
done_div();
});
//----------------------------------------------------------------------
//
// Helper functions from test_animations.html