2 Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/
9 <title>Test for performance observer in worker
</title>
10 <script src=
"/resources/testharness.js"></script>
11 <script src=
"/resources/testharnessreport.js"></script>
16 const worker
= new Worker("worker_performance_observer.js");
20 return new Promise(resolve
=> {
21 SpecialPowers
.registerConsoleListener(msg
=> {
22 if (msg
.errorMessage
=== "Ignoring unsupported entryTypes: invalid.") {
27 worker
.addEventListener("error", resolve
);
28 worker
.addEventListener("message", function(event
) {
29 if (event
.data
.type
=== "complete") {
34 SpecialPowers
.postConsoleSentinel();
35 assert_true(found
, "got the expected console warning");
37 }, "Console warnings about invalid types should be logged during the tests");
39 fetch_tests_from_worker(worker
);