blob: 303532b079caf714759b95b5ce9bc536f53ec928 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="initial-scale=1.0, width=device-width">
<head>
<script id="ui-script" type="text/plain">
(function() {
uiController.didEndZoomingCallback = function() {
uiController.uiScriptComplete(uiController.zoomScale);
};
uiController.doubleTapAtPoint(15, 15, 0, 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(3, 3);
testRunner.runUIScript(getUIScript(), function(result) {
document.getElementById("target").innerText = "The viewport zoomed to scale: " + 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>