Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / html / details-click-controls.html
blob10e3e8af435b749f2bcfe13e7405f11b04749e6a
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <details id="d">
7 <summary>
8 <input type="button" value="button" id="buttonControl">
9 <input type="text" value="text" id="textControl">
10 <textarea value="textarea" id="textareaControl"></textarea>
11 <div id="block">This is clickable summary text</div>
12 </summary>
13 This is a detail.
14 </details>
15 <script>
16 function clickOn(id)
18 var control = document.getElementById(id);
19 var x = control.offsetLeft;
20 var y = control.offsetTop;
21 var delta = 5;
22 eventSender.mouseMoveTo(x + delta, y + delta);
23 eventSender.mouseDown();
24 eventSender.mouseUp();
27 if (window.eventSender) {
28 details = document.getElementById("d");
29 shouldBeFalse("details.open");
30 clickOn("buttonControl");
31 shouldBeFalse("details.open");
32 clickOn("textControl");
33 shouldBeFalse("details.open");
34 clickOn("textareaControl");
35 shouldBeFalse("details.open");
36 clickOn("block");
37 shouldBeTrue("details.open");
38 details.style.display = "none";
42 </script>
43 </body>
44 </html>