1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
10 description("Tests that HTMLFrameElement and HTMLIFrameElement expose a getSVGDocument accessor");
12 window
.jsTestIsAsync
= true;
13 if (window
.testRunner
)
14 testRunner
.waitUntilDone();
21 function startTest() {
22 frame
= document
.createElement("frame");
23 frame
.onload
= continueTest1
;
24 frame
.src
= "resources/getsvgdocument.svg";
25 document
.documentElement
.appendChild(frame
);
26 shouldBeTrue("!!frame.getSVGDocument");
29 var continueTest1 = function() {
30 shouldBeEqualToString("frame.getSVGDocument().toString()", "[object XMLDocument]");
31 frame
.parentNode
.removeChild(frame
);
33 iframe
= document
.createElement("iframe");
34 iframe
.onload
= continueTest2
;
35 iframe
.src
= "resources/getsvgdocument.svg";
36 document
.documentElement
.appendChild(iframe
);
37 shouldBeTrue("!!iframe.getSVGDocument");
40 var continueTest2 = function() {
41 shouldBeEqualToString("iframe.getSVGDocument().toString()", "[object XMLDocument]");
42 iframe
.parentNode
.removeChild(iframe
);
44 embed
= document
.createElement("embed");
45 embed
.onload
= continueTest3
;
46 embed
.src
= "resources/getsvgdocument.svg";
47 document
.documentElement
.appendChild(embed
);
48 shouldBeTrue("!!embed.getSVGDocument");
51 var continueTest3 = function(event
) {
52 shouldBeEqualToString("embed.getSVGDocument().toString()", "[object XMLDocument]");
53 embed
.parentNode
.removeChild(embed
);
55 object
= document
.createElement("object");
56 object
.onload
= continueTest4
;
57 object
.data
= "resources/getsvgdocument.svg";
58 document
.documentElement
.appendChild(object
);
59 shouldBeTrue("!!object.getSVGDocument");
62 function continueTest4() {
63 shouldBeEqualToString("object.getSVGDocument().toString()", "[object XMLDocument]");
64 object
.parentNode
.removeChild(object
);