| <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| |
| <html> |
| <meta name="viewport" content="initial-scale=5, width=device-width"> |
| <head> |
| <script id="ui-script" type="text/plain"> |
| (function() { |
| uiController.didEndZoomingCallback = function() { |
| uiController.uiScriptComplete(uiController.zoomScale); |
| }; |
| uiController.doubleTapAtPoint(15, 15, function() {}); |
| })(); |
| </script> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function getUIScript() |
| { |
| return document.getElementById("ui-script").text; |
| } |
| |
| function runTest() |
| { |
| if (!window.eventSender || !testRunner.runUIScript) |
| return; |
| |
| eventSender.scalePageBy(1.6, 1.6); |
| testRunner.runUIScript(getUIScript(), function(result) { |
| 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> |