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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/select-named-getter.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>Absence of a named getter on HTMLSelectElement</title>
4 <script src=../../../../../../resources/testharness.js></script>
5 <script src=../../../../../../resources/testharnessreport.js></script>
6 <div id=log></div>
7 <select id=select>
8 <option id=op1>A</option>
9 <option name=op2>B</option>
10 <option id=op3 name=op4>C</option>
11 <option id=>D</option>
12 <option name=>D</option>
13 </select>
14 <script>
15 test(function() {
16 var select = document.getElementById("select");
17 assert_equals(select.op1, undefined);
18 assert_false("op1" in select);
19 assert_equals(select.namedItem("op1"), select.children[0]);
20 }, "Option with id")
21
22 test(function() {
23 var select = document.getElementById("select");
24 assert_equals(select.op2, undefined);
25 assert_false("op2" in select);
26 assert_equals(select.namedItem("op2"), select.children[1]);
27 }, "Option with name")
28
29 test(function() {
30 var select = document.getElementById("select");
31 assert_equals(select.op3, undefined);
32 assert_false("op3" in select);
33 assert_equals(select.namedItem("op3"), select.children[2]);
34
35 assert_equals(select.op4, undefined);
36 assert_false("op4" in select);
37 assert_equals(select.namedItem("op4"), select.children[2]);
38 }, "Option with name and id")
39
40 test(function() {
41 var select = document.getElementById("select");
42 assert_equals(select[""], undefined);
43 assert_false("" in select);
44 assert_equals(select.namedItem(""), null);
45 }, "Empty string name");
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698