summaryrefslogtreecommitdiffstats
path: root/toolkit/components/thumbnails/test/browser_thumbnails_removed_tab.js
blob: 9d2138d3d0ab69c5322a9381e35153c8d2c85457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

add_task(async function thumbnails_bug1775638() {
  const tab = await BrowserTestUtils.openNewForegroundTab(
    gBrowser,
    "https://example.com"
  );
  const canvas = document.createElement("canvas");
  const promise = PageThumbs.captureToCanvas(tab.linkedBrowser, canvas);
  gBrowser.removeTab(tab);
  is(await promise, canvas);
});