4 https://bugzilla.mozilla.org/show_bug.cgi?id=437915
7 <title>Test for Bug
437915</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
10 <style type=
"text/css">
12 div
.classvalue
{ text-decoration: underline
; }
13 div
[title
~="titlevalue"] { visibility: hidden
; }
18 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=437915">Mozilla Bug
437915</a>
20 <div id=
"content" style=
"display: none">
24 <script class=
"testbody" type=
"text/javascript">
26 /** Test for Bug
437915 **/
28 var div = document.getElementById(
"content");
29 var cs = document.defaultView.getComputedStyle(div);
33 0x0a: true, // newline
34 0x0b: false, // vertical tab (MAY CHANGE IN FUTURE!)
35 0x0c: true, // form feed
36 0x0d: true, // carriage return
47 false: { str:
" NOT",
"text-decoration-line":
"none",
"visibility":
"visible" },
48 true: { str:
"",
"text-decoration-line":
"underline",
"visibility":
"hidden" }
51 for (var char in chars) {
52 var is_whitespace = chars[char];
53 var mapent = wsmap[is_whitespace];
54 div.setAttribute(
"class",
"classvalue" + String.fromCharCode(char) +
"b")
55 div.setAttribute(
"title",
"a" + String.fromCharCode(char) +
"titlevalue")
56 for (var prop of [
"text-decoration-line",
"visibility"]) {
57 is(cs.getPropertyValue(prop), mapent[prop],
58 "Character " + char +
" should" + mapent.str +
59 " be treated as whitespace ("
60 + prop +
" should be " + mapent[prop] +
")");