mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-21 11:40:34 -10:00
This test triggers a deprecation report in a Worker and expects to be able to see that report having been sent. Differential Revision: https://phabricator.services.mozilla.com/D281637
15 lines
416 B
JavaScript
15 lines
416 B
JavaScript
importScripts("{{location[server]}}/resources/testharness.js");
|
|
|
|
async_test(function(t) {
|
|
const observer = new ReportingObserver(t.step_func_done((reports) => {
|
|
done();
|
|
}));
|
|
|
|
observer.observe();
|
|
const off = new OffscreenCanvas(1, 1);
|
|
const ctx = off.getContext("2d");
|
|
ctx.fillRect(0, 0, 1, 1);
|
|
// Trigger deprecation
|
|
off.toBlob().then(() => {});
|
|
}, "Worker should trigger a deprecation report");
|