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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-form-element/form-indexed-element.html

Issue 2104293002: Import wpt@3a8b4eba63e0e226cb9dc3648084753f920ffeb8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix platform expectations Created 4 years, 6 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
Index: third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-form-element/form-indexed-element.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-form-element/form-indexed-element.html b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-form-element/form-indexed-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..44471aa8ca309675167584f8b63d6de6e16162b4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-form-element/form-indexed-element.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>form.elements: indexed</title>
+<link rel="author" title="Ivan.Yang" href="mailto:jsyangwenjie@gmail.com">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<div id="test">
+<form id=form>
+<input type="radio" name="radio1" id="r1" value=1>
+<input type="radio" name="radio2" id="r2" value=2>
+</form>
+</div>
+<script>
+test(function() {
+ var form = document.getElementById("form");
+ assert_equals(form[0], document.getElementById("r1"));
+ assert_equals(form[1], document.getElementById("r2"));
+ assert_equals(form[2], undefined);
+ assert_equals(form[-1], undefined);
+ }, "form.elements should be accessed correctly by index")
+</script>

Powered by Google App Engine
This is Rietveld 408576698