3 <title>WebKit Bug
47314</title>
8 testRunner
.dumpAsText();
10 var frameset
= document
.getElementById("frameset");
11 var mouseClick
= document
.createEvent("MouseEvent");
12 mouseClick
.initEvent("click", true, true);
13 frameset
.dispatchEvent(mouseClick
);
15 if (!window
.testRunner
) {
16 // For some reason, when running this test by hand in release builds you must manually
17 // click on the not-found image placeholder to cause a crash. Hence, we don't replace
18 // the <frameset> and print a PASS message.
22 // As per the definition of the body element in section 3.1.4 the HTML 5 spec.
23 // <http://www.w3.org/TR/html5/dom.html#the-body-element>, a document can either
24 // have a <frameset> or a <body>, but not both, and a frameset does not provide
25 // a means to print a PASS message. Therefore, we replace <frameset> with <body>.
26 var htmlElement
= document
.getElementsByTagName("html")[0];
27 htmlElement
.replaceChild(document
.createElement("body"), frameset
);
28 document
.body
.appendChild(document
.createTextNode("PASS, mouse event to <frameset> did not cause crash."));
31 window
.onload
= runTest
;
34 <!-- This tests that we don't crash when clicking on a <frameset> that specifies the CSS content property. -->
35 <!-- This test PASSED if you see the word "PASS" on the page. Otherwise, it FAILED. -->
36 <!-- Note: If you are running this test by hand in a release build then try clicking on the not-found image placeholder to cause a crash. -->
37 <frameset id=
"frameset" style=
"content:url(click-to-crash.jpg)"></frameset>