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