Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: re-enable some skipped tests #29655

Merged
merged 2 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions spec-main/api-browser-window-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,7 @@ describe('BrowserWindow module', () => {
await expect(p).to.eventually.be.fulfilled;
});

// FIXME(robo/nornagon): re-enable these once service workers work
describe.skip('POST navigations', () => {
describe('POST navigations', () => {
afterEach(() => { w.webContents.session.webRequest.onBeforeSendHeaders(null); });

it('supports specifying POST data', async () => {
Expand Down
12 changes: 7 additions & 5 deletions spec-main/api-protocol-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ describe('protocol module', () => {
});
});

describe.skip('protocol.registerSchemesAsPrivileged standard', () => {
describe('protocol.registerSchemesAsPrivileged standard', () => {
const standardScheme = (global as any).standardScheme;
const origin = `${standardScheme}://fake-host`;
const imageURL = `${origin}/test.png`;
Expand All @@ -766,7 +766,8 @@ describe('protocol module', () => {
w = new BrowserWindow({
show: false,
webPreferences: {
nodeIntegration: true
nodeIntegration: true,
contextIsolation: false
}
});
});
Expand Down Expand Up @@ -834,7 +835,7 @@ describe('protocol module', () => {
});
});

describe.skip('protocol.registerSchemesAsPrivileged cors-fetch', function () {
describe('protocol.registerSchemesAsPrivileged cors-fetch', function () {
const standardScheme = (global as any).standardScheme;
let w: BrowserWindow = null as unknown as BrowserWindow;
beforeEach(async () => {
Expand Down Expand Up @@ -867,7 +868,8 @@ describe('protocol module', () => {
});
});

it('disallows CORS and fetch requests when only supportFetchAPI is specified', async () => {
// FIXME: Figure out why this test is failing
it.skip('disallows CORS and fetch requests when only supportFetchAPI is specified', async () => {
await allowsCORSRequests('no-cors', ['failed xhr', 'failed fetch'], /has been blocked by CORS policy/, () => {
const { ipcRenderer } = require('electron');
Promise.all([
Expand Down Expand Up @@ -915,7 +917,7 @@ describe('protocol module', () => {
callback('');
});

const newContents: WebContents = (webContents as any).create({ nodeIntegration: true });
const newContents: WebContents = (webContents as any).create({ nodeIntegration: true, contextIsolation: false });
const consoleMessages: string[] = [];
newContents.on('console-message', (e, level, message) => consoleMessages.push(message));
try {
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/pages/cache-storage.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
const ipcRenderer = require('electron').ipcRenderer;
const { ipcRenderer } = require('electron');
caches.open('foo').then(
() => ipcRenderer.send('success'),
err => ipcRenderer.send('failure', err)
Expand Down