| <!doctype HTML> |
| <head> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| </head> |
| |
| <div style="position: fixed; width: 100px; height: 100px; background: lightgray"> |
| <div style="will-change: transform; margin: 50px; width: 50px; height: 50px; background: lightblue"></div> |
| </div> |
| |
| <div id="force_document_scroll" style="height: 5000px;"></div> |
| |
| <script> |
| test(function() { |
| assert_not_equals(window.internals, null, 'This test requires window.internals'); |
| var layers_text = internals.layerTreeAsText(document); |
| var layers = JSON.parse(layers_text); |
| assert_equals(layers['layers'].length, 5); |
| }, 'Having a composited child should be a position:fixed compositing trigger and should result in the fixed element getting a layer.'); |
| </script> |