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

Unified Diff: LayoutTests/fast/forms/select-value-null.html

Issue 101573002: Remove TreatNullAs=NullString for HTMLSelectElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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
Index: LayoutTests/fast/forms/select-value-null.html
diff --git a/LayoutTests/fast/forms/select-value-null.html b/LayoutTests/fast/forms/select-value-null.html
new file mode 100644
index 0000000000000000000000000000000000000000..adef3caff714b26a2e1225b9693303a49ed056cb
--- /dev/null
+++ b/LayoutTests/fast/forms/select-value-null.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<title>HTMLSelectElement.value null handling</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+</script>
+<select>
+<option id="option1" value=""></option>
+<option id="option2" value="null"></option>
+</select>
+<div id="log"></div>
+<script>
+test(function()
+{
+ var select = document.querySelector('select');
+ assert_equals(select.value, "");
+ assert_true(document.getElementById("option1").selected);
+ select.value = null;
+ assert_equals(select.value, "null");
+ assert_true(document.getElementById("option2").selected);
+}, "Setting HTMLSelectElement.value to null");
+</script>
« no previous file with comments | « LayoutTests/fast/dom/element-attribute-js-null-expected.txt ('k') | LayoutTests/fast/forms/select-value-null-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698