summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/inline-event-attributes-moved.html
blob: 97d7b89c3dd728010749f861b5033ac4492db5b9 (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
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>

description('Tests that we have the expected form in scope');

function dispatchClick(element)
{
    var clickEvent = document.createEvent('MouseEvent');
    clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
    element.dispatchEvent(clickEvent);
}

var expected;
var f = document.createElement('form');
var i = f.appendChild(document.createElement('input'));
i.setAttribute('onclick', 'expected = typeof action');
f.removeChild(i);
f = null;
gc();
dispatchClick(i);
shouldBeEqualToString('expected', 'undefined');

</script>