Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / dispatch-event-no-document.html
blobccee7f8a3b37323b269ee117c1a68a76044b0939
1 <script>
2 function handleEvent(message) {
3 document.getElementById("log").innerHTML = "PASS: " + message + " handled.<br>";
6 function test() {
7 if (window.testRunner) {
8 testRunner.dumpAsText();
11 var doctype = document.implementation.createDocumentType(
12 'html',
13 '-//W3C//DTD XHTML 1.0 Strict//EN',
14 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
17 var evt = document.createEvent("Event");
18 evt.initEvent("generic", true, true);
19 doctype.addEventListener("generic", function () { handleEvent("generic")}, false);
20 doctype.dispatchEvent(evt);
22 </script>
23 <body onload="test()">
24 <p>The test verifies that EventTarget with an event listener not inserted into a Document does not crash during an attempt to dispatch an event.</p>
25 <p>Test passes if there is no crash, and event is dispatched.</p>
26 <div id="log">FAIL</div>