test: add test and api_feature
definition for chrome.scripting.globalParams
(#41700)
chore: add test and api_feature for chrome.scripting.globalParams Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
313476a724
commit
ba1e7fcaa7
4 changed files with 49 additions and 0 deletions
|
@ -1285,6 +1285,16 @@ describe('chrome extensions', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('globalParams', async () => {
|
||||
await w.loadURL(url);
|
||||
|
||||
const message = { method: 'globalParams' };
|
||||
w.webContents.executeJavaScript(`window.postMessage('${JSON.stringify(message)}', '*')`);
|
||||
const [,, responseString] = await once(w.webContents, 'console-message');
|
||||
const response = JSON.parse(responseString);
|
||||
expect(response).to.deep.equal({ changed: true });
|
||||
});
|
||||
|
||||
it('insertCSS', async () => {
|
||||
await w.loadURL(url);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue