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