| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="resources/polyfill.js"></script> | |
| 3 | 2 |
| 4 <p>Validation won't be shown if Shadow DOM does not have a shadow element.</p> | 3 <p>Validation won't be shown if Shadow DOM does not have a shadow element.</p> |
| 5 <form id='form' action="input-with-validation-without-shadow.html"> | 4 <form id='form' action="input-with-validation-without-shadow.html"> |
| 6 <input id=password type=password required maxlength=20 title="Needs at least 8 l
etters.
Should not be identical with the current password."> | 5 <input id=password type=password required maxlength=20 title="Needs at least 8 l
etters.
Should not be identical with the current password."> |
| 7 <input type=submit id=submit> | 6 <input type=submit id=submit> |
| 8 </form> | 7 </form> |
| 9 | 8 |
| 10 <script> | 9 <script> |
| 11 function doTest() { | 10 function doTest() { |
| 12 var input = document.getElementById('password'); | 11 var input = document.getElementById('password'); |
| 13 var shadowRoot = input.webkitCreateShadowRoot(); | 12 var shadowRoot = input.webkitCreateShadowRoot(); |
| 14 | 13 |
| 15 document.getElementById('submit').click(); | 14 document.getElementById('submit').click(); |
| 16 if (window.testRunner) { | 15 if (window.testRunner) { |
| 17 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
| 18 setTimeout(function() { | 17 setTimeout(function() { |
| 19 testRunner.notifyDone(); | 18 testRunner.notifyDone(); |
| 20 }, 10); | 19 }, 10); |
| 21 } | 20 } |
| 22 } | 21 } |
| 23 | 22 |
| 24 try { | 23 try { |
| 25 doTest() | 24 doTest() |
| 26 } catch (e) { | 25 } catch (e) { |
| 27 if (window.testRunner) | 26 if (window.testRunner) |
| 28 testRunner.notifyDone(); | 27 testRunner.notifyDone(); |
| 29 } | 28 } |
| 30 </script> | 29 </script> |
| 31 | 30 |
| OLD | NEW |