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