layout/generic/test/test_bug344830.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/generic/test/test_bug344830.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=344830
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 344830</title>
    1.11 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.13 +</head>
    1.14 +<body>
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=344830">Mozilla Bug 344830</a>
    1.16 +<p id="display"></p>
    1.17 +<div id="content" style="display: block">
    1.18 +  <embed name="svg1"
    1.19 +         width="200" height="200"
    1.20 +         type="image/svg+xml"
    1.21 +         src="bug344830_testembed.svg">
    1.22 +</div>
    1.23 +<pre id="test">
    1.24 +<script class="testbody" type="text/javascript">
    1.25 +
    1.26 +/** Test for Bug 344830 **/
    1.27 +function getSVG() {
    1.28 + var embed = document.embeds["svg1"];
    1.29 + var svgDocument = embed.getSVGDocument();
    1.30 + var element = svgDocument.getElementById("g1");
    1.31 + ok(embed, "document.embeds[] works with SVG");
    1.32 + ok(svgDocument, "document.embeds[] works with SVG and embed.getSVGDocument()");
    1.33 + ok(element, "document.embeds[] works with SVG and svgDocument.getElementById()");
    1.34 + SimpleTest.finish();
    1.35 +}
    1.36 +addLoadEvent(getSVG);
    1.37 +SimpleTest.waitForExplicitFinish()
    1.38 +
    1.39 +
    1.40 +</script>
    1.41 +</pre>
    1.42 +</body>
    1.43 +</html>
    1.44 +

mercurial