| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 
 | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Writing Modes: parsing text-combine-upright with invalid values</title>
<link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura">
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright">
<meta name="assert" content="text-combine-upright doesn't support undefined keywords and out-of-range integer, and numbers.">
<meta name="flags" content="dom invalid">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#invalid_foo {
  text-decoration-upright: foo;
}
#invalid_all_none {
  text-decoration-upright: all none;
}
#invalid_none_digits {
  text-decoration-upright: none digits;
}
#invalid_digits_bar {
  text-decoration-upright: digits bar;
}
#invalid_digits_4_none {
  text-decoration-upright: digits 4 none;
}
#invalid_digits2 {
  text-decoration-upright: digits2;
}
#invalid_digits_1 {
  text-decoration-upright: digits 1;
}
#invalid_digits_positive5 {
  text-decoration-upright: digits +5;
}
#invalid_digits_2_00 {
  text-decoration-upright: digits 2.00;
}
#invalid_digits_2_e_0 {
  text-decoration-upright: digits 2e0;
}
#invalid_digits_positive2_e_0 {
  text-decoration-upright: digits +2e0;
}
#invalid_digits_3_e_positive0 {
  text-decoration-upright: digits 3e+0;
}
#invalid_digits_3_e_negative0 {
  text-decoration-upright: digits 3e-0;
}
#invalid_digits_positive4_e_positive0 {
  text-decoration-upright: digits +4e+0;
}
#invalid_digits_positive4_e_negative0 {
  text-decoration-upright: digits +4e-0;
}
</style>
</head>
<body>
<div id="invalid_foo"></div>
<div id="invalid_all_none"></div>
<div id="invalid_none_digits"></div>
<div id="invalid_digits_bar"></div>
<div id="invalid_digits_4_none"></div>
<div id="invalid_digits2"></div>
<div id="invalid_digits_1"></div>
<div id="invalid_digits_positive5"></div>
<div id="invalid_digits_2_00"></div>
<div id="invalid_digits_2_e_0"></div>
<div id="invalid_digits_positive2_e_0"></div>
<div id="invalid_digits_3_e_positive0"></div>
<div id="invalid_digits_3_e_negative0"></div>
<div id="invalid_digits_positive4_e_positive0"></div>
<div id="invalid_digits_positive4_e_negative0"></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('invalid_foo'), 'none');
}, 'Computed value for `text-combine-upright: foo` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_all_none'), 'none');
}, 'Computed value for `text-combine-upright: all none` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_none_digits'), 'none');
}, 'Computed value for `text-combine-upright: none digits` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_bar'), 'none');
}, 'Computed value for `text-combine-upright: digits bar` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_4_none'), 'none');
}, 'Computed value for `text-combine-upright: digits 4 none` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits2'), 'none');
}, 'Computed value for `text-combine-upright: digits2` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_1'), 'none');
}, 'Computed value for `text-combine-upright: digits 1` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_positive5'), 'none');
}, 'Computed value for `text-combine-upright: digits +5` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_2_00'), 'none');
}, 'Computed value for `text-combine-upright: digits 2.00` is `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_2_e_0'), 'none');
  assert_not_equals(getComputedValueFor('invalid_digits_2_e_0'), 'digits 2');
}, 'Computed value for `text-combine-upright: digits 2e0` is not `digits 2` but `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_positive2_e_0'), 'none');
  assert_not_equals(getComputedValueFor('invalid_digits_positive2_e_0'), 'digits 2');
}, 'Computed value for `text-combine-upright: digits +2e0` is not `digits 2` but `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_3_e_positive0'), 'none');
  assert_not_equals(getComputedValueFor('invalid_digits_3_e_positive0'), 'digits 3');
}, 'Computed value for `text-combine-upright: digits 3e+0` is not `digits 3` but `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_3_e_negative0'), 'none');
  assert_not_equals(getComputedValueFor('invalid_digits_3_e_negative0'), 'digits 3');
}, 'Computed value for `text-combine-upright: digits 3e-0` is not `digits 3` but `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_positive4_e_positive0'), 'none');
  assert_not_equals(getComputedValueFor('invalid_digits_positive4_e_positive0'), 'digits 4');
}, 'Computed value for `text-combine-upright: digits +4e+0` is not `digits 4` but `none`');
test(function () {
  assert_equals(getComputedValueFor('invalid_digits_positive4_e_negative0'), 'none');
  assert_not_equals(getComputedValueFor('invalid_digits_positive4_e_negative0'), 'digits 4');
}, 'Computed value for `text-combine-upright: digits +4e-0` is not `digits 4` but `none`');
</script>
</body>
</html>
 |