[iOS] Unreviewed gardening.
[WebKit-https.git] / LayoutTests / fast / events / touch / ios / content-observation / opacity-change-happens-on-mousemove-with-opacity-and-left.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 mousemove 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     position: absolute;
15     opacity: 0;
16     left: -200px;
17     width: 100px;
18     height: 100px;
19     background-color: green;
20         transition-property: opacity, left;
21         transition-duration: 100ms, 200ms;
22 }
23 </style>
24 <script>
25 async function test() {
26     if (!window.testRunner || !testRunner.runUIScript)
27         return;
28     if (window.internals)
29         internals.settings.setContentChangeObserverEnabled(true);
30
31     testRunner.waitUntilDone();
32     testRunner.dumpAsText();
33
34     let rect = tapthis.getBoundingClientRect();
35     let x = rect.left + rect.width / 2;
36     let y = rect.top + rect.height / 2;
37
38     await tapAtPoint(x, y);
39 }
40 </script>
41 </head>
42 <body onload="test()">
43 <div id=tapthis>PASS if 'clicked' text is not shown below.</div>
44 <div id=becomesVisible></div>
45 <pre id=result></pre>
46 <script>
47 tapthis.addEventListener("mousemove", function( event ) {
48     becomesVisible.style.opacity = "1";
49     becomesVisible.style.left = "100px";
50     if (window.testRunner)
51         setTimeout("testRunner.notifyDone()", 250);
52 }, false);
53
54 becomesVisible.addEventListener("click", function( event ) {   
55     result.innerHTML = "clicked hidden";
56 }, false);
57
58 tapthis.addEventListener("click", function( event ) {   
59     result.innerHTML = "clicked";
60 }, false);
61 </script>
62 </body>
63 </html>