<!DOCTYPE html>
<html>
<div id="result"></div>
<style>
#test {}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var count = 0;
function setResult()
{
if (count == 1)
result.innerHTML = "PASS";
else
result.innerHTML = "FAIL";
}
test = document.createElement('div');
test.addEventListener('DOMSubtreeModified', function() { count++; setResult(); }, false)
test.setAttribute('class', 'test');
</script>
</html>