~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to ManualTests/leak-cycle-observer-wrapper.html

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html>
 
2
 
 
3
<p>
 
4
    Tests that reference cycles between the observer and the callback do not
 
5
    create leaks.
 
6
</p>
 
7
 
 
8
<script>
 
9
    if (window.testRunner)
 
10
        testRunner.dumpAsText();
 
11
 
 
12
    function leak() {
 
13
        var observer = new WebKitMutationObserver(function() { observer.disconnect(); });
 
14
    }
 
15
 
 
16
    for (i=0; i < 1000; i++) leak();
 
17
    gc();
 
18
</script>