| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 | |
| 5 <style> | |
| 6 #touchElement { | |
| 7 width: 20px; | |
| 8 height: 20px; | |
| 9 } | |
| 10 </style> | |
| 11 | |
| 12 </head> | |
| 13 <body> | |
| 14 | |
| 15 <p id="description"> | |
| 16 This tests checks that deferred compositing is still invoked when nothing except
touch hit rects change. | |
| 17 The trickiness is that touch hit rects cannot be recomputed until after composit
ing is updated, so | |
| 18 there is a risk of accidentally skipping updating touch rects unless we ping the
compositor correctly. | |
| 19 </p> | |
| 20 | |
| 21 <div id="touchElement"></div> | |
| 22 | |
| 23 <pre id="result"></pre> | |
| 24 | |
| 25 <script> | |
| 26 | |
| 27 function dummyListener() { } | |
| 28 | |
| 29 if (window.testRunner) | |
| 30 testRunner.dumpAsText(); | |
| 31 | |
| 32 if (window.internals) { | |
| 33 window.internals.settings.setForceCompositingMode(true); | |
| 34 window.internals.forceCompositingUpdate(document); | |
| 35 document.getElementById("touchElement").addEventListener("touchmove", dummyL
istener, false); | |
| 36 window.internals.forceCompositingUpdate(document); | |
| 37 | |
| 38 var rects = window.internals.touchEventTargetLayerRects(document); | |
| 39 if (rects && rects.length == 1) | |
| 40 document.getElementById("result").innerHTML = "PASS"; | |
| 41 else | |
| 42 document.getElementById("result").innerHTML = "FAIL"; | |
| 43 | |
| 44 } else { | |
| 45 document.getElementById("result").innerHTML = "This test can only be run a
s a layout test."; | |
| 46 } | |
| 47 | |
| 48 </script> | |
| 49 </body> | |
| OLD | NEW |