Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: LayoutTests/fast/dom/Node/textContent-set-undefined.html

Issue 303163002: Node.textContent setter should treat undefined the same way as null (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/Node.idl » ('j') | Source/core/dom/Node.idl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5246426fcb6a98459bd02d94f6cad2925c7fcf5e
--- /dev/null
+++ b/LayoutTests/fast/dom/Node/textContent-set-undefined.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
arv (Not doing code reviews) 2014/05/29 16:14:51 Maybe add a link[rel=help] like you used to do?
Inactive 2014/05/29 16:54:13 Done.
+<body>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<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>
« no previous file with comments | « no previous file | Source/core/dom/Node.idl » ('j') | Source/core/dom/Node.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698