const storageAreaMethods = { get : ( keys ) => new Promise ( ( ) => ( { } ) ) , set : ( keys ) => new Promise ( ( ) => ( { } ) ) , } ; const port = { name : 'mock_port' , disconnect : ( ) => void ( 0 ) , error : null , onDisconnect : { addListener : ( ) => void ( 0 ) , } , onMessage : { addListener : ( ) => void ( 0 ) , removeListener : ( ) => void ( 0 ) , } , postMessage : ( ) => void ( 0 ) , } ; export const browserShim = { origin : window , tabs : { sendMessage : ( tabId , message ) => new Promise ( ( ) => void ( 0 ) ) , query : ( queryInfo ) => new Promise ( ( ) => [ { } ] ) , } , runtime : { lastError : null , Port : port , getManifest : ( ) => ( { version : '0.0.0' } ) , getURL : ( path = '' ) => '' , connect : ( ) => port , onConnect : { addListener : ( ) => void ( 0 ) , removeListener : ( ) => void ( 0 ) , hasListener : ( ) => true , } , sendMessage : ( ) => new Promise ( ( ) => void ( 0 ) ) , onMessage : { addListener : ( ) => void ( 0 ) , } , } , storage : { local : storageAreaMethods , sync : storageAreaMethods , } , i18n : { getMessage : ( name , substitions ) => '' , getUILanguage : ( ) => navigator . language , } , contextMenus : { create : ( createProperties , callback ) => 0 , remove : ( menuItemId ) => new Promise ( ( ) => void ( 0 ) ) , onClicked : { addListener : ( callback ) => void ( 0 ) , removeListener : ( callback ) => void ( 0 ) , hasListener : ( callback ) => void ( 0 ) , } , } , } ; if ( TARGET_BROWSER === 'web' ) { Object . assign ( window , { browser : browserShim , chrome : browserShim , } ) ; }