<html>
<head>
<title></title>
</head>
<body>
<p>
Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=12782">http://bugs.webkit.org/show_bug.cgi?id=12782</a>
Reproducible crash in BidiContext::deref</i>.
</p>
<p>
No assertion failure means SUCCESS.
</p>
<div id="target1"><span>foo</span><div></div><span>bar</span></div>
<div id="target2"><div></div><span>baz</span></div>
<script>
document.body.offsetTop;
var target1 = document.getElementById("target1");
target1.removeChild(target1.childNodes[1]);
target1.removeChild(target1.childNodes[1]);
var target2 = document.getElementById("target2");
target2.removeChild(target2.firstChild);
target2.removeChild(target2.firstChild);
</script>
</body>
</html>