diff --git a/spec-main/fixtures/devtools-extensions/foo/panel.js b/spec-main/fixtures/devtools-extensions/foo/panel.js index d3dad58f3fb8..8b877b389cab 100644 --- a/spec-main/fixtures/devtools-extensions/foo/panel.js +++ b/spec-main/fixtures/devtools-extensions/foo/panel.js @@ -54,24 +54,26 @@ testStorage(function ( syncForRemove, localForRemove, syncForClear, localForClear ) { - const message = JSON.stringify({ - runtimeId: chrome.runtime.id, - tabId: chrome.devtools.inspectedWindow.tabId, - i18nString: chrome.i18n.getMessage('foo', ['bar', 'baz']), - storageItems: { - local: { - set: localForSet, - remove: localForRemove, - clear: localForClear - }, - sync: { - set: syncForSet, - remove: syncForRemove, - clear: syncForClear + setTimeout(() => { + const message = JSON.stringify({ + runtimeId: chrome.runtime.id, + tabId: chrome.devtools.inspectedWindow.tabId, + i18nString: chrome.i18n.getMessage('foo', ['bar', 'baz']), + storageItems: { + local: { + set: localForSet, + remove: localForRemove, + clear: localForClear + }, + sync: { + set: syncForSet, + remove: syncForRemove, + clear: syncForClear + } } - } - }); + }); - const sendMessage = `require('electron').ipcRenderer.send('answer', ${message})`; - window.chrome.devtools.inspectedWindow.eval(sendMessage, function () {}); + const sendMessage = `require('electron').ipcRenderer.send('answer', ${message})`; + window.chrome.devtools.inspectedWindow.eval(sendMessage, function () {}); + }); });