Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / autocomplete.html
blob1d40eeb3cf1a95b5ea132138934e49b978bfabaa
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 window.jsTestIsAsync = true;
6 function test() {
7 var form = document.getElementById('form');
8 var field = document.getElementById('field');
10 shouldBeTrue("('autocomplete' in form)");
11 shouldBeTrue("('autocomplete' in field)");
13 shouldBeNull("form.getAttribute('autocomplete')");
14 shouldBeNull("field.getAttribute('autocomplete')");
16 shouldBeEqualToString("form.autocomplete", "on");
17 shouldBeEqualToString("field.autocomplete", "");
19 shouldBeEqualToString("form.autocomplete = 'off'; form.getAttribute('autocomplete')", "off");
20 shouldBeEqualToString("field.autocomplete = 'off'; field.getAttribute('autocomplete')", "off");
21 shouldBeEqualToString("form.setAttribute('autocomplete', 'on'); form.autocomplete", "on");
22 shouldBeEqualToString("field.setAttribute('autocomplete', 'on'); field.autocomplete", "on");
23 shouldBeEqualToString("form.setAttribute('autocomplete', 'indeterminate'); form.autocomplete", "on");
24 shouldBeEqualToString("field.setAttribute('autocomplete', 'indeterminate'); field.autocomplete", "indeterminate");
25 finishJSTest();
27 </script>
28 </head>
29 <body onload="test()">
30 This tests that the 'autocomplete' attribute of form and input elements is bound to a JavaScript property.
31 <form id="form">
32 <input type="text" id="field" />
33 </form>
34 <div id="console"></div>
35 </body>
36 </html>