diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /dom/svg/test/test_viewport.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/svg/test/test_viewport.html')
-rw-r--r-- | dom/svg/test/test_viewport.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/dom/svg/test/test_viewport.html b/dom/svg/test/test_viewport.html new file mode 100644 index 0000000000..66f8926fe0 --- /dev/null +++ b/dom/svg/test/test_viewport.html @@ -0,0 +1,59 @@ +<!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 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"); + + SimpleTest.finish(); +} + +window.addEventListener("load", runTest); +</script> +</pre> +</body> +</html> |