gecko-dev/dom/tests/browser/perfmetrics/unresponsive.html
Tarek Ziadé 06ff704ff3 Bug 1491816 - deal with unresponsive content processes in ChromeUtils.requestPerformanceMetrics() - r=baku
Adds a timout that will resolve the promise to return even if we did not get an answer from
all children.

MozReview-Commit-ID: FFLwAUkkYos

Differential Revision: https://phabricator.services.mozilla.com/D7265

--HG--
extra : moz-landing-system : lando
2018-10-11 09:40:23 +00:00

21 lines
342 B
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script type="text/javascript">
function fn() {
let start = Date.now();
while (Date.now() - start < 5000)
; // do nothing
setTimeout(fn, 0);
}
setTimeout(fn, 10);
</script>
</head>
<body>
<h1>An unresponsive page</h1>
</body>
</html>