3 <script language="javascript">
\r
6 document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
\r
9 function mouseOver(event)
\r
11 if (event === null) {
\r
12 log("FAIL: After MouseEvent, event is null");
\r
14 log("PASS: After MouseEvent, event is valid");
\r
18 function runTest() {
\r
19 var target = document.getElementById("target");
\r
20 var newEvent = document.createEvent("MouseEvent");
\r
21 newEvent.initMouseEvent("mouseover", false, false, window, 0, 10, 10, 10, 10, false, false, false, false, 0, target);
\r
22 target.dispatchEvent(newEvent);
\r
24 if (window.testRunner) {
\r
25 testRunner.dumpAsText();
\r
31 <body onLoad="runTest();">
\r
32 <div id="target" onMouseOver="mouseOver(event);">This test will trigger a mouse over of this element.
\r
33 We will then check to see if event was properly set (i.e., not null).
\r
34 This is in response to a v8 bug that can break window.event exposure if the client tries to manually set event.</div>
\r
35 <div id="console"></div>
\r
37 if (!(event === undefined)) {
\r
38 log("FAIL: event does not begin as undefined");
\r
41 if (!(event === null)) {
\r
42 log("FAIL: event was not successfully set to null");
\r