Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / activate-and-disabled-elements.html
blobf7cbd35b02db4944a8fe462f399b66f395a57fbd
1 <html>
2 <head>
3 <script>
5 function dispatchActivateEvent(target) {
6 // Create a DOMActivate event and dispatch it
7 var event = document.createEvent('UIEvents');
8 event.initUIEvent('DOMActivate', true, true, window, 1)
9 target.dispatchEvent(event);
12 function runTest() {
13 if (window.testRunner)
14 testRunner.dumpAsText();
16 var button = document.getElementById('button');
17 var input = document.getElementById('input');
19 onsubmitCalled = false;
21 dispatchActivateEvent(button);
22 dispatchActivateEvent(input);
24 if (!onsubmitCalled)
25 document.getElementById('result').innerHTML = 'SUCCESS'
27 </script>
28 </head>
29 <body onload="runTest()">
30 <form onsubmit="onsubmitCalled = true; return false">
31 <button id="button" disabled>Disabled button</button>
32 <input id="input" type="submit" disabled>
33 </form>
34 This tests that disabled form elements don't call submit when they receive a DOMActivate event. If this test is successful, the text "SUCCESS" should be shown below.
35 <div id="result">FAILURE</div>
36 </body>
37 </html>