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

Side by Side Diff: LayoutTests/svg/css/baseline-shift-inherit.html

Issue 956553004: Use Length for baselineShiftValue in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: A few more TEs. Created 5 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <style> 4 <style>
5 text { 5 text {
6 baseline-shift: inherit; 6 baseline-shift: inherit;
7 } 7 }
8 </style> 8 </style>
9 <svg height="0"><text></text></svg> 9 <svg height="0"><text></text></svg>
10 <script> 10 <script>
11 setup(function() { 11 setup(function() {
12 window.svg = document.querySelector('svg'); 12 window.svg = document.querySelector('svg');
13 window.textElement = document.querySelector('text'); 13 window.textElement = document.querySelector('text');
14 }); 14 });
15 ['baseline', 'sub', 'super', '10px', '100%'].forEach(function(item) { 15 [
16 {value: 'baseline', expected: '0px'},
17 {value: 'sub'},
18 {value: 'super'},
19 {value: '10px'},
20 {value: '100%'}
21 ].forEach(function(item) {
16 test(function() { 22 test(function() {
17 svg.style.setProperty('baseline-shift', item); 23 svg.style.setProperty('baseline-shift', item.value);
18 assert_equals(getComputedStyle(textElement).baselineShift, item); 24 assert_equals(getComputedStyle(textElement).baselineShift, item.expected || item.value);
19 }, 'Inheritance of the baseline-shift property - ' + item + '.'); 25 }, 'Inheritance of the baseline-shift property - ' + item + '.');
20 }); 26 });
21 </script> 27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698