chromium/third_party/blink/web_tests/fast/js/select-options-remove-gc.html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<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");
</script>
</body>
</html>