blob: ef8e23f8c7a0cde19dab0a77a0787da3715069ac [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<meta name="viewport">
<script id="ui-script" type="text/plain">
(function() {
uiController.didEndZoomingCallback = function() {
uiController.uiScriptComplete(uiController.zoomScale);
};
uiController.singleTapAtPoint(10, 10, function() {});
})();
</script></head>
<body onload="runTest();">
<input type="text" id="textfield">
<p id="result">This test has to run in iOS WebKitTestRunner.</p>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that when the author does not define a scale or set user-scalable=no, that zooming in on focused nodes changes the scale.");
if (window.testRunner) {
window.jsTestIsAsync = true;
testRunner.setIgnoresViewportScaleLimits(true);
}
function runTest()
{
if (testRunner.runUIScript) {
var uiScript = document.getElementById('ui-script').text;;
document.getElementById("textfield").focus();
testRunner.runUIScript(document.getElementById('ui-script').text, function(result) {
debug("Zoom scale is: " + Number(result).toFixed(2));
finishJSTest();
});
}
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>