[iOS] Unreviewed gardening.
[WebKit-https.git] / LayoutTests / fast / events / touch / ios / content-observation / tap-on-input-type-button-element.html
1 <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <title>This tests the case when the tap target node is a form control element.</title>
5 <script src="../../../../../resources/basic-gestures.js"></script>
6 <style>
7 #becomesVisible {
8     visibility: hidden;
9     width: 100px;
10     height: 100px;
11     background-color: green;
12         transition-property: opacity, left;
13         transition-duration: 100ms, 200ms;
14 }
15 </style>
16 <script>
17 async function test() {
18     if (!window.testRunner || !testRunner.runUIScript)
19         return;
20     if (window.internals)
21         internals.settings.setContentChangeObserverEnabled(true);
22
23     testRunner.waitUntilDone();
24     testRunner.dumpAsText();
25
26     let rect = tapthis.getBoundingClientRect();
27     let x = rect.left + rect.width / 2;
28     let y = rect.top + rect.height / 2;
29
30     await tapAtPoint(x, y);
31 }
32 </script>
33 </head>
34 <body onload="test()">
35 PASS if 'clicked' text is shown below.<br>
36 <input type="button" value="tap this button" id=tapthis>
37 <div id=becomesVisible></div>
38 <pre id=result></pre>
39 <script>
40 tapthis.addEventListener("mousemove", function( event ) {
41     becomesVisible.style.visibility = "visible";
42 }, false);
43
44 becomesVisible.addEventListener("click", function( event ) {   
45     result.innerHTML = "clicked hidden";
46 }, false);
47
48 tapthis.addEventListener("click", function( event ) {   
49     result.innerHTML = "clicked";
50     if (window.testRunner)
51         testRunner.notifyDone();
52 }, false);
53 </script>
54 </body>
55 </html>