1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/svg/rootElement-null-01.svg Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" 1.9 + onload="handleLoad(evt);"> 1.10 + 1.11 + <title>Testcase for accessing null rootContent</title> 1.12 + 1.13 + <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=365611 --> 1.14 + 1.15 + <script type="application/ecmascript"> 1.16 + <![CDATA[ 1.17 + 1.18 +function handleLoad(event) 1.19 +{ 1.20 + var root = document.removeChild(document.rootElement); 1.21 + if (document.rootElement == null) { // this shouldn't crash 1.22 + document.appendChild(root); 1.23 + document.getElementById('rect').setAttribute('fill', 'lime'); 1.24 + } 1.25 +} 1.26 + 1.27 + ]]> 1.28 + </script> 1.29 + 1.30 + <rect id="rect" width="100%" height="100%" fill="red"/> 1.31 + 1.32 +</svg>