test: deflake <webview> tag loads devtools extensions on WOA (#31702)

This commit is contained in:
John Kleinschmidt 2021-11-04 14:00:28 -04:00 committed by GitHub
parent 96a04c67fd
commit f8df634197
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 () {});
});
});