fix: Add .paks for media-internals and webrtc-internals pages (#24010)

* fix: adds paks for media-internals and webrtc-internals pages

* adds tests
This commit is contained in:
Gellert Hegyi 2020-06-11 04:07:49 +02:00 committed by GitHub
parent b1574f9e59
commit ce042184de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View file

@ -1122,7 +1122,7 @@ describe('chromium features', () => {
new Promise((resolve, reject) => {
try {
let req = window.indexedDB.open('${dbName}');
req.onsuccess = (event) => {
req.onsuccess = (event) => {
let db = req.result;
resolve(db.name);
}
@ -1266,6 +1266,28 @@ describe('chromium features', () => {
});
});
});
describe('chrome://media-internals', () => {
it('loads the page successfully', async () => {
const w = new BrowserWindow({ show: false });
w.loadURL('chrome://media-internals');
const pageExists = await w.webContents.executeJavaScript(
"window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')"
);
expect(pageExists).to.be.true();
});
});
describe('chrome://webrtc-internals', () => {
it('loads the page successfully', async () => {
const w = new BrowserWindow({ show: false });
w.loadURL('chrome://webrtc-internals');
const pageExists = await w.webContents.executeJavaScript(
"window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')"
);
expect(pageExists).to.be.true();
});
});
});
describe('font fallback', () => {