function extension_getRequestByUrl(urls,callback){function onHAR(response){const entries=response.entries;for(let i=0;i<entries.length;++i){for(let url=0;url<urls.length;++url){if(urls[url].test(entries[i].request.url)){callback(entries[i]);return;}}}
output('no item found');callback(null);}
webInspector.network.getHAR(onHAR);};const extensionsHost='devtools-extensions.oopif.test';const extensionsOrigin=`http://${extensionsHost}:8000`;Extensions.extensionServer._registerHandler('evaluateForTestInFrontEnd',onEvaluate);Extensions.extensionServer._extensionAPITestHook=function(extensionServerClient,coreAPI){window.webInspector=coreAPI;window._extensionServerForTests=extensionServerClient;coreAPI.panels.themeName='themeNameForTest';};ExtensionsTestRunner._replyToExtension=function(requestId,port){Extensions.extensionServer._dispatchCallback(requestId,port);};function onEvaluate(message,port){function reply(param){Extensions.extensionServer._dispatchCallback(message.requestId,port,param);}
try{eval(message.expression);}catch(e){TestRunner.addResult('Exception while running: '+message.expression+'\n'+(e.stack||e));TestRunner.completeTest();}}
ExtensionsTestRunner.showPanel=function(panelId){if(panelId==='extension')
panelId=UI.inspectorView._tabbedPane._tabs[UI.inspectorView._tabbedPane._tabs.length-1].id;return UI.inspectorView.showPanel(panelId);};ExtensionsTestRunner.evaluateInExtension=function(code){ExtensionsTestRunner._codeToEvaluateBeforeTests=code;};ExtensionsTestRunner.runExtensionTests=async function(tests){const result=await TestRunner.RuntimeAgent.evaluate('location.href','console',false);if(!result)
return;ExtensionsTestRunner._pendingTests=(ExtensionsTestRunner._codeToEvaluateBeforeTests||'')+tests.join('\n');const pageURL=result.value;let extensionURL=pageURL.replace(/^(https?:\/\/[^\/]*\/).*$/,'$1')+'devtools/resources/extension-main.html';extensionURL=extensionURL.replace('127.0.0.1',extensionsHost);InspectorFrontendAPI.addExtensions([{startPage:extensionURL,name:'test extension',exposeWebInspectorNamespace:true}]);Extensions.extensionServer.initializeExtensions();};(function disableLogging(){console.warn=()=>undefined;})();;