Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / virtual / threaded / animations / compositor-independent-transform-properties.html
blob3bd733315ec883179f7d910b326213f32c5448b2
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
5 <div id="parent"></div>
7 <script>
8 function assertComposited(properties, isComposited) {
9 var element = document.createElement('div');
10 document.getElementById('parent').appendChild(element);
12 var properties = typeof properties == "string" ? [properties] : properties;
13 var keyframe = {};
15 properties.forEach(function(property) {
16 keyframe[property] = 'initial';
17 });
19 var animation = element.animate([keyframe, keyframe], {
20 duration: 4000,
21 iterations: Infinity
22 });
24 var asyncHandle = async_test("Animation on " + properties.join(", ") + (isComposited ? " is " : " is not ") + "composited");
25 requestAnimationFrame(function() {
26 requestAnimationFrame(function() {
27 asyncHandle.step(function() {
28 assert_equals(internals.isCompositedAnimation(animation), isComposited, properties.join(", ") + (isComposited ? " should " : " should not ") + "be composited");
29 });
31 animation.cancel();
32 asyncHandle.done();
33 });
34 });
37 var assertIsComposited = function(properties) { return assertComposited(properties, true); }
38 var assertIsNotComposited = function(properties) { return assertComposited(properties, false); }
40 assertIsComposited('transform');
41 assertIsComposited('opacity');
43 assertIsComposited('translate');
44 assertIsComposited('rotate');
45 assertIsComposited('scale');
47 assertIsComposited(['transform', 'opacity']);
48 assertIsComposited(['translate', 'opacity']);
49 assertIsComposited(['rotate', 'opacity']);
50 assertIsComposited(['scale', 'opacity']);
52 assertIsNotComposited(['transform', 'translate']);
53 assertIsNotComposited(['transform', 'scale']);
54 assertIsNotComposited(['transform', 'rotate']);
56 assertIsNotComposited(['translate', 'scale']);
57 assertIsNotComposited(['translate', 'rotate']);
58 assertIsNotComposited(['rotate', 'scale']);
60 assertIsNotComposited(['translate', 'rotate', 'scale']);
61 assertIsNotComposited(['transform', 'translate', 'rotate', 'scale']);
62 </script>