mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Test for calc integer expressions.
This commit is contained in:
parent
c7ce2ff483
commit
3ab6a20c85
2 changed files with 28 additions and 0 deletions
|
@ -11057,6 +11057,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/calc-number-serialization.html": [
|
||||
[
|
||||
"/_mozilla/css/calc-number-serialization.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/empty-keyframes.html": [
|
||||
[
|
||||
"/_mozilla/css/empty-keyframes.html",
|
||||
|
@ -20700,6 +20706,10 @@
|
|||
"94dc4aac4c546a74add074be0d3e604c8b196888",
|
||||
"reftest"
|
||||
],
|
||||
"css/calc-number-serialization.html": [
|
||||
"b9e77c824d0c96e51d51fb8f1e923d3ab67be027",
|
||||
"testharness"
|
||||
],
|
||||
"css/canvas_as_block_element_a.html": [
|
||||
"668d93da2dab9722998cc7c5785c20e2ab9a1ced",
|
||||
"reftest"
|
||||
|
|
18
tests/wpt/mozilla/tests/css/calc-number-serialization.html
Normal file
18
tests/wpt/mozilla/tests/css/calc-number-serialization.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS test: Calc expressions with numbers should still serialize as calc()</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="test"></div>
|
||||
<script>
|
||||
var div = document.querySelector('#test');
|
||||
test(function() {
|
||||
div.style.lineHeight = "calc(1)";
|
||||
assert_equals(div.style.lineHeight, "calc(1)");
|
||||
}, "calc of an integer expression should be preserved");
|
||||
|
||||
test(function() {
|
||||
div.style.lineHeight = "calc(1 + 3)";
|
||||
assert_equals(div.style.lineHeight, "calc(4)");
|
||||
}, "expressions on calc() should be simplified");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue