4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
10 var line
= document
.createElement('div');
11 line
.appendChild(document
.createTextNode(msg
));
12 document
.getElementById('console').appendChild(line
);
16 var target
= frames
[1].window
;
17 var newEvent
= frames
[1].document
.createEvent("MouseEvent");
18 newEvent
.initMouseEvent("mouseover", false, false, window
, 0, 10, 10, 10, 10, false, false, false, false, 0, target
);
19 target
.dispatchEvent(newEvent
);
23 var testStarted
= false;
29 frames
[0].location
= "javascript:" +
30 "window.myeventnull = function() { parent.frames[1].window.event = null; };" +
31 "window.myeventreal = function() { parent.frames[1].window.event = parent.getEvent(); };" +
32 "parent.log('Helpers loaded!\\n');" +
33 "parent.setTimeout('continueTest()', 10);";
36 function continueTest() {
37 log('--- Test begins ---\n');
38 log('window.event = ' + frames
[1].window
.event
+ '\n');
39 log('--- After window.event = null ---\n');
40 frames
[0].myeventnull();
41 log('window.event = ' + frames
[1].window
.event
+ '\n');
42 log('--- After MouseEvent completes ---\n');
43 frames
[0].myeventreal();
44 log('window.event = ' + frames
[1].window
.event
+ '\n');
45 log('--- Test ends ---\n');
47 testRunner
.notifyDone();
51 <body onload=
"doTest()">
52 <iframe src=
"about:blank"></iframe>
53 <iframe src=
""></iframe>
54 <div id=
"console"></div>