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

Side by Side Diff: LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html

Issue 13674002: Support intrinsic values for height, min-height and max-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSS table tests Created 7 years, 8 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
1 <!doctype html> 1 <!doctype html>
2 <!-- 2 <!--
3 Tests that the height keywords are not respected by the parser yet. 3 Tests that the height keywords are not respected by the parser yet.
4 --> 4 -->
5 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../js/resources/js-test-pre.js"></script>
6 6
7 <div style="height: -webkit-min-content; min-height: -webkit-min-content; max-he ight: -webkit-min-content;"></div> 7 <div style="height: -webkit-min-content; min-height: -webkit-min-content; max-he ight: -webkit-min-content;" expected-data="min-content"></div>
8 <div style="height: -webkit-max-content; min-height: -webkit-max-content; max-he ight: -webkit-max-content;"></div> 8 <div style="height: -webkit-max-content; min-height: -webkit-max-content; max-he ight: -webkit-max-content;" expected-data="max-content"></div>
9 <div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;"></div> 9 <div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;" expected-data="fill-available"></div>
10 <div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-he ight: -webkit-fit-content;"></div> 10 <div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-he ight: -webkit-fit-content;" expected-data="fit-content"></div>
11 11
12 <script> 12 <script>
13 description('Tests that the height keywords are not exposed yet.'); 13 description('Tests that the height keywords are parsed.');
14 var PREFIX = '-webkit-';
14 15
15 var divs = document.querySelectorAll('div'); 16 var divs = document.querySelectorAll('div.expected-data');
16 for (var i = 0; i < divs.length; ++i) { 17 for (var i = 0; i < divs.length; ++i) {
17 shouldBeEmptyString('divs[i].style.height'); 18 shouldBe('divs[i].style.height', 'PREFIX + divs[i].getAttribute("expecte d-data")');
18 shouldBeEmptyString('divs[i].style.minHeight'); 19 shouldBe('divs[i].style.minHeight', 'PREFIX + divs[i].getAttribute("expe cted-data")');
19 shouldBeEmptyString('divs[i].style.maxHeight'); 20 shouldBe('divs[i].style.maxHeight', 'PREFIX + divs[i].getAttribute("expe cted-data")');
20 } 21 }
21 22
22 var PREFIX = '-webkit-';
23 var KEYWORDS = ['min-content', 'max-content', 'fill-available', 'fit-conten t']; 23 var KEYWORDS = ['min-content', 'max-content', 'fill-available', 'fit-conten t'];
24 var div; 24 var div;
25 25
26 KEYWORDS.forEach(function(keyword) { 26 KEYWORDS.forEach(function(keyword) {
27 div = document.createElement('div'); 27 div = document.createElement('div');
28 div.style.height = PREFIX + keyword; 28 div.style.height = PREFIX + keyword;
29 div.style.minHeight = PREFIX + keyword; 29 div.style.minHeight = PREFIX + keyword;
30 div.style.maxHeight = PREFIX + keyword; 30 div.style.maxHeight = PREFIX + keyword;
31 shouldBeEmptyString('div.style.height'); 31 shouldBe('div.style.height', '"' + PREFIX + keyword + '"');
32 shouldBeEmptyString('div.style.minHeight'); 32 shouldBe('div.style.minHeight', '"' + PREFIX + keyword + '"');
33 shouldBeEmptyString('div.style.maxHeight'); 33 shouldBe('div.style.maxHeight', '"' + PREFIX + keyword + '"');
34 }); 34 });
35 </script> 35 </script>
36 36
37 <script src="../js/resources/js-test-post.js"></script> 37 <script src="../js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698