mirror of
https://github.com/reactos/reactos.git
synced 2024-10-30 03:27:31 +00:00
e81c7e8867
* Sync with Wine 1.7.27. CORE-8540 svn path=/trunk/; revision=64459
60 lines
1.5 KiB
HTML
60 lines
1.5 KiB
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function ok(b,m) {
|
|
return external.ok(b, m);
|
|
}
|
|
|
|
function nav_back_test() {
|
|
external.trace("Running _parent navigation tests...");
|
|
|
|
var iframe = document.getElementById("testframe");
|
|
var subframe = iframe.contentWindow.document.createElement("iframe");
|
|
|
|
subframe.onload = function() {
|
|
var doc = subframe.contentWindow.document;
|
|
doc.body.innerHTML = '<a href="blank2.html" id="aid" target="_parent">test</a>';
|
|
doc.getElementById("aid").click();
|
|
}
|
|
|
|
iframe.onload = function() {
|
|
iframe.onload = null;
|
|
var href = iframe.contentWindow.location.href;
|
|
ok(/.*blank2.html/.test(href), "Unexpected href " + href);
|
|
next_test();
|
|
}
|
|
|
|
iframe.contentWindow.document.body.appendChild(subframe);
|
|
subframe.src = "blank.html";
|
|
}
|
|
|
|
function window_navigate_test() {
|
|
external.trace("Runnint window.navigate() tests...");
|
|
|
|
var iframe = document.getElementById("testframe");
|
|
|
|
iframe.onload = function() {
|
|
iframe.onlod = null;
|
|
var href = iframe.contentWindow.location.href;
|
|
ok(href === "about:blank", "Unexpected href " + href);
|
|
next_test();
|
|
}
|
|
|
|
iframe.contentWindow.navigate("about:blank");
|
|
}
|
|
|
|
var tests = [
|
|
nav_back_test,
|
|
window_navigate_test,
|
|
function() { external.reportSuccess(); }
|
|
];
|
|
|
|
function next_test() {
|
|
window.setTimeout(tests.shift(), 0);
|
|
}
|
|
</script>
|
|
<body onload="next_test()">
|
|
<iframe src="about:blank" id="testframe"></iframe>
|
|
</body>
|
|
</html>
|