OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <div>Test passes if it does not crash</div> | 2 <div>Test passes if it does not crash</div> |
3 <script src="../../../resources/gc.js"></script> | 3 <script src="../../../resources/gc.js"></script> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 } | 8 } |
9 var observer = new MutationObserver(function() {console.log('Should not appear')
}); | 9 var observer = new MutationObserver(function() {console.log('Should not appear')
}); |
10 var div = document.createElement('div'); | 10 var div = document.createElement('div'); |
11 observer.observe(div, {attributes: true}); | 11 observer.observe(div, {attributes: true}); |
12 div.id = 'foo'; | 12 div.id = 'foo'; |
13 div = null; | 13 div = null; |
14 observer = null; | 14 observer = null; |
15 gc(); | 15 gc(); |
16 setTimeout(function() { testRunner.notifyDone(); }, 0); | 16 setTimeout(function() { testRunner.notifyDone(); }, 0); |
17 </script> | 17 </script> |
OLD | NEW |