Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / interactive-validation-remove-node-in-handler.html
blobf75f027b2753f4f1d215625b7f7f8bc793ea5583
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <form id=f action="interactive-validation-remove-node-in-handler.html">
10 <input type=hidden name=submitted value="true">
11 <input name=i0 required id="i0">
12 <input type=submit id="s">
13 </form>
14 <script>
15 description('Should not crash or have an assertion failure if a node was removed during an "invalid" event dispatching for the node.');
17 function handler(event) {
18 var node = event.target;
19 node.parentNode.removeChild(node);
20 gc();
23 function startOrVerify() {
24 document.getElementById('i0').addEventListener('invalid', handler, false);
25 var query = window.location.search;
26 if (query.indexOf('submitted=true') != -1) {
27 testPassed('The form was submitted.');
28 debug('TEST COMPLETE');
29 if (window.testRunner)
30 testRunner.notifyDone();
31 } else {
32 // HTMLFormElement::submit() skips validation. Use the submit button.
33 document.getElementById('s').click();
34 // Should have no assertion failures.
35 testFailed('The form should be submitted.');
39 if (window.testRunner)
40 testRunner.waitUntilDone();
41 window.onload = startOrVerify;
42 </script>
43 </body>
44 </html>