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

Side by Side Diff: LayoutTests/fast/regions/script-tests/region-element-display-restriction.js

Issue 159933010: Remove everything region-specific from LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 description("Test that only non-replaced block elements can be transformed into regions.");
2
3 function createRegionElement(elementType, displayType)
4 {
5 var element = document.createElement(elementType);
6 var textElement = document.createTextNode("inside element");
7 element.appendChild(textElement);
8 element.style.setProperty("display", displayType);
9 document.body.appendChild(element);
10
11 // Transform the element into a region.
12 element.style.setProperty("-webkit-flow-from", "no-flow");
13
14 // The region element was created if the length of inner text is 0.
15 var regionCreated = element.innerText.length == 0;
16
17 document.body.removeChild(element);
18
19 return regionCreated;
20 }
21
22 shouldBeFalse('createRegionElement("div", "none")');
23 shouldBeTrue('createRegionElement("div", "block")');
24 shouldBeTrue('createRegionElement("div", "inline-block")');
25 shouldBeFalse('createRegionElement("div", "inline")');
26 shouldBeFalse('createRegionElement("div", "table")');
27 shouldBeFalse('createRegionElement("div", "inline-table")');
28 shouldBeTrue('createRegionElement("div", "table-cell")');
29 shouldBeTrue('createRegionElement("div", "table-caption")');
30 shouldBeTrue('createRegionElement("div", "list-item")');
31 shouldBeFalse('createRegionElement("div", "-webkit-box")');
32 shouldBeFalse('createRegionElement("div", "-webkit-inline-box")');
33 shouldBeFalse('createRegionElement("div", "-webkit-flex")');
34 shouldBeFalse('createRegionElement("div", "-webkit-inline-flex")');
35 // FIXME: Also add grid and inline grid when it is enabled by default
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698