Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/html/details-click-controls.html

Issue 2670273002: Move tests for DETAILS and SUMMARY elements to html/details_summary/. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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)
17 {
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();
25 }
26
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";
39 }
40
41
42 </script>
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698