blob: d7130bf9bdd208ef8d16568f0e27ba0ce9ac9326 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<div id="parentNode">
<div id="previousSibling"></div><div id="target"><div id="firstChild"></div><div id="lastChild"></div></div><div id="nextSibling"></div>
</div>
<script>
description('Test DOMJIT accessors will handle different heap accesses correctly.');
function test()
{
var target = document.getElementById('target');
var firstChild = document.getElementById('firstChild');
var lastChild = document.getElementById('lastChild');
for (var i = 0; i < 1e4; ++i) {
var ret = target.firstChild === firstChild;
ret &= target.lastChild === lastChild;
ret &= target.firstChild === firstChild;
ret &= target.lastChild === lastChild;
if (!ret)
return false;
}
return true;
}
shouldBeTrue(`test()`);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>