blob: 5b44c6946e1112daf15b6b780f4795b267205a7b [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
const maxNestingLevel = 5;
let i = 0;
let handle = null;
function step()
{
i++;
if (i == maxNestingLevel)
parent.window.postMessage("timerReachedMaxNestingLevel", "*");
}
window.onmessage = function(message)
{
var re = /report-throttle-(cross|same)/;
var match = re.exec(message.data);
if (match) {
var frameId = match[1];
if (window.internals)
parent.window.postMessage("throttled[" + frameId + "]: " + internals.isTimerThrottled(handle), "*");
}
}
window.addEventListener("load", function() {
handle = setInterval(step, 5);
}, false);
</script>
</head>
<body>
<div style="height: 100px; width: 100px; background: silver" onclick=""></div>
Child frame.
</body>
</html>