chromium/third_party/blink/manual_tests/leak-cycle-observer-wrapper.html

<!DOCTYPE html>

<p>
    Tests that reference cycles between the observer and the callback do not
    create leaks.
</p>

<script>
    if (window.testRunner)
        testRunner.dumpAsText();

    function leak() {
        var observer = new WebKitMutationObserver(function() { observer.disconnect(); });
    }

    for (i=0; i < 1000; i++) leak();
    gc();
</script>