OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <link rel="help" href="http://dom.spec.whatwg.org/#dom-node-textcontent"> |
| 5 <script src="../../../resources/testharness.js"></script> |
| 6 <script src="../../../resources/testharnessreport.js"></script> |
| 7 </head> |
| 8 <body> |
| 9 <div id="testDiv">test</div> |
| 10 <script> |
| 11 test(function() { |
| 12 var testDiv = document.getElementById("testDiv"); |
| 13 assert_equals(testDiv.textContent, "test"); |
| 14 testDiv.textContent = null; |
| 15 assert_equals(testDiv.textContent, ""); |
| 16 testDiv.textContent = "test"; |
| 17 assert_equals(testDiv.textContent, "test"); |
| 18 testDiv.textContent = undefined; |
| 19 assert_equals(testDiv.textContent, ""); |
| 20 }, "Test that setting Node.textContent to undefined does the same as null"); |
| 21 </script> |
| 22 </body> |
| 23 </html> |
OLD | NEW |