| Index: third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html
|
| diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html b/third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..faa4c0ae7ef498ba92b85cd958fc7609b0ea25b5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html
|
| @@ -0,0 +1,54 @@
|
| +<!doctype HTML>
|
| +<style>
|
| +#child {
|
| + position: relative;
|
| +}
|
| +</style>
|
| +<div style="backface-visibility: hidden;">
|
| + <div id="target">
|
| + <div id="child"></div>
|
| + <div style="position: relative;">
|
| + <span id="myspan">gone!</span>
|
| + </div>
|
| + </div>
|
| +</div>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script>
|
| +
|
| +function runTest() {
|
| + var content = document.createElement("span");
|
| + var div = document.createElement("div");
|
| + div.appendChild(content);
|
| + div.id = "child";
|
| + target.replaceChild(div, child);
|
| + requestAnimationFrame(checkResult);
|
| +}
|
| +
|
| +function checkResult() {
|
| + if (window.internals) {
|
| + var clientRect = window.internals.visualRect(myspan.firstChild);
|
| + test(function() {
|
| + // Check that the visual rect for the child has been initialized
|
| + // to a non-zero (and hence presumably correct) size.
|
| + assert_true(clientRect.width > 0);
|
| + assert_true(clientRect.height > 0);
|
| + });
|
| + }
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| +}
|
| +
|
| +if (window.testRunner) {
|
| + window.testRunner.waitUntilDone();
|
| + window.testRunner.dumpAsText();
|
| +}
|
| +
|
| +onload = function() {
|
| + requestAnimationFrame(function() {
|
| + requestAnimationFrame(function() {
|
| + runTest();
|
| + });
|
| + });
|
| +}
|
| +</script>
|
|
|