| 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..0e2bf0bd0543133b5284c8e702742922518c8294
|
| --- /dev/null
|
| +++ b/LayoutTests/virtual/threaded/animations/compositor-transform-with-scale.html
|
| @@ -0,0 +1,68 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<style>
|
| +.box {
|
| + height: 100px;
|
| + width: 100px;
|
| +}
|
| +
|
| +#transformOnly {
|
| + background-color: blue;
|
| +}
|
| +
|
| +#scaleOnly {
|
| + background-color: red;
|
| +}
|
| +
|
| +#mixed {
|
| + background-color: purple;
|
| +}
|
| +</style>
|
| +<div id="human">
|
| + <p>Tests that composited animation happens when only transform or only scale is present.</p>
|
| +</div>
|
| +<div id="transformOnly" class="box">Transform Only</div>
|
| +<div id="scaleOnly" class="box">Scale Only</div>
|
| +<div id="mixed" class="box">Transform + Scale</div>
|
| +<script>
|
| +var transformOnlyAnimation = transformOnly.animate([
|
| + {transform: 'scale(1, 1)'},
|
| + {transform: 'scale(4, 4)'}
|
| +], {
|
| + duration: 4000,
|
| + iterations: Infinity
|
| +});
|
| +
|
| +var scaleOnlyAnimation = scaleOnly.animate([
|
| + {scale: '1 1'},
|
| + {scale: '4 4'}
|
| +], {
|
| + duration: 4000,
|
| + iterations: Infinity
|
| +});
|
| +
|
| +var mixedAnimation = mixed.animate([
|
| + {transform: 'scale(1, 1)', scale: '1 1'},
|
| + {transform: 'scale(2, 2)', scale: '2 2'}
|
| +], {
|
| + duration: 4000,
|
| + iterations: Infinity
|
| +});
|
| +
|
| +if (window.testRunner) {
|
| + [].forEach.call(document.querySelectorAll('#human,.box'), function(element) {
|
| + element.textContent = '';
|
| + })
|
| +}
|
| +
|
| +var asyncHandle = async_test("Compositor Test with Scale");
|
| +requestAnimationFrame(function() {
|
| + requestAnimationFrame(function() {
|
| + assert_true(internals.isCompositedAnimation(transformOnlyAnimation), 'Only Transform should be composited');
|
| + assert_true(internals.isCompositedAnimation(scaleOnlyAnimation), 'Only Scale should be composited');
|
| + assert_false(internals.isCompositedAnimation(mixedAnimation), 'Mixed should not be composited');
|
| + asyncHandle.done();
|
| + });
|
| +});
|
| +</script>
|
|
|