blob: c5e7c885dd1a6e2def6559b967eaac935650f4c9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="resources/js-test-style.css">
<script src="resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<div>
<select id="myselect">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</div>
<script>
description("This test checks that removing a &lt;select&gt; object from the DOM, then garbage collecting, then removing an option from select.options doesn't crash.");
var select = document.getElementById("myselect");
var options = select.options;
select.parentNode.removeChild(select);
select = null;
// create lots of objects to force a garbage collection
var i = 0;
var s;
while (i < 5000) {
i = i+1.11;
s = s + " ";
}
options.remove(0);
testPassed("No crash");
successfullyParsed = true;
</script>
<script src="resources/js-test-post.js"></script>
</body>
</html>