2 <html lang=
"en" dir=
"ltr">
4 <title>Test page for bug
1681664</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
8 SimpleTest
.waitForExplicitFinish()
9 async
function init() {
10 var Services
= SpecialPowers
.Services
;
12 observe(subject
, topic
, data
) {
13 if (topic
=== "process-hang-report") {
14 var report
= subject
.QueryInterface(Ci
.nsIHangReport
);
15 report
.terminateScript();
16 Services
.obs
.removeObserver(observer
, "process-hang-report");
21 Services
.obs
.addObserver(observer
, "process-hang-report");
23 await
import("test_bug1681664_helper.js");
24 result
.textContent
= "FAIL";
26 result
.textContent
= "PASS";
36 is(result
.textContent
, "PASS", "Infinite loop script should not cause browser crash");