forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathback-from-document-with-scrollbar.html
42 lines (38 loc) · 1.08 KB
/
back-from-document-with-scrollbar.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html>
<head>
<script>
function navigate()
{
if (location.hash == "") {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
history.pushState({ }, "", window.location + "#1");
setTimeout(function() {
window.location.href = 'data:text/html, \
<html style="height: 200%"> \
<body onunload=""> \
<script> \
document.body.offsetWidth; \
setTimeout("window.history.back();", 0); \
<' + '/script> \
</body> \
</html> \
';
}, 0);
return;
}
setTimeout(function () {
var result = document.getElementById("result");
result.innerHTML = "Success if the web process did not crash."
if (window.layoutTestController)
layoutTestController.notifyDone();
}, 0);
}
</script>
</head>
<body onpageshow="navigate();">
<div id="result">Test did not complete</div>
</body>
</htmL>