From 7253c30c2113d3499d71d483f2de8d0f22b5b74d Mon Sep 17 00:00:00 2001 From: epicgirl1998 Date: Thu, 23 Mar 2017 16:06:39 +0200 Subject: [PATCH] add test for chrome.tabs.TAB_ID_NONE --- chrome/test/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chrome/test/index.ts b/chrome/test/index.ts index 8d0df4336e..3da3f534be 100644 --- a/chrome/test/index.ts +++ b/chrome/test/index.ts @@ -210,6 +210,19 @@ function executeScriptFramed () { } +// for chrome.tabs.TAB_ID_NONE +function realTabsOnly () { + chrome.webRequest.onBeforeRequest.addListener(function (details) { + if (details.tabId === chrome.tabs.TAB_ID_NONE) { + console.log("Request not related to a tab. %o", details); + return; + } + // ... + }, { + urls: [""] + }); +} + // contrived settings example function proxySettings() { chrome.proxy.settings.get({ incognito: true }, (details) => {