| <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| |
| <html> |
| <meta name="viewport" content="initial-scale=5, width=device-width"> |
| <head> |
| <script src="../../../resources/ui-helper.js"></script> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| async function runTest() |
| { |
| if (!window.testRunner) |
| return; |
| |
| await UIHelper.zoomToScale(1.6); |
| let result = await UIHelper.zoomByDoubleTappingAt(15, 15); |
| document.getElementById("target").innerText = "The viewport zoomed to scale: " + Number(result); |
| testRunner.notifyDone(); |
| } |
| </script> |
| <style> |
| body { |
| margin: 0; |
| } |
| #target { |
| height: 100px; |
| width: 100px; |
| background-color: silver; |
| } |
| </style> |
| </head> |
| <body onload="runTest()"> |
| <div id="target"></div> |
| </body> |
| </html> |