| Index: LayoutTests/virtual/threaded/animations/compositor-transform-with-scale.html
|
| diff --git a/LayoutTests/virtual/threaded/animations/compositor-transform-with-scale.html b/LayoutTests/virtual/threaded/animations/compositor-transform-with-scale.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ca67821519e5046caf94f4fc872f56c58c74fcf4
|
| --- /dev/null
|
| +++ b/LayoutTests/virtual/threaded/animations/compositor-transform-with-scale.html
|
| @@ -0,0 +1,93 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<style>
|
| +div {
|
| + position: absolute;
|
| + height: 25px;
|
| + width: 25px;
|
| +}
|
| +
|
| +#human-text{
|
| + width: 100%;
|
| +}
|
| +
|
| +#divBlue {
|
| + left: 100px;
|
| + top: 200px;
|
| + background-color: blue;
|
| +}
|
| +
|
| +#divRed {
|
| + left: 200px;
|
| + top: 200px;
|
| + background-color: red;
|
| +}
|
| +
|
| +#divPurple {
|
| + left: 300px;
|
| + top: 200px;
|
| + background-color: purple;
|
| +}
|
| +</style>
|
| +<span id="human-text">
|
| + <p>Tests that composited animation happens when only transform or only scale is present.</p>
|
| + <p>Blue = Only Transform, Red = Only Scale, Purple = Transform + Scale</p>
|
| + <p id="text"></p>
|
| +</span>
|
| +<div id="divBlue"></div>
|
| +<div id="divRed"></div>
|
| +<div id="divPurple"></div>
|
| +<script>
|
| +var blue = divBlue.animate([
|
| + {transform: 'scale(1, 1)'},
|
| + {transform: 'scale(4, 4)'}
|
| +], {
|
| + duration: 4000,
|
| + iterations: Infinity
|
| +});
|
| +
|
| +var red = divRed.animate([
|
| + {scale: '1 1'},
|
| + {scale: '4 4'}
|
| +], {
|
| + duration: 4000,
|
| + iterations: Infinity
|
| +});
|
| +
|
| +var purple = divPurple.animate([
|
| + {transform: 'scale(1, 1)', scale: '1 1'},
|
| + {transform: 'scale(2, 2)', scale: '2 2'}
|
| +], {
|
| + duration: 4000,
|
| + iterations: Infinity
|
| +});
|
| +
|
| +if (window.testRunner) {
|
| + window.testRunner.waitUntilDone();
|
| + document.getElementById('human-text').style.display = 'none';
|
| +}
|
| +
|
| +test(function() {
|
| + requestAnimationFrame(function() {
|
| + requestAnimationFrame(function() {
|
| + var compositedBlue = internals.isCompositedAnimation(blue);
|
| + var compositedRed = internals.isCompositedAnimation(red);
|
| + var compositedPurple = internals.isCompositedAnimation(purple);
|
| +
|
| + text.textContent = `Blue ${compositedBlue ? 'is' : 'is not'} running on the compositor.\n`;
|
| + text.textContent += `Red ${compositedRed ? 'is' : 'is not'} running on the compositor.\n`;
|
| + text.textContent += `Purple ${compositedPurple ? 'is' : 'is not'} running on the compositor.`;
|
| +
|
| + assert_true(compositedBlue, 'Only Transform should be composited');
|
| + assert_true(compositedRed, 'Only Translate should be composited');
|
| + assert_false(compositedPurple, 'Mixed should not be composited');
|
| +
|
| + if (window.testRunner) {
|
| + window.testRunner.dumpAsText();
|
| + window.testRunner.notifyDone();
|
| + }
|
| + });
|
| + });
|
| +}, "Compositor Test with Scale");
|
| +</script>
|
|
|