layout/reftests/svg/sizing/dynamic--object-svg-unloaded-a.svg

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 <!--
michael@0 2 Any copyright is dedicated to the Public Domain.
michael@0 3 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 4 -->
michael@0 5 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="70" height="70"
michael@0 6 onload="handle_load(evt);">
michael@0 7
michael@0 8 <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
michael@0 9
michael@0 10 <title>SVG embedded by reference by dynamic--object-svg-unloaded.xhtml</title>
michael@0 11
michael@0 12 <script type="text/javascript">
michael@0 13
michael@0 14 var embedding_element;
michael@0 15
michael@0 16 function handle_load(e)
michael@0 17 {
michael@0 18 embedding_element = e.originalTarget.ownerDocument.defaultView.frameElement;
michael@0 19 top.document.addEventListener("MozReftestInvalidate", load_new_page, false);
michael@0 20 }
michael@0 21
michael@0 22 function load_new_page()
michael@0 23 {
michael@0 24 // We could set embedding_element.data to load the new page, but that:
michael@0 25 //
michael@0 26 // a) Crashes if we don't use setTimeout
michael@0 27 //
michael@0 28 // b) Actually works, perhaps because it takes a different code path to the
michael@0 29 // path that's taken when a user clicks on a link in the embedded SVG
michael@0 30 //
michael@0 31 // For these reasons we set document.location.href on the SVG document.
michael@0 32
michael@0 33 document.location.href = 'dynamic--object-svg-unloaded-b.xhtml';
michael@0 34 }
michael@0 35
michael@0 36 </script>
michael@0 37
michael@0 38 <rect width="100%" height="100%" fill="red"/>
michael@0 39
michael@0 40 </svg>

mercurial