electron/spec-main
Shelley Vohr 49096c2359
fix: throw on invalid webRequest filters (#19337)
Closes #11371.

Previously, we didn't consider the return value of the webRequest URLPattern mate converter, which meant that when the pattern wasn't correctly parsed owing to invalid filter specification users would not be made aware of that fact and would just think that the filtering itself had failed. This corrects that error by moving the business logic of url pattern parsing out of the converter and into the function itself so that granular and specific errors can be thrown.

There's also no real reason that i'm aware of not to allow wider breadth of filters by letting users use a wildcard for effective TLD, so I also overrode that (default for the 1-arg Parse is not to allow that).

Finally, I added some examples of url filter types for users to reference.
2019-07-25 10:20:02 -07:00
..
fixtures feat: preliminary support for //extensions (#17440) 2019-07-24 16:01:08 -07:00
.eslintrc
.gitignore spec: add tests for the autoUpdater on macOS that actually test if it works (#17442) 2019-03-29 17:32:52 -07:00
ambient.d.ts test: move BrowserView specs to main process (#19409) 2019-07-24 08:44:24 -07:00
api-app-spec.ts feat: add memory to app.getAppMetrics() (#18831) 2019-07-23 13:41:58 -07:00
api-autoupdater-darwin-spec.ts spec: don't run codesigning spec on forks (#19418) 2019-07-24 10:55:16 -07:00
api-browser-view-spec.ts test: move BrowserView specs to main process (#19409) 2019-07-24 08:44:24 -07:00
api-browser-window-spec.ts test: move more BrowserWindow specs (#19290) 2019-07-16 16:37:17 -07:00
api-callbacks-registry-spec.js chore: convert callbacks-registry to ts (#18682) 2019-06-15 17:18:25 +09:00
api-content-tracing-spec.ts test: move contentTracing specs to main process (#19229) 2019-07-15 17:23:35 +09:00
api-global-shortcut-spec.ts test: move globalShortcut spec (#19233) 2019-07-15 17:29:29 +09:00
api-in-app-purchase-spec.ts test: move inAppPurchase spec (#19232) 2019-07-15 17:28:55 +09:00
api-ipc-main-spec.ts test: move ipcMain spec (#19230) 2019-07-15 17:23:59 +09:00
api-ipc-spec.ts fix: ensure correct ordering of sendSync w.r.t. send (#18630) 2019-06-04 17:10:31 -07:00
api-menu-item-spec.ts test: robustify MenuItem label/accel tests (#19287) 2019-07-17 14:32:47 -07:00
api-net-log-spec.js feat: preliminary support for //extensions (#17440) 2019-07-24 16:01:08 -07:00
api-net-spec.ts fix: throw on invalid webRequest filters (#19337) 2019-07-25 10:20:02 -07:00
api-notification-spec.ts test: move Notification spec to main process (#19414) 2019-07-24 17:18:11 -07:00
api-power-save-blocker-spec.ts spec: move powerSaveBlocker spec to main process (#19236) 2019-07-15 17:38:01 +09:00
api-protocol-spec.ts test: move protocol specs to main process (#18923) 2019-06-27 14:20:29 -07:00
api-remote-spec.ts test: move some remote specs to the main runner (#18636) 2019-06-07 10:43:32 -07:00
api-screen-spec.ts move screen api test to main process (#18956) 2019-06-24 11:30:47 -07:00
api-session-spec.js feat: convert webContents primitives to properties (#18998) 2019-07-03 08:57:10 -07:00
api-system-preferences-spec.ts test: add tests for systemPreferences apis (#19419) 2019-07-24 10:40:12 -07:00
api-tray-spec.ts test: clean up and augment Tray module spec (#19410) 2019-07-24 21:22:08 -07:00
api-web-contents-spec.ts test: move beforeunload tests to main runner and fix flake (#18432) 2019-05-29 13:38:14 -07:00
chromium-spec.ts spec: deflake focus handling test (#18809) 2019-06-15 16:15:15 +09:00
events-helpers.ts build: move to the new docs parser (#18103) 2019-05-06 08:29:01 -07:00
extensions-spec.ts feat: preliminary support for //extensions (#17440) 2019-07-24 16:01:08 -07:00
index.js test: disable security warnings in main runner (#19283) 2019-07-16 13:43:00 -07:00
package.json
spec-helpers.ts test: move contentTracing specs to main process (#19229) 2019-07-15 17:23:35 +09:00
types-spec.ts build: ensure that we bundle the correct version of @types/node (#19102) 2019-07-03 16:36:59 -07:00
version-bump-spec.ts test: move version-bump spec to main process (#19415) 2019-07-24 10:16:28 -07:00
window-helpers.ts fix: move window.open postMessage test to main runner to fix flake (#18735) 2019-06-12 08:35:58 +09:00