4 <title>Test for ReportingObserver + memory-pressure
</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <script type=
"application/javascript">
12 info(
"Testing TakeRecords() without memory-pressure");
13 let o = new ReportingObserver(() =
> {});
16 new TestingDeprecatedInterface();
17 let r = o.takeRecords();
18 is(r.length,
1,
"We have 1 report");
21 is(r.length,
0,
"We have 0 reports after a takeRecords()");
23 info(
"Testing DeprecatedTestingMethod report");
25 new TestingDeprecatedInterface();
26 SpecialPowers.Services.obs.notifyObservers(null,
"memory-pressure",
"heap-minimize");
29 is(r.length,
0,
"We have 0 reports after a memory-pressure");