summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/context-menu-leak-document.html
blob: c850fa0165c4738fa83bd8d0abd0733d06631543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<body>
    <script id='targetHTML' type='text/html'>
        <div id="target" contentEditable style='width:100px; height:100px;'></div>
    </script>

    <script id='targetJS' type='text/html'>
        var target = document.getElementById('target');
        var x = target.offsetParent.offsetLeft + target.offsetLeft + 5;
        var y = target.offsetParent.offsetTop + target.offsetTop + target.offsetHeight / 2;
        eventSender.mouseMoveTo(x, y);
        eventSender.contextClick();
    </script>

    <script src="../fast/js/resources/js-test-pre.js"></script>
    <script src="../fast/js/resources/leak-check.js"></script>
    <script>
        var target = grabScriptText('targetHTML')+
                     '<script>'+grabScriptText('targetJS')+'<'+'/script>';
        var tolerance = {'numberOfLiveDocuments': 0};

        doLeakTest(htmlToUrl(target), tolerance);
    </script>
    <script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>