Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / block / positioning / relayout-nested-positioned-elements-crash-2.html
blob3d9c2a7775e29115ad97b95edbb54212943d151a
1 <!DOCTYPE html>
2 <html>
3 <style>
4 .fixedPosition { position: fixed; }
5 .runIn:nth-last-of-type(2n+1) { display: run-in; }
6 .transformed { float: none; transform: skewX(45deg); }
7 .floatLastChild:last-child { display: inline-block; float: left;}
8 </style>
9 <script>
10 if (window.testRunner) {
11 testRunner.waitUntilDone();
12 testRunner.dumpAsText();
14 var tableElement, liElement, formElement, buttonElement, fieldsetElement, labelElement, insElement;
15 function crash() {
16 tableElement = document.createElement('table');
17 tableElement.setAttribute('class', 'runIn');
18 document.documentElement.appendChild(tableElement);
19 liElement = document.createElement('li');
20 liElement.setAttribute('class', 'transformed');
21 document.documentElement.appendChild(liElement);
22 formElement = document.createElement('form');
23 formElement.setAttribute('class', 'floatLastChild');
24 buttonElement = document.createElement('button');
25 buttonElement.setAttribute('class', 'floatLastChild');
26 tableElement.appendChild(buttonElement);
27 fieldsetElement = document.createElement('fieldset');
28 labelElement = document.createElement('label');
29 insElement = document.createElement('ins');
30 insElement.setAttribute('class', 'fixedPosition');
32 tableElement.appendChild(formElement);
33 document.documentElement.offsetTop; // force a layout
35 buttonElement.appendChild(insElement);
36 document.documentElement.offsetTop; // force a layout
38 liElement.appendChild(fieldsetElement);
39 document.documentElement.offsetTop; // force a layout
41 labelElement.appendChild(formElement);
43 function removeContent() {
44 document.body.innerHTML = "Tests that lists in the rendering tree that track positioned objects are kept properly up-to-date through re-layout. <br />\
45 PASS. WebKit didn't crash.";
46 if (window.testRunner)
47 testRunner.notifyDone()
50 window.addEventListener('load', removeContent, false);
51 document.addEventListener('DOMContentLoaded', crash, false);
52 </script>
53 <body>
54 </body>
55 </html>