Index: LayoutTests/fast/dom/Node/textContent-set-undefined.html |
diff --git a/LayoutTests/fast/dom/Node/textContent-set-undefined.html b/LayoutTests/fast/dom/Node/textContent-set-undefined.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6f31739e1e2eb2f503582db3da85a756e088263e |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Node/textContent-set-undefined.html |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-node-textcontent"> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+</head> |
+<body> |
+<div id="testDiv">test</div> |
+<script> |
+test(function() { |
+ var testDiv = document.getElementById("testDiv"); |
+ assert_equals(testDiv.textContent, "test"); |
+ testDiv.textContent = null; |
+ assert_equals(testDiv.textContent, ""); |
+ testDiv.textContent = "test"; |
+ assert_equals(testDiv.textContent, "test"); |
+ testDiv.textContent = undefined; |
+ assert_equals(testDiv.textContent, ""); |
+}, "Test that setting Node.textContent to undefined does the same as null"); |
+</script> |
+</body> |
+</html> |