OLD | NEW |
1 description("Test that RenderObject is recreated correctly after changing displa
y type."); | 1 description("Test that RenderObject is recreated correctly after changing displa
y type."); |
2 | 2 |
3 function testElement(element, displayType) | 3 function testElement(element, displayType) |
4 { | 4 { |
5 element.style.setProperty("display", displayType); | 5 element.style.setProperty("display", displayType); |
6 // The region element was created if the length of inner text is 0. | 6 // The region element was created if the length of inner text is 0. |
7 var regionCreated = element.innerText.length == 0; | 7 var regionCreated = element.innerText.length == 0; |
8 return regionCreated; | 8 return regionCreated; |
9 } | 9 } |
10 | 10 |
11 var element = document.createElement("div"); | 11 var element = document.createElement("div"); |
12 var textElement = document.createTextNode("inside element"); | 12 var textElement = document.createTextNode("inside element"); |
13 element.appendChild(textElement); | 13 element.appendChild(textElement); |
14 element.style.setProperty("-webkit-flow-from", "flow"); | 14 element.style.setProperty("-webkit-flow-from", "flow"); |
15 document.body.appendChild(element); | 15 document.body.appendChild(element); |
16 shouldBeFalse('testElement(element, "none")'); | 16 shouldBeFalse('testElement(element, "none")'); |
17 shouldBeTrue('testElement(element, "block")'); | 17 shouldBeTrue('testElement(element, "block")'); |
18 shouldBeTrue('testElement(element, "inline-block")'); | 18 shouldBeTrue('testElement(element, "inline-block")'); |
19 shouldBeFalse('testElement(element, "compact")'); | |
20 shouldBeFalse('testElement(element, "inline")'); | 19 shouldBeFalse('testElement(element, "inline")'); |
21 shouldBeFalse('testElement(element, "table")'); | 20 shouldBeFalse('testElement(element, "table")'); |
22 shouldBeFalse('testElement(element, "inline-table")'); | 21 shouldBeFalse('testElement(element, "inline-table")'); |
23 shouldBeTrue('testElement(element, "table-cell")'); | 22 shouldBeTrue('testElement(element, "table-cell")'); |
24 shouldBeTrue('testElement(element, "table-caption")'); | 23 shouldBeTrue('testElement(element, "table-caption")'); |
25 shouldBeTrue('testElement(element, "list-item")'); | 24 shouldBeTrue('testElement(element, "list-item")'); |
26 shouldBeFalse('testElement(element, "-webkit-box")'); | 25 shouldBeFalse('testElement(element, "-webkit-box")'); |
27 shouldBeFalse('testElement(element, "-webkit-inline-box")'); | 26 shouldBeFalse('testElement(element, "-webkit-inline-box")'); |
28 shouldBeFalse('testElement(element, "-webkit-flex")'); | 27 shouldBeFalse('testElement(element, "-webkit-flex")'); |
29 shouldBeFalse('testElement(element, "-webkit-inline-flex")'); | 28 shouldBeFalse('testElement(element, "-webkit-inline-flex")'); |
30 // FIXME: Also add grid and inline grid when it is enabled by default | 29 // FIXME: Also add grid and inline grid when it is enabled by default |
31 document.body.removeChild(element); | 30 document.body.removeChild(element); |
OLD | NEW |