| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 |
| 5 <div id="container" style="transform: rotate(360deg)"></div> |
| 6 |
| 7 <script> |
| 8 function generatesContainingBlock(property, value) { |
| 9 var outer = document.createElement('div'); |
| 10 outer.style[property] = value; |
| 11 container.appendChild(outer); |
| 12 |
| 13 var inner = document.createElement('div'); |
| 14 outer.appendChild(inner); |
| 15 return inner.offsetParent == outer; |
| 16 } |
| 17 |
| 18 test(function() { |
| 19 assert_true(generatesContainingBlock('transform', 'translate(1px) scale(2) r
otate(3deg)')); |
| 20 }, "transform establishes containing block"); |
| 21 test(function() { |
| 22 assert_true(generatesContainingBlock('will-change', 'transform')); |
| 23 }, "will-change: transform establishes containing block"); |
| 24 |
| 25 test(function() { |
| 26 assert_true(generatesContainingBlock('perspective', '4px')); |
| 27 }, "perspective establishes containing block"); |
| 28 test(function() { |
| 29 assert_true(generatesContainingBlock('will-change', 'perspective')); |
| 30 }, "will-change: perspective establishes containing block"); |
| 31 |
| 32 test(function() { |
| 33 assert_true(generatesContainingBlock('translate', '1px')); |
| 34 }, "translate establishes containing block"); |
| 35 test(function() { |
| 36 assert_true(generatesContainingBlock('will-change', 'translate')); |
| 37 }, "will-change: translate establishes containing block"); |
| 38 |
| 39 test(function() { |
| 40 assert_true(generatesContainingBlock('scale', '2')); |
| 41 }, "scale establishes containing block"); |
| 42 test(function() { |
| 43 assert_true(generatesContainingBlock('will-change', 'scale')); |
| 44 }, "will-change: scale establishes containing block"); |
| 45 |
| 46 test(function() { |
| 47 assert_true(generatesContainingBlock('rotate', '3deg')); |
| 48 }, "rotate establishes containing block"); |
| 49 test(function() { |
| 50 assert_true(generatesContainingBlock('will-change', 'rotate')); |
| 51 }, "will-change: rotate establishes containing block"); |
| 52 </script> |
| OLD | NEW |