Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#71662 Update index.ts with ContextType tes…
Browse files Browse the repository at this point in the history
…ts by @jpc-ae
  • Loading branch information
jpc-ae authored Jan 23, 2025
1 parent 0ac324e commit 86c770c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion types/chrome/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2412,7 +2412,14 @@ function testStorageForPromise() {
}

// https://developer.chrome.com/docs/extensions/reference/api/runtime#method-getContexts
function testRunTimeGetContexts() {
function testRuntimeGetContexts() {
chrome.runtime.ContextType.TAB === "TAB";
chrome.runtime.ContextType.POPUP === "POPUP";
chrome.runtime.ContextType.BACKGROUND === "BACKGROUND";
chrome.runtime.ContextType.OFFSCREEN_DOCUMENT === "OFFSCREEN_DOCUMENT";
chrome.runtime.ContextType.SIDE_PANEL === "SIDE_PANEL";
chrome.runtime.ContextType.DEVELOPER_TOOLS === "DEVELOPER_TOOLS";

const options = { incognito: true, tabIds: [1, 2, 3] };

chrome.runtime.getContexts(options);
Expand Down

0 comments on commit 86c770c

Please sign in to comment.