Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / event-fire-disconnected-bubbling-click.html
blobfb3bf3eb89ec9af2e01f03336527f76245d57035
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Click events should propagate in disconnected DOM trees.");
10 var clickedOnParent = false;
11 var clickedOnChild = false;
13 var parent = document.createElement('div');
14 var child = document.createElement('div');
15 parent.appendChild(child);
16 parent.addEventListener('click', function(e) { clickedOnParent = true; } );
17 child.addEventListener('click', function(e) { clickedOnChild = true; } );
18 child.click();
20 shouldBeTrue("clickedOnParent");
21 shouldBeTrue("clickedOnChild");
22 </script>
23 </body>
24 </html>