mirror of
https://github.com/servo/servo.git
synced 2025-06-26 18:14:34 +01:00
182 lines
No EOL
5 KiB
HTML
182 lines
No EOL
5 KiB
HTML
<!DOCTYPE html>
|
|
<html><head>
|
|
<meta charset="utf-8">
|
|
<title>CSS Writing Modes: parsing text-combine-upright with valid values</title>
|
|
<link href="http://google.com/+MasatakaYakura" rel="author" title="Masataka Yakura">
|
|
<link href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright" rel="help">
|
|
<meta content="text-combine-upright supports `none`, `all`, `digits`, and `digits` followed by a digit in the range from 2 to 4." name="assert">
|
|
<meta content="dom" name="flags">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<style>
|
|
#valid_none {
|
|
text-combine-upright: none;
|
|
}
|
|
|
|
#valid_all {
|
|
text-combine-upright: all;
|
|
}
|
|
|
|
#valid_digits {
|
|
text-combine-upright: digits;
|
|
}
|
|
|
|
#valid_digits_2 {
|
|
text-combine-upright: digits 2;
|
|
}
|
|
|
|
#valid_digits_3 {
|
|
text-combine-upright: digits 3;
|
|
}
|
|
|
|
#valid_digits_4 {
|
|
text-combine-upright: digits 4;
|
|
}
|
|
|
|
#valid_digits_positive2 {
|
|
text-combine-upright: digits +2;
|
|
}
|
|
|
|
#valid_digits_positive3_nospace {
|
|
text-combine-upright: digits+3;
|
|
}
|
|
|
|
#valid_digits_tab_4_nospace {
|
|
text-combine-upright: digits 4;
|
|
}
|
|
|
|
#valid_digits_lf_2_nospace {
|
|
text-combine-upright: digits
|
|
2;
|
|
}
|
|
|
|
#valid_digits_tab_3 {
|
|
text-combine-upright: digits 3;
|
|
}
|
|
|
|
#valid_digits_tab_lf_4_nospace {
|
|
text-combine-upright: digits
|
|
4;
|
|
}
|
|
|
|
#valid_initial {
|
|
text-combine-upright: initial;
|
|
}
|
|
|
|
#valid_inherit_outer {
|
|
text-combine-upright: digits 2;
|
|
}
|
|
|
|
#valid_inherit_inner {
|
|
text-combine-upright: inherit;
|
|
}
|
|
|
|
#valid_unset_outer {
|
|
text-combine-upright: digits 4;
|
|
}
|
|
|
|
#valid_unset_inner {
|
|
text-combine-upright: unset;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="valid_none"></div>
|
|
<div id="valid_all"></div>
|
|
<div id="valid_digits"></div>
|
|
<div id="valid_digits_2"></div>
|
|
<div id="valid_digits_3"></div>
|
|
<div id="valid_digits_4"></div>
|
|
<div id="valid_digits_positive2"></div>
|
|
<div id="valid_digits_positive3_nospace"></div>
|
|
<div id="valid_digits_tab_4_nospace"></div>
|
|
<div id="valid_digits_lf_2_nospace"></div>
|
|
<div id="valid_digits_tab_3"></div>
|
|
<div id="valid_digits_tab_lf_4_nospace"></div>
|
|
|
|
<div id="valid_initial"></div>
|
|
|
|
<div id="valid_inherit_outer">
|
|
<div id="valid_inherit_inner"></div>
|
|
</div>
|
|
|
|
<div id="valid_unset_outer">
|
|
<div id="valid_unset_inner"></div>
|
|
</div>
|
|
|
|
<div id="log"></div>
|
|
|
|
<script>
|
|
var getComputedValueFor = function (id) {
|
|
var element = document.getElementById(id);
|
|
return window.getComputedStyle(element).textCombineUpright;
|
|
};
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_none'), 'none');
|
|
}, 'Computed value for `text-combine-upright: none` is `none`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_all'), 'all');
|
|
}, 'Computed value for `text-combine-upright: all` is `all`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits'), 'digits 2');
|
|
}, 'Computed value for `text-combine-upright: digits` is `digits 2`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_2'), 'digits 2');
|
|
}, 'Computed value for `text-combine-upright: digits 2` is `digits 2`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_3'), 'digits 3');
|
|
}, 'Computed value for `text-combine-upright: digits 3` is `digits 3`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_4'), 'digits 4');
|
|
}, 'Computed value for `text-combine-upright: digits 4` is `digits 4`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_positive2'), 'digits 2');
|
|
}, 'Computed value for `text-combine-upright: digits +2` is `digits 2`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_positive3_nospace'), 'digits 3');
|
|
}, 'Computed value for `text-combine-upright: digits+3` is `digits 3`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_tab_4_nospace'), 'digits 4');
|
|
}, 'Computed value for `text-combine-upright: digits[TAB]4` is `digits 4`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_lf_2_nospace'), 'digits 2');
|
|
}, 'Computed value for `text-combine-upright: digits[LF]2` is `digits 2`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_tab_3'), 'digits 3');
|
|
}, 'Computed value for `text-combine-upright: digits [TAB]3` is `digits 3`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_digits_tab_lf_4_nospace'), 'digits 4');
|
|
}, 'Computed value for `text-combine-upright: digits[TAB][LF]4` is `digits 4`');
|
|
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_initial'), 'none');
|
|
}, 'Computed value for `text-combine-upright: initial` is `none`');
|
|
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_inherit_outer'), 'digits 2');
|
|
assert_equals(getComputedValueFor('valid_inherit_inner'), 'digits 2');
|
|
}, 'Computed value for `text-combine-upright: inherit` is `digits 2` which is inherited from the parent element');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_unset_outer'), 'digits 4');
|
|
assert_equals(getComputedValueFor('valid_unset_inner'), 'digits 4');
|
|
}, 'Computed value for `text-combine-upright: unset` is `digits 4` which is inherited from the parent element');
|
|
</script>
|
|
|
|
</body></html> |