Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Node / textContent-set-undefined.html
blob6f31739e1e2eb2f503582db3da85a756e088263e
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>