OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>document: fg/bg/link/vlink/alink-color</title> | 2 <title>document: fg/bg/link/vlink/alink-color</title> |
3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> | 3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> |
4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-fgco
lor"> | 4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-fgco
lor"> |
5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text"> | 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text"> |
6 <script src="../../../../../../resources/testharness.js"></script> | 6 <script src="../../../../../../resources/testharness.js"></script> |
7 <script src="../../../../../../resources/testharnessreport.js"></script> | 7 <script src="../../../../../../resources/testharnessreport.js"></script> |
8 <div id="log"></div> | 8 <div id="log"></div> |
9 <script> | 9 <script> |
10 test(function() { | 10 test(function() { |
11 assert_equals(document.fgColor, document.body.text); | 11 assert_equals(document.fgColor, document.body.text); |
12 assert_equals(document.bgColor, document.body.bgColor); | 12 assert_equals(document.bgColor, document.body.bgColor); |
13 assert_equals(document.linkColor, document.body.link); | 13 assert_equals(document.linkColor, document.body.link); |
14 assert_equals(document.vlinkColor, document.body.vLink); | 14 assert_equals(document.vlinkColor, document.body.vLink); |
15 assert_equals(document.alinkColor, document.body.aLink); | 15 assert_equals(document.alinkColor, document.body.aLink); |
16 }) | 16 }) |
17 test(function() { | 17 test(function() { |
| 18 document.body.text = null; |
| 19 assert_equals(document.fgColor, ""); |
| 20 assert_equals(document.body.text, ""); |
| 21 assert_equals(document.body.getAttribute("text"), ""); |
| 22 }) |
| 23 test(function() { |
18 document.body.text = "blue"; | 24 document.body.text = "blue"; |
19 assert_equals(document.fgColor, "blue"); | 25 assert_equals(document.fgColor, "blue"); |
20 assert_equals(document.body.text, "blue"); | 26 assert_equals(document.body.text, "blue"); |
21 assert_equals(document.body.getAttribute("text"), "blue"); | 27 assert_equals(document.body.getAttribute("text"), "blue"); |
22 }) | 28 }) |
23 test(function() { | 29 test(function() { |
24 document.body.bgColor = "green"; | 30 document.body.bgColor = "green"; |
25 assert_equals(document.bgColor, "green"); | 31 assert_equals(document.bgColor, "green"); |
26 assert_equals(document.body.bgColor, "green"); | 32 assert_equals(document.body.bgColor, "green"); |
27 assert_equals(document.body.getAttribute("bgcolor"), "green"); | 33 assert_equals(document.body.getAttribute("bgcolor"), "green"); |
(...skipping 10 matching lines...) Expand all Loading... |
38 assert_equals(document.body.vLink, "yellow"); | 44 assert_equals(document.body.vLink, "yellow"); |
39 assert_equals(document.body.getAttribute("vlink"), "yellow"); | 45 assert_equals(document.body.getAttribute("vlink"), "yellow"); |
40 }) | 46 }) |
41 test(function() { | 47 test(function() { |
42 document.body.aLink = "silver"; | 48 document.body.aLink = "silver"; |
43 assert_equals(document.alinkColor, "silver"); | 49 assert_equals(document.alinkColor, "silver"); |
44 assert_equals(document.body.aLink, "silver"); | 50 assert_equals(document.body.aLink, "silver"); |
45 assert_equals(document.body.getAttribute("alink"), "silver"); | 51 assert_equals(document.body.getAttribute("alink"), "silver"); |
46 }) | 52 }) |
47 </script> | 53 </script> |
OLD | NEW |