summaryrefslogtreecommitdiffstats
path: root/dom/svg/test/test_viewport.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/svg/test/test_viewport.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/svg/test/test_viewport.html')
-rw-r--r--dom/svg/test/test_viewport.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/dom/svg/test/test_viewport.html b/dom/svg/test/test_viewport.html
new file mode 100644
index 000000000..ca8da0497
--- /dev/null
+++ b/dom/svg/test/test_viewport.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=483389
+-->
+<head>
+ <title>Test for Bug 483389</title>
+ <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=483389">Mozilla Bug 483389</a>
+<p id="display"></p>
+<div id="content" style="display: none"></div>
+
+<iframe id="svg" src="viewport-helper.svg"></iframe>
+
+<pre id="test">
+<script class="testbody" type="application/javascript">
+SimpleTest.waitForExplicitFinish();
+
+function runTest()
+{
+ var doc = $("svg").contentWindow.document;
+
+ var root = doc.documentElement;
+ var inner = doc.getElementById("inner");
+ var g1 = doc.getElementById("g1");
+ var outer = doc.getElementById("outer");
+ var g2 = doc.getElementById("g2");
+ var g3 = doc.getElementById("g3");
+ var sym = doc.getElementById("sym");
+ var symbolRect = doc.getElementById("symbolRect");
+
+ <!-- ownerSVGElement -->
+ is(root.ownerSVGElement, null, "root.ownerSVGElement");
+ is(inner.ownerSVGElement, root, "inner.ownerSVGElement");
+ is(g1.ownerSVGElement, inner, "g1.ownerSVGElement");
+ is(outer.ownerSVGElement, null, "outer.ownerSVGElement");
+ is(g2.ownerSVGElement, outer, "g2.ownerSVGElement");
+ is(g3.ownerSVGElement, null, "g3.ownerSVGElement");
+ is(symbolRect.ownerSVGElement, root, "symbolRect.ownerSVGElement");
+
+ <!-- viewportElement -->
+ is(root.viewportElement, null, "root.viewportElement");
+ is(inner.viewportElement, root, "inner.viewportElement");
+ is(g1.viewportElement, inner, "g1.viewportElement");
+ is(outer.viewportElement, null, "outer.viewportElement");
+ is(g2.viewportElement, outer, "g2.viewportElement");
+ is(g3.viewportElement, null, "g3.viewportElement");
+ is(symbolRect.viewportElement, sym, "symbolRect.viewportElement");
+
+ <!-- nearestViewportElement -->
+ is(root.nearestViewportElement, null, "root.nearestViewportElement");
+ is(inner.nearestViewportElement, root, "inner.nearestViewportElement");
+ is(g1.nearestViewportElement, inner, "g1.nearestViewportElement");
+ is(outer.nearestViewportElement, null, "outer.nearestViewportElement");
+ is(g2.nearestViewportElement, outer, "g2.nearestViewportElement");
+ is(g3.nearestViewportElement, null, "g3.nearestViewportElement");
+ is(symbolRect.nearestViewportElement, sym, "symbolRect.nearestViewportElement");
+
+ <!-- farthestViewportElement -->
+ is(root.farthestViewportElement, null, "root.farthestViewportElement");
+ is(inner.farthestViewportElement, root, "inner.farthestViewportElement");
+ is(g1.farthestViewportElement, root, "g1.farthestViewportElement");
+ is(outer.farthestViewportElement, null, "outer.farthestViewportElement");
+ is(g2.farthestViewportElement, outer, "g2.farthestViewportElement");
+ is(g3.farthestViewportElement, null, "g3.farthestViewportElement");
+ is(symbolRect.farthestViewportElement, root, "symbolRect.farthestViewportElement");
+
+ SimpleTest.finish();
+}
+
+window.addEventListener("load", runTest, false);
+</script>
+</pre>
+</body>
+</html>