Commit 6c8e4160 authored by pam@chromium.org's avatar pam@chromium.org

2008-10-17 Pamela Greene <pam@chromium.org>

        Fix potential race by running two passes of test to defer notifyDone.
        See https://bugs.webkit.org/show_bug.cgi?id=21576

        Reviewed by Timothy Hatcher.

        * fast/history/resources/history_reload_window.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4bfc7338
2008-10-17 Pamela Greene <pam@chromium.org>
Fix potential race by running two passes of test to defer notifyDone.
See https://bugs.webkit.org/show_bug.cgi?id=21576
Reviewed by Timothy Hatcher.
* fast/history/resources/history_reload_window.html:
2008-10-16 Julien Chaffraix <jchaffraix@pleyo.com>
Rubber-stamped by Alexey Proskuryakov.
......
......@@ -4,21 +4,26 @@
function test() {
var tempConsole = document.getElementById('console');
var console = window.opener.document.getElementById('console');
// On the first pass, we'll temporarily set the output to
// to failure, and then go(0). On the second pass,
// we set the output back to success and close the window.
if (window.opener.i == 0) {
tempConsole.innerHTML = 'Test Failed';
console.innerHTML = tempConsole.innerHTML;
window.opener.i = window.opener.i + 1;
window.opener.i = 1;
history.go(0);
} else {
console.innerHTML = tempConsole.innerHTML;
window.opener.i = 2;
window.close();
}
}
function closed()
{
if (window.layoutTestController)
opener.setTimeout("layoutTestController.notifyDone()", 0);
if (window.opener.i == 2)
if (window.layoutTestController)
opener.setTimeout("layoutTestController.notifyDone()", 0);
}
</script>
</head>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment