8 tab-size: calc(
2 * -
4);
15 tab-size: calc(
2 /
4);
19 opacity: calc((
2 /
4) *
1px);
23 tab-size: calc(
1 +
1px);
26 <div class=
"default int"></div>
27 <div class=
"default int-non-neg-invalid"></div>
28 <div class=
"default float"></div>
29 <div class=
"default float-invalid"></div>
30 <div class=
"default px-invalid"></div>
31 <div class=
"default num-length-invalid"></div>
32 <script src=
"../../resources/js-test.js"></script>
34 if (window
.testRunner
)
35 testRunner
.dumpAsText();
37 function getComputedValue(selector
, property
) {
38 return getComputedStyle(document
.querySelector(selector
))[property
];
41 shouldBe('getComputedValue(".int", "tabSize")', '"8"');
42 shouldBe('getComputedValue(".int-non-neg-invalid", "tabSize")', '"12345"');
43 shouldBeCloseTo('Number(getComputedValue(".float", "opacity"))', 0.5, .0001);
44 shouldBe('getComputedValue(".float-invalid", "tabSize")', '"12345"');
45 shouldBeCloseTo('Number(getComputedValue(".px-invalid", "opacity"))', 0.9, .0001);
46 shouldBe('getComputedValue(".num-length-invalid", "tabSize")', '"12345"');