OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 jsTestIsAsync = true; | 6 jsTestIsAsync = true; |
7 | 7 |
8 var numErrors = 0; | 8 var numErrors = 0; |
9 var numErrorsExpected = 4; | 9 var numErrorsExpected = 4; |
10 var eventsBubbleToBody = false; | 10 var eventsBubbleToBody = false; |
(...skipping 29 matching lines...) Expand all Loading... |
40 form.addEventListener('autocompleteerror', errorWithReason('disabled')); | 40 form.addEventListener('autocompleteerror', errorWithReason('disabled')); |
41 form.requestAutocomplete(); | 41 form.requestAutocomplete(); |
42 } | 42 } |
43 | 43 |
44 function checkNonUserGesture() | 44 function checkNonUserGesture() |
45 { | 45 { |
46 var form = document.createElement('form'); | 46 var form = document.createElement('form'); |
47 checkForEnumerableProperties(form); | 47 checkForEnumerableProperties(form); |
48 form.onautocompleteerror = errorWithReason('disabled'); | 48 form.onautocompleteerror = errorWithReason('disabled'); |
49 | 49 |
50 setTimeout(function() | 50 requestAnimationFrame(function() |
51 { | 51 { |
52 form.requestAutocomplete(); | 52 form.requestAutocomplete(); |
53 }, 0); | 53 }); |
54 } | 54 } |
55 | 55 |
56 function checkParsedAttributes() | 56 function checkParsedAttributes() |
57 { | 57 { |
58 var form = document.forms[0]; | 58 var form = document.forms[0]; |
59 if (!form || !form.onautocompleteerror || form.autocomplete != 'off') | 59 if (!form || !form.onautocompleteerror || form.autocomplete != 'off') |
60 testFailed('failed to pick up parsed DOM attributes correctly'); | 60 testFailed('failed to pick up parsed DOM attributes correctly'); |
61 checkForEnumerableProperties(form); | 61 checkForEnumerableProperties(form); |
62 | 62 |
63 form.requestAutocomplete(); | 63 form.requestAutocomplete(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 window.addEventListener('load', runTests, true); | 131 window.addEventListener('load', runTests, true); |
132 </script> | 132 </script> |
133 </head> | 133 </head> |
134 <body> | 134 <body> |
135 <p> <a href="https://code.google.com/p/chromium/issues/detail?id=159537">HTMLFor
mElement#requestAutocomplete and associated events</a> </p> | 135 <p> <a href="https://code.google.com/p/chromium/issues/detail?id=159537">HTMLFor
mElement#requestAutocomplete and associated events</a> </p> |
136 <p> For this test to pass, you should see all PASSED below. </p> | 136 <p> For this test to pass, you should see all PASSED below. </p> |
137 <form autocomplete="off" onautocompleteerror="onError();"></form> | 137 <form autocomplete="off" onautocompleteerror="onError();"></form> |
138 <p id="console"></p> | 138 <p id="console"></p> |
139 </body> | 139 </body> |
140 </html> | 140 </html> |
OLD | NEW |