| Index: LayoutTests/fast/dynamic/position-change-to-absolute-with-positioned-child-crash.html
|
| diff --git a/LayoutTests/fast/dynamic/position-change-to-absolute-with-positioned-child-crash.html b/LayoutTests/fast/dynamic/position-change-to-absolute-with-positioned-child-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1fa62cb759b64e28845d947d47421e3a5cb118d5
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dynamic/position-change-to-absolute-with-positioned-child-crash.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE HTML>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<div id="log"></div>
|
| +<div id="container">
|
| +<p id="description">
|
| + This tests that changing the container's position from fixed or relative to absolute is safe,<br>
|
| + when child container with fixed position is present.<br>
|
| + PASS, if no crash or assert in debug.
|
| +</p>
|
| +</div>
|
| +<script>
|
| +var valueList = ["static", "relative", "absolute", "fixed"]
|
| +for (var outerBeforeValue of valueList) {
|
| + for (var innerValue of valueList) {
|
| + for (var outerAfterValue of valueList) {
|
| + if (outerBeforeValue === outerAfterValue)
|
| + continue;
|
| + var outerElement = document.createElement("div");
|
| + var innerElement = document.createElement("div");
|
| + outerElement.style.position = outerBeforeValue;
|
| + innerElement.style.position = innerValue;
|
| + outerElement.appendChild(innerElement);
|
| + container.appendChild(outerElement);
|
| + test(function () {
|
| + document.body.offsetHeight;
|
| + outerElement.style.position = outerAfterValue;
|
| + // No assert() are needed, we just check layout hits no ASSERT nor crash.
|
| + document.body.offsetHeight;
|
| + }, "position:" + outerBeforeValue + " with a " + innerValue + " child to " + outerAfterValue);
|
| + }
|
| + }
|
| +}
|
| +</script>
|
|
|