summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/js-timers-beneath-modal-dialog.html
blob: 6d5f2c7edf81aba675f2cd631b82df52c1e5e5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<p>JS timers should be paused while a modal dialog (or alert) is displayed.</p>
<p>Please disable popup blocker for this test.</p>
<div>0</div>
<script>
function f()
{
    var d = document.getElementsByTagName("div")[0];
    d.innerHTML = parseInt(d.innerHTML) + 1;
}

var timerId = setInterval(f, 100);

alert("Numbers in main window should not increase while this alert is displayed");
showModalDialog("data:text/html,<p>Numbers in main window should not increase while this modal dialog is displayed</p>");
document.getElementsByTagName("div")[0].innerHTML = "DONE";

clearInterval(timerId);

</script>