|
Line 0
a/LayoutTests/fast/dom/zoom-scroll-page-test.html_sec1
|
|
|
1 |
<html> |
| 2 |
<head> |
| 3 |
<style type="text/css"> |
| 4 |
body { position: relative; height: 2000px; } |
| 5 |
</style> |
| 6 |
</head> |
| 7 |
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script> |
| 8 |
<script type="text/javascript" charset="utf-8"> |
| 9 |
function testScroll() { |
| 10 |
var x = 200; |
| 11 |
if (window.layoutTestController) { |
| 12 |
layoutTestController.dumpAsText(); |
| 13 |
layoutTestController.waitUntilDone(); |
| 14 |
|
| 15 |
eventSender.zoomPageIn(); |
| 16 |
|
| 17 |
window.scrollBy(0, x) |
| 18 |
var offset = window.pageYOffset; |
| 19 |
|
| 20 |
var resultString = ''; |
| 21 |
if(offset >= 199) |
| 22 |
resultString += " PASS - " + "The window scrolls by " + x + "px when the zoom factor is applied" ; |
| 23 |
else |
| 24 |
resultString += " FAIL - " + "The window has to scroll by " + x + "px but " +"has scrolled by " + offset + " px"; |
| 25 |
|
| 26 |
document.body.appendChild(document.createTextNode(resultString)); |
| 27 |
layoutTestController.notifyDone(); |
| 28 |
} |
| 29 |
} |
| 30 |
</script> |
| 31 |
<body onload="testScroll()";> |
| 32 |
<div id="target"></div> |
| 33 |
</body> |