2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 https://bugzilla.mozilla.org/show_bug.cgi?id=483389
7 <title>Test for Bug
483389</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=483389">Mozilla Bug
483389</a>
14 <div id=
"content" style=
"display: none"></div>
16 <iframe id=
"svg" src=
"viewport-helper.svg"></iframe>
19 <script class=
"testbody" type=
"application/javascript">
20 SimpleTest.waitForExplicitFinish();
23 var doc = $(
"svg").contentWindow.document;
25 var root = doc.documentElement;
26 var inner = doc.getElementById(
"inner");
27 var g1 = doc.getElementById(
"g1");
28 var outer = doc.getElementById(
"outer");
29 var g2 = doc.getElementById(
"g2");
30 var g3 = doc.getElementById(
"g3");
31 var sym = doc.getElementById(
"sym");
32 var symbolRect = doc.getElementById(
"symbolRect");
34 <!-- ownerSVGElement -->
35 is(root.ownerSVGElement, null,
"root.ownerSVGElement");
36 is(inner.ownerSVGElement, root,
"inner.ownerSVGElement");
37 is(g1.ownerSVGElement, inner,
"g1.ownerSVGElement");
38 is(outer.ownerSVGElement, null,
"outer.ownerSVGElement");
39 is(g2.ownerSVGElement, outer,
"g2.ownerSVGElement");
40 is(g3.ownerSVGElement, null,
"g3.ownerSVGElement");
41 is(symbolRect.ownerSVGElement, root,
"symbolRect.ownerSVGElement");
43 <!-- viewportElement -->
44 is(root.viewportElement, null,
"root.viewportElement");
45 is(inner.viewportElement, root,
"inner.viewportElement");
46 is(g1.viewportElement, inner,
"g1.viewportElement");
47 is(outer.viewportElement, null,
"outer.viewportElement");
48 is(g2.viewportElement, outer,
"g2.viewportElement");
49 is(g3.viewportElement, null,
"g3.viewportElement");
50 is(symbolRect.viewportElement, sym,
"symbolRect.viewportElement");
55 window.addEventListener(
"load", runTest);