Bug 1941128 - Turn off network.dns.native_https_query on Mac again
[gecko.git] / dom / svg / test / tearoff_with_cc_helper.html
blob6d63e939fe882688c93e47efd4b0cedbc7528c57
1 <!DOCTYPE html>
2 <html>
3 <body onload="go()">
4 <svg id="outerSvg" width="50%" height="50%"
5 style="border: 1px solid black">
6 </svg>
7 <script type="application/javascript">
8 /* I'm not sure what exactly was required to trigger bug 1288228's crash,
9 * but it involved tweaking a length's specified units and cycle-collecting
10 * and reloading (in some combination). So, we'll tweak the units and
11 * cycle-collect a few times, and message the outer page to reload us
12 * after we've made the first tweak.
14 const maxTweaks = 5;
15 let remainingTweaks = maxTweaks;
17 var savedBaseVal = document.getElementById("outerSvg").width.baseVal;
18 function go() {
19 window.parent.SpecialPowers.DOMWindowUtils.cycleCollect();
20 tweak();
23 function tweak() {
24 console.log("tweaked");
25 savedBaseVal.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX);
26 savedBaseVal.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE);
27 if (remainingTweaks == maxTweaks) {
28 window.parent.postMessage("ping", "*"); // only do this on first tweak
30 if (--remainingTweaks) {
31 setTimeout(tweak, 0);
34 </script>
35 </body>
36 </html>