|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=344830 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 344830</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=344830">Mozilla Bug 344830</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: block"> |
|
15 <embed name="svg1" |
|
16 width="200" height="200" |
|
17 type="image/svg+xml" |
|
18 src="bug344830_testembed.svg"> |
|
19 </div> |
|
20 <pre id="test"> |
|
21 <script class="testbody" type="text/javascript"> |
|
22 |
|
23 /** Test for Bug 344830 **/ |
|
24 function getSVG() { |
|
25 var embed = document.embeds["svg1"]; |
|
26 var svgDocument = embed.getSVGDocument(); |
|
27 var element = svgDocument.getElementById("g1"); |
|
28 ok(embed, "document.embeds[] works with SVG"); |
|
29 ok(svgDocument, "document.embeds[] works with SVG and embed.getSVGDocument()"); |
|
30 ok(element, "document.embeds[] works with SVG and svgDocument.getElementById()"); |
|
31 SimpleTest.finish(); |
|
32 } |
|
33 addLoadEvent(getSVG); |
|
34 SimpleTest.waitForExplicitFinish() |
|
35 |
|
36 |
|
37 </script> |
|
38 </pre> |
|
39 </body> |
|
40 </html> |
|
41 |