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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement.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>HTML Test: HTMLFieldSetElement interface</title>
4 <link rel="author" title="Intel" href="http://www.intel.com/">
5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-fieldset-elem ent">
6 <script src="../../../../../../resources/testharness.js"></script>
7 <script src="../../../../../../resources/testharnessreport.js"></script>
8 <div id="log"></div>
9 <form name="fm1" style="display:none">
10 <fieldset id="fs_outer">
11 <legend><input type="checkbox" name="cb"></legend>
12 <input type=text name="txt" id="ctl1">
13 <button id="ctl2" name="btn">BUTTON</button>
14 <fieldset id="fs_inner">
15 <input type="text" name="txt_inner">
16 <progress name="pg" value="0.5"></progress>
17 </fieldset>
18 </fieldset>
19 </form>
20 <script>
21
22 var fm1,
23 fs_outer,
24 children_outer;
25
26 setup(function () {
27 fm1 = document.forms.fm1;
28 fs_outer = document.getElementById("fs_outer");
29 children_outer = fs_outer.elements;
30 });
31
32 test(function () {
33 assert_equals(fs_outer.type, "fieldset", "The value of type attribute is incor rect.");
34 }, "The type attribute must return 'fieldset'");
35
36 test(function () {
37 assert_equals(fs_outer.form, fm1, "The fieldset should have a form owner.");
38 }, "The form attribute must return the fieldset's form owner");
39
40 test(function () {
41 assert_true(children_outer instanceof HTMLFormControlsCollection,
42 "The elements attribute should be an HTMLFormControlsCollection ob ject");
43 }, "The elements must return an HTMLFormControlsCollection object");
44
45 test(function () {
46 var fs_inner = document.getElementById("fs_inner");
47 var children_inner = fs_inner.elements;
48 assert_array_equals(children_inner, [fm1.txt_inner],
49 "The items in the collection must be children of the inner fieldset element.");
50 assert_array_equals(children_outer, [fm1.cb, fm1.txt, fm1.btn, fm1.fs_inner, f m1.txt_inner],
51 "The items in the collection must be children of the outer fieldset element.");
52 }, "The controls must root at the fieldset element");
53
54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698