OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>document: fg/bg/link/vlink/alink-color</title> |
| 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"> |
| 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-body-text"> |
| 6 <script src="../../../../../../resources/testharness.js"></script> |
| 7 <script src="../../../../../../resources/testharnessreport.js"></script> |
| 8 <div id="log"></div> |
| 9 <script> |
| 10 test(function() { |
| 11 assert_equals(document.fgColor, document.body.text); |
| 12 assert_equals(document.bgColor, document.body.bgColor); |
| 13 assert_equals(document.linkColor, document.body.link); |
| 14 assert_equals(document.vlinkColor, document.body.vLink); |
| 15 assert_equals(document.alinkColor, document.body.aLink); |
| 16 }) |
| 17 test(function() { |
| 18 document.body.setAttribute("text", "blue"); |
| 19 assert_equals(document.fgColor, "blue"); |
| 20 assert_equals(document.body.text, "blue"); |
| 21 assert_equals(document.body.getAttribute("text"), "blue"); |
| 22 }) |
| 23 test(function() { |
| 24 document.body.setAttribute("bgcolor", "green"); |
| 25 assert_equals(document.bgColor, "green"); |
| 26 assert_equals(document.body.bgColor, "green"); |
| 27 assert_equals(document.body.getAttribute("bgcolor"), "green"); |
| 28 }) |
| 29 test(function() { |
| 30 document.body.setAttribute("link", "red"); |
| 31 assert_equals(document.linkColor, "red"); |
| 32 assert_equals(document.body.link, "red"); |
| 33 assert_equals(document.body.getAttribute("link"), "red"); |
| 34 }) |
| 35 test(function() { |
| 36 document.body.setAttribute("vlink", "yellow"); |
| 37 assert_equals(document.vlinkColor, "yellow"); |
| 38 assert_equals(document.body.vLink, "yellow"); |
| 39 assert_equals(document.body.getAttribute("vlink"), "yellow"); |
| 40 }) |
| 41 test(function() { |
| 42 document.body.setAttribute("alink", "silver"); |
| 43 assert_equals(document.alinkColor, "silver"); |
| 44 assert_equals(document.body.aLink, "silver"); |
| 45 assert_equals(document.body.getAttribute("alink"), "silver"); |
| 46 }) |
| 47 </script> |
OLD | NEW |