Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / state-restore-skip-stateless.html
blob5883612d88cb2fe7d6e5512f87dfc3299f8134d4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/common.js"></script>
6 </head>
7 <body>
8 <div id="console"></div>
9 <div id="elements">
10 <fieldset name=name01></fieldset>
11 <input name=name02 type=hidden>
12 <input name=name03 type=text>
13 <input name=name04 type=tel>
14 <input name=name05 type=url>
15 <input name=name06 type=email>
16 <input name=name07 type=password>
17 <!-- Don't test optional types.
18 <input name=name08 type=datetime>
19 <input name=name09 type=date>
20 <input name=name10 type=month>
21 <input name=name11 type=week>
22 <input name=name12 type=time>
23 <input name=name13 type=datetime-local>
24 -->
25 <input name=name14 type=number>
26 <input name=name15 type=range>
27 <!-- <input name=name16 type=color> -->
28 <input name=name17 type=checkbox>
29 <input name=name18 type=radio>
30 <input name=name19 type=file>
31 <input name=name20 type=submit>
32 <input name=name21 type=reset>
33 <input name=name22 type=button>
34 <button name=name23 type=submit></button>
35 <button name=name24 type=reset></button>
36 <button name=name25 type=button></button>
37 <select name=name26 ></select>
38 <select name=name27 multiple></select>
39 <textarea name=name28></textarea>
40 <keygen name=name29>
41 <output name=name30></output>
42 </div>
43 <script>
44 console.log('Test if state of stateless form control types are not saved.');
45 jsTestIsAsync = true;
47 function dumpFormState() {
48 if (window.internals) {
49 var statefulTypes = ['hidden', 'text', 'tel', 'url', 'email', 'number', 'range', 'checkbox',
50 'radio', 'file', 'select-one', 'select-multiple', 'textarea'];
51 var statelessTypes = ['fieldset', 'password', 'submit', 'reset', 'button', 'keygen', 'output'];
53 var states = internals.formControlStateOfHistoryItem();
54 for (var i = 0; i < statefulTypes.length; ++i) {
55 if (states.indexOf(statefulTypes[i]) >= 0)
56 testPassed('There is a state for ' + statefulTypes[i]);
57 else
58 testFailed('There no state for ' + statefulTypes[i]);
61 for (var i = 0; i < statelessTypes.length; ++i) {
62 if (states.indexOf(statelessTypes[i]) < 0)
63 testPassed('There is no state for ' + statelessTypes[i]);
64 else
65 testFailed('There is a state for ' + statelessTypes[i]);
68 // Remove the input elements from the document to avoid a bunch of trailing
69 // whitespace in the test output.
70 document.body.removeChild(document.getElementById("elements"));
71 finishJSTest();
74 window.onload = function() {
75 setTimeout(function() {
76 location.reload();
77 }, 0);
79 window.onunload = function() {
80 dumpFormState();
81 location.hash = "#done";
83 </script>
84 </body>