Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / inline-event-attributes-moved.html
blob97d7b89c3dd728010749f861b5033ac4492db5b9
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
5 description('Tests that we have the expected form in scope');
7 function dispatchClick(element)
9 var clickEvent = document.createEvent('MouseEvent');
10 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
11 element.dispatchEvent(clickEvent);
14 var expected;
15 var f = document.createElement('form');
16 var i = f.appendChild(document.createElement('input'));
17 i.setAttribute('onclick', 'expected = typeof action');
18 f.removeChild(i);
19 f = null;
20 gc();
21 dispatchClick(i);
22 shouldBeEqualToString('expected', 'undefined');
24 </script>