Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / performance / tests / test_worker_performance_entries.html
blobd3f124fdb3f47e95c75773520d8085586001a432
1 <!-- Any copyright is dedicated to the Public Domain.
2 - http://creativecommons.org/publicdomain/zero/1.0/ -->
3 <!DOCTYPE HTML>
4 <html>
5 <head>
6 <title>PerformanceResouceTiming in workers</title>
7 <script src="/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
9 </head>
10 <body>
11 <script class="testbody" type="text/javascript">
13 SimpleTest.waitForExplicitFinish();
15 // The worker assumes it will take some amount of time to load a resource.
16 // With a low enough precision, the duration to load a resource may clamp
17 // down to zero.
18 var reduceTimePrecisionPrevPrefValue = SpecialPowers.getBoolPref("privacy.reduceTimerPrecision");
19 SpecialPowers.setBoolPref("privacy.reduceTimerPrecision", false);
21 var worker = new Worker('test_worker_performance_entries.js');
22 worker.onmessage = function(event) {
23 if (event.data.type == "check") {
24 ok(event.data.status, event.data.msg);
25 return;
28 if (event.data.type == "finish") {
29 SpecialPowers.setBoolPref("privacy.reduceTimerPrecision", reduceTimePrecisionPrevPrefValue);
30 SimpleTest.finish();
31 return;
34 ok(false, "?!?");
37 </script>
38 </body>
39 </html>