1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/base/tests/test_bug851445.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=851445 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 851445</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=851445">Mozilla Bug 851445</a> 1.17 +<p id="display"></p> 1.18 +<iframe id="f" style="width:400px; height:400px;"></iframe> 1.19 +<script> 1.20 +SimpleTest.waitForExplicitFinish(); 1.21 + 1.22 +function handleLoad() { 1.23 + f.contentWindow.scrollTo(0,100); 1.24 + function handleLoad2() { 1.25 + // Verify that the scroll position was retained 1.26 + is(f.contentWindow.scrollY, 100); 1.27 + SimpleTest.finish(); 1.28 + } 1.29 + f.onload = handleLoad2; 1.30 + f.contentWindow.location.reload(); 1.31 +} 1.32 + 1.33 +f.src = "bug851445_helper.html?" + Math.random(); 1.34 +f.onload = handleLoad; 1.35 +</script> 1.36 +</body> 1.37 +</html>