<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->

<html>
<head>
    <meta name="viewport" content="width=device-width">
    <script id="ui-script" type="text/plain">
        (function() {
            uiController.zoomToScale(1.2, function() {
                uiController.uiScriptComplete(uiController.zoomScale);
            });
        })();
    </script>

    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        function runTest()
        {
            if (testRunner.runUIScript) {
                var uiScript = document.getElementById('ui-script').text;
                testRunner.runUIScript(uiScript, function(result) {
                    
                    var resultText;
                    if (result == "1.2")
                        resultText = "PASS: final zoom scale was " + result;
                    else
                        resultText = "FAIL: final zoom scale was " + result + ", should be 1.2";

                    document.getElementById('result').textContent = resultText;
                    testRunner.notifyDone();
                });
            }
        }

        window.addEventListener('load', runTest, false);
    </script>
</head>
<body>

<p id="result">This test has to run in iOS WebKitTestRunner.</p>

</body>
</html>
.