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

Side by Side Diff: third_party/WebKit/LayoutTests/external/csswg-test/css-rhythm-1/line-height-step-parsing-001.html

Issue 2707203005: Import csswg-test@ed79f8614481e97d61f17f41b65448c211d27c6f (Closed)
Patch Set: Created 3 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 <!DOCTYPE html>
2 <title>CSS Rhythmic Sizing: parsing line-height-step</title>
3 <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com">
4 <link rel="help" href="https://drafts.csswg.org/css-rhythm-1/#line-height-step">
5 <meta name="assert" content="This test asserts the parsing and getComputedStyle works correctly for the line-height-step property.">
6 <meta name="flags" content="dom">
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9
10 <div title="initial value should be '0px'" data-expected="0px"></div>
11
12 <div style="line-height-step: 20px" data-expected="20px">
13 <div title="line-height-step should inherit" data-expected="20px"></div>
14 <div style="line-height-step: initial" data-expected="0px"></div>
15
16 <div style="line-height-step: 40px" data-expected="40px"></div>
17
18 <div title="'0' should be a valid length" style="line-height-step: 0" data-exp ected="0px"></div>
19
20 <div title="Interger should be invalid" style="line-height-step: 1" data-expec ted="20px"></div>
21 <div title="Negative length should be invalid" style="line-height-step: -1px" data-expected="20px"></div>
22 </div>
23
24 <div id="pt" style="line-height-step: 40pt"></div>
25
26 <script>
27 Array.prototype.forEach.call(document.querySelectorAll("[data-expected]"), funct ion (element) {
28 var expected = element.dataset.expected;
29 test(function () {
30 var actual = getComputedStyle(element).lineHeightStep;
31 assert_equals(actual, expected);
32 }, element.title || "'" + element.getAttribute("style") + "' should compute to '" + expected + "'");
33 });
34
35 test(function () {
36 assert_equals(getComputedStyle(document.getElementById("pt")).lineHeightStep.s lice(-2), "px");
37 }, "Computed value should be the absolute length");
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698