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

Side by Side Diff: LayoutTests/cssom/ahem-ex-units.html

Issue 890013004: Check Ahem font ex units on multiple platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mac test suppresssion Created 5 years, 9 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/cssom/ahem-ex-units-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <style>
4 * { font-size: 16px; }
5 svg, rect, div { font-family: 'Ahem'; }
6 </style>
7 <html>
8 <svg id="svg" width="0" height="0"></svg>
9 <script src="../resources/js-test.js"></script>
10 <script>
11 description("Test ex unit with Ahem font");
12
13 function computedStyleDiv(property, value) {
14 var div = document.createElement("div");
15 document.body.appendChild(div);
16 div.style[property] = value;
17 var computedValue = getComputedStyle(div).getPropertyValue(property);
18 document.body.removeChild(div);
19 return computedValue;
20 }
21
22 function computedStyleRect(property, value) {
23 var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
24 document.getElementById("svg").appendChild(rect);
25 rect.setAttribute(property, value);
26 var computedValue = getComputedStyle(rect).getPropertyValue(property);
27 document.getElementById("svg").removeChild(rect);
28 return computedValue;
29 }
30
31
32 function testComputed(property, value, expected) {
33 shouldBeEqualToString('computedStyleDiv("' + property + '", "' + value + '") ', expected);
34 shouldBeEqualToString('computedStyleRect("' + property + '", "' + value + '" )', expected);
35 }
36
37 testComputed("word-spacing", "1ex", "12.8000001907349px");
eae 2015/03/05 19:39:44 I'd rather not add yet another test that depends o
Erik Dahlström (inactive) 2015/03/06 09:05:01 Done.
38 </script>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/cssom/ahem-ex-units-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698