Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / onsubmit-bubbling.html
blobe709c07f894e6b98dae3492b59708942b0d29cb1
1 <html>
2 <head>
3 <script>
4 function print(message, color)
6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace";
9 if (color)
10 paragraph.style.color = color;
11 document.getElementById("console").appendChild(paragraph);
14 function test()
16 if (window.testRunner)
17 testRunner.dumpAsText();
20 document.getElementById('div1').onsubmit = function () {
21 pass(this.id);
22 return false; // returning false cancels form submission
24 document.getElementById('input1').click();
27 function pass(id)
29 print("PASS: containing element " + id + " caught submit event", "green");
32 function fail()
34 print("FAIL: containing element did not cancel submit event", "red");
37 </script>
38 </head>
39 <body onload="test();">
40 <p>This page tests whether the form 'submit' event bubbles to containing elements.
41 If it passes, you'll see 'PASS' messages below.</p>
42 <hr>
43 <div id='console'></div>
44 <div id="div1">
45 <div id="div2" onsubmit="pass(this.id);">
46 <form id="form1" action="javascript:fail();"> <!-- only executes if form submits -->
47 <input id="input1" type="submit">
48 </form>
49 </div>
50 </div>
51 </body>
52 </html>