2008-11-20 Pamela Greene <pam@chromium.org>
authorpam@chromium.org <pam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Nov 2008 23:51:55 +0000 (23:51 +0000)
committerpam@chromium.org <pam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Nov 2008 23:51:55 +0000 (23:51 +0000)
        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=22371
        Add a test for accessing form element items by index.

        * fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt: Added.
        * fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@38640 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html [new file with mode: 0644]

index 6210372..81fa582 100644 (file)
@@ -2,6 +2,16 @@
 
         Reviewed by Darin Adler.
 
+        https://bugs.webkit.org/show_bug.cgi?id=22371
+        Add a test for accessing form element items by index.
+
+        * fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt: Added.
+        * fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html: Added.
+
+2008-11-20  Pamela Greene  <pam@chromium.org>
+
+        Reviewed by Darin Adler.
+
         Test for https://bugs.webkit.org/show_bug.cgi?22370
         Add a test to check detectability of HTMLCollections.
 
diff --git a/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt
new file mode 100644 (file)
index 0000000..db8ff58
--- /dev/null
@@ -0,0 +1,10 @@
+This test verifies that elements can be fetched by index from HTMLFormElements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS form[0] is my_input
+PASS successfullyParsed is true
+
+TEST COMPLETE
+HTMLInputElement
diff --git a/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html
new file mode 100644 (file)
index 0000000..b45c35f
--- /dev/null
@@ -0,0 +1,24 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<form id='f'>
+  <input type="radio" name="a" value="a" id="i">HTMLInputElement</input>
+</form>
+
+<script>
+description('This test verifies that elements can be fetched by index from HTMLFormElements.');
+
+var form = document.getElementById('f');
+var my_input = document.getElementById('i');
+shouldBe("form[0]", "my_input");
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>