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

Unified Diff: LayoutTests/fast/forms/radio/radio-group-name-case.html

Issue 149173007: Handling radio group name as case insensitive (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to latest master Created 6 years, 11 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 | LayoutTests/fast/forms/radio/radio-group-name-case-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/radio/radio-group-name-case.html
diff --git a/LayoutTests/fast/forms/radio/radio-group-name-case.html b/LayoutTests/fast/forms/radio/radio-group-name-case.html
new file mode 100644
index 0000000000000000000000000000000000000000..1ede6c24ab5017dd777fb4277bc574471416ad56
--- /dev/null
+++ b/LayoutTests/fast/forms/radio/radio-group-name-case.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+
+<form>
+ <input type=radio>
+ <input type=radio>
+ <input type=radio>
+ </form>
+
+ <script>
+ description("Case shouldn't matter when it comes to radio group names");
+
+ function checkAllRadioButtonsInOrder() {
+ for (var i = 0; i < form.elements.length; i++)
+ form.elements[i].checked = false;
+ for (var i = 0; i < form.elements.length; i++)
+ form.elements[i].checked = true;
+ }
+
+ function testCheckedCorrectness() {
+ var i;
+ for (i = 0; i < (form.elements.length - 1); i++) {
+ shouldBeFalse("form.elements[" + i + "].checked");
+ }
+ shouldBeTrue("form.elements[" + i + "].checked");
+ }
+
+ form = document.forms[0];
+
+ debug("Test 1");
+ evalAndLog("form.elements[0].name = 'r';");
+ evalAndLog("form.elements[1].name = 'r';");
+ evalAndLog("form.elements[2].name = 'R';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 2");
+ evalAndLog("form.elements[0].name = 'radio';");
+ evalAndLog("form.elements[1].name = 'rAdIO';");
+ evalAndLog("form.elements[2].name = 'RADIO';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 3 (LATIN SMALL LETTER N WITH TILDE / LATIN CAPITAL LETTER N WITH TILDE)");
+ evalAndLog("form.elements[0].name = '\\u00F1';");
+ evalAndLog("form.elements[1].name = '\\u00F1';");
+ evalAndLog("form.elements[2].name = '\\u00D1';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 4 (LATIN SMALL LETTER SHARP S / SS)");
+ evalAndLog("form.elements[0].name = '\\u00DF';");
+ evalAndLog("form.elements[1].name = '\\u00DF';");
+ evalAndLog("form.elements[2].name = 'SS';")
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 5 (DESERET SMALL LETTER LONG I / DESERET CAPITAL LETTER LONG I)");
+ evalAndLog("form.elements[0].name = '\\uD801\\uDC28';");
+ evalAndLog("form.elements[1].name = '\\uD801\\uDC28';");
+ evalAndLog("form.elements[2].name = '\\uD801\\uDC00';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 6 (GREEK SMALL LETTER FINAL SIGMA / GREEK SMALL LETTER SIGMA / GREEK CAPITAL LETTER SIGMA)");
+ evalAndLog("form.elements[0].name = '\\u03C2';");
+ evalAndLog("form.elements[1].name = '\\u03C3';");
+ evalAndLog("form.elements[2].name = '\\u03A3';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 7 (LATIN CAPITAL LETTER I WITH DOT ABOVE)");
+ evalAndLog("form.elements[0].name = '\\u0130';");
+ evalAndLog("form.elements[1].name = '\\u0069';");
+ evalAndLog("form.elements[2].name = '\\u0130';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+
+ debug("\nTest 8 (LATIN SMALL LETTER DOTLESS I)");
+ evalAndLog("form.elements[0].name = '\\u0131';");
+ evalAndLog("form.elements[1].name = '\\u0049';");
+ evalAndLog("form.elements[2].name = '\\u0131';");
+ checkAllRadioButtonsInOrder();
+ testCheckedCorrectness();
+ </script>
+ </body>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/radio/radio-group-name-case-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698