blob: 90f23c3b769a72b81d1b210c10a77e09a3c4193a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 2000px;
width: 2000px;
}
</style>
<script src="../../resources/js-test-pre.js"></script>
<script>
description("Test that uiController.zoomToScale() works.");
window.jsTestIsAsync = true;
function doAfterZooming()
{
shouldBe('internals.pageScaleFactor()', '2');
finishJSTest();
}
function getUIScript()
{
return `(function() {
uiController.zoomToScale(2, function() {
uiController.uiScriptComplete(uiController.zoomScale);
});
})();`;
}
function doTest()
{
if (window.testRunner)
testRunner.runUIScript(getUIScript(), function(zoomScale) {
doAfterZooming();
})
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>