5 // --- Convenience functions for testing.
7 var fbot
= document
.getElementById("fbot");
8 document
.title
= fbot
.contentDocument
.title
;
10 // Simulate the user clicking a link.
11 function clickLink(name
) {
12 var ftop
= document
.getElementById("ftop");
13 var node
= ftop
.contentDocument
.getElementById(name
);
14 var evt
= document
.createEvent("MouseEvents");
15 evt
.initMouseEvent("click", true, true, window
, 0, 0, 0, 0, 0,
16 false, false, false, false, 0, null);
17 node
.dispatchEvent(evt
);
19 // Simulate the user filling a form value.
20 function fillForm(name
, value
) {
21 var fbot
= document
.getElementById("fbot");
22 var node
= fbot
.contentDocument
.getElementById(name
);
25 // Simulate the user clicking on the submit button.
26 function submitForm(name
) {
27 var fbot
= document
.getElementById("fbot");
28 var node
= fbot
.contentDocument
.getElementById(name
);
32 var fbot
= document
.getElementById("fbot");
33 // This will set our title to the bottom frame, so we can test that
34 // we actually navigated.
35 fbot
.onload
= setTitle
;
40 <frameset onLoad=
"init()" rows=
"20%,80%" name=
"main">
41 <frame src=
"top.html" id=
"ftop" name=
"top">
42 <frame src=
"bot1.html" id=
"fbot" name=
"bottom">