Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / style / test / test_bug437915.html
blobac492a6ea632d59c6d5ab22b39931dd867f58753
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=437915
5 -->
6 <head>
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; }
16 </style>
17 </head>
18 <body>
19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=437915">Mozilla Bug 437915</a>
20 <p id="display"></p>
21 <div id="content" style="display: none">
23 </div>
24 <pre id="test">
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, "");
32 var chars = {
33 0x09: true, // tab
34 0x0a: true, // newline
35 0x0b: false, // vertical tab (MAY CHANGE IN FUTURE!)
36 0x0c: true, // form feed
37 0x0d: true, // carriage return
38 0x0e: false,
39 0x20: true, // space
40 0x2003: false,
41 0x200b: false,
42 0x2028: false,
43 0x2029: false,
44 0x3000: false
47 var wsmap = {
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] + ")");
67 </script>
68 </pre>
69 </body>
70 </html>