Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

/* Any copyright is dedicated to the Public Domain.
"use strict";
add_task(async function test_drawSnapshot_returns_false_on_failure() {
await BrowserTestUtils.withNewTab("about:blank", async browser => {
// A scale that isn't finite makes WindowGlobalParent.drawSnapshot throw.
let result = await browser.drawSnapshot(0, 0, 10, 10, NaN, "white");
is(result, false, "drawSnapshot returns false when the snapshot fails");
});
});