Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: LayoutTests/fast/dynamic/position-change-to-absolute-with-positioned-child-crash.html

Issue 1181983002: Ensure that positioned objects' list is always in parent first order (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More comprehensive test cases Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/layout/LayoutBlock.cpp » ('j') | Source/core/layout/LayoutBlock.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | Source/core/layout/LayoutBlock.cpp » ('j') | Source/core/layout/LayoutBlock.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698