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

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

Issue 52713012: Remove display:compact as per https://groups.google.com/a/chromium.org/d/topic/blink-dev/j6QErzkX4R… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: try again Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 description("Test that only non-replaced block elements can be transformed into regions."); 1 description("Test that only non-replaced block elements can be transformed into regions.");
2 2
3 function createRegionElement(elementType, displayType) 3 function createRegionElement(elementType, displayType)
4 { 4 {
5 var element = document.createElement(elementType); 5 var element = document.createElement(elementType);
6 var textElement = document.createTextNode("inside element"); 6 var textElement = document.createTextNode("inside element");
7 element.appendChild(textElement); 7 element.appendChild(textElement);
8 element.style.setProperty("display", displayType); 8 element.style.setProperty("display", displayType);
9 document.body.appendChild(element); 9 document.body.appendChild(element);
10 10
11 // Transform the element into a region. 11 // Transform the element into a region.
12 element.style.setProperty("-webkit-flow-from", "no-flow"); 12 element.style.setProperty("-webkit-flow-from", "no-flow");
13 13
14 // The region element was created if the length of inner text is 0. 14 // The region element was created if the length of inner text is 0.
15 var regionCreated = element.innerText.length == 0; 15 var regionCreated = element.innerText.length == 0;
16 16
17 document.body.removeChild(element); 17 document.body.removeChild(element);
18 18
19 return regionCreated; 19 return regionCreated;
20 } 20 }
21 21
22 shouldBeFalse('createRegionElement("div", "none")'); 22 shouldBeFalse('createRegionElement("div", "none")');
23 shouldBeTrue('createRegionElement("div", "block")'); 23 shouldBeTrue('createRegionElement("div", "block")');
24 shouldBeTrue('createRegionElement("div", "inline-block")'); 24 shouldBeTrue('createRegionElement("div", "inline-block")');
25 shouldBeFalse('createRegionElement("div", "compact")');
26 shouldBeFalse('createRegionElement("div", "inline")'); 25 shouldBeFalse('createRegionElement("div", "inline")');
27 shouldBeFalse('createRegionElement("div", "table")'); 26 shouldBeFalse('createRegionElement("div", "table")');
28 shouldBeFalse('createRegionElement("div", "inline-table")'); 27 shouldBeFalse('createRegionElement("div", "inline-table")');
29 shouldBeTrue('createRegionElement("div", "table-cell")'); 28 shouldBeTrue('createRegionElement("div", "table-cell")');
30 shouldBeTrue('createRegionElement("div", "table-caption")'); 29 shouldBeTrue('createRegionElement("div", "table-caption")');
31 shouldBeTrue('createRegionElement("div", "list-item")'); 30 shouldBeTrue('createRegionElement("div", "list-item")');
32 shouldBeFalse('createRegionElement("div", "-webkit-box")'); 31 shouldBeFalse('createRegionElement("div", "-webkit-box")');
33 shouldBeFalse('createRegionElement("div", "-webkit-inline-box")'); 32 shouldBeFalse('createRegionElement("div", "-webkit-inline-box")');
34 shouldBeFalse('createRegionElement("div", "-webkit-flex")'); 33 shouldBeFalse('createRegionElement("div", "-webkit-flex")');
35 shouldBeFalse('createRegionElement("div", "-webkit-inline-flex")'); 34 shouldBeFalse('createRegionElement("div", "-webkit-inline-flex")');
36 // FIXME: Also add grid and inline grid when it is enabled by default 35 // FIXME: Also add grid and inline grid when it is enabled by default
OLDNEW
« no previous file with comments | « LayoutTests/fast/regions/script-tests/region-element-display-change.js ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698