Browse Source

test: re-enable tests that aren't broken & remove old test (#38251)

Calvin 1 year ago
parent
commit
fa81f77f40
3 changed files with 1 additions and 19 deletions
  1. 0 13
      spec/api-protocol-spec.ts
  2. 1 5
      spec/disabled-tests.json
  3. 0 1
      spec/version-bump-spec.ts

+ 0 - 13
spec/api-protocol-spec.ts

@@ -282,18 +282,6 @@ describe('protocol module', () => {
         ipcMain.once('loaded-iframe-custom-protocol', () => done());
       });
 
-      // DISABLED-FIXME
-      it('throws an error when custom headers are invalid', (done) => {
-        registerFileProtocol(protocolName, (request, callback) => {
-          expect(() => callback({
-            path: filePath,
-            headers: { 'X-Great-Header': (42 as any) }
-          })).to.throw(Error, 'Value of \'X-Great-Header\' header has to be a string');
-          done();
-        });
-        ajax(protocolName + '://fake-host').catch(() => {});
-      });
-
       it('sends object as response', async () => {
         registerFileProtocol(protocolName, (request, callback) => callback({ path: filePath }));
         const r = await ajax(protocolName + '://fake-host');
@@ -880,7 +868,6 @@ describe('protocol module', () => {
       await requestReceived;
     });
 
-    // DISABLED-FIXME
     it('can access files through the FileSystem API', (done) => {
       const filePath = path.join(fixturesPath, 'pages', 'filesystem.html');
       protocol.registerFileProtocol(standardScheme, (request, callback) => callback({ path: filePath }));

+ 1 - 5
spec/disabled-tests.json

@@ -4,13 +4,9 @@
   "BrowserWindow module document.visibilityState/hidden visibilityState remains visible if backgroundThrottling is disabled",
   "Menu module Menu.setApplicationMenu unsets a menu with null",
   "process module main process process.takeHeapSnapshot() returns true on success",
-  "protocol module protocol.registerFileProtocol throws an error when custom headers are invalid",
-  "protocol module protocol.registerProtocol throws an error when custom headers are invalid",
-  "protocol module protocol.registerSchemesAsPrivileged standard can access files through the FileSystem API",
   "protocol module protocol.registerSchemesAsPrivileged cors-fetch disallows CORS and fetch requests when only supportFetchAPI is specified",
   "session module ses.cookies should set cookie for standard scheme",
   "webFrameMain module WebFrame.visibilityState should match window state",
   "reporting api sends a report for a deprecation",
-  "chromium features SpeechSynthesis should emit lifecycle events",
-  "version-bumper nextVersion bump versions bumps to beta from nightly"
+  "chromium features SpeechSynthesis should emit lifecycle events"
 ]

+ 0 - 1
spec/version-bump-spec.ts

@@ -132,7 +132,6 @@ describe('version-bumper', () => {
         ).to.be.rejectedWith('Cannot bump to beta from stable.');
       });
 
-      // DISABLED-FIXME(ELECTRON 15): Re-enable after Electron 15 alpha has released
       it('bumps to beta from nightly', async () => {
         const version = 'v2.0.0-nightly.19950901';
         const next = await nextVersion('beta', version);