### Preflight Checklist
* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * 7.0.0
  * 7.1.13
  * 8.0.1
  * 8.0.2
  * 9.0.0-beta.2
  * 9.0.0-beta.3
* **Operating System:**
  * `Linux xps 5.5.4-arch1-1 #1 SMP PREEMPT Sat, 15 Feb 2020 00:36:29 +0000 x86_64 GNU/Linux`, Arch Linux current
* **Last Known Working Electron version:**
  * 6.1.8

### Expected Behavior
E.g. how 6.x behaves: `onBeforeRequest` callback gets fired before requests are made.

Note: `touch /tmp/1.html` to get `onCompleted`, otherwise check `onErrorOccured`.

```
Electron 6.1.8
onBeforeRequest: file:///tmp/1.html
onCompleted: file:///tmp/1.html
Load finished!
```

See code to reproduce below.

### Actual Behavior
#### With `file:///tmp/1.html` (does not work):

```
Electron 7.0.0
Load finished!
```

```
Electron 7.1.13
Load finished!
```

```
Electron 8.0.2
Load finished!
```

```
Electron 9.0.0-beta.3
Load finished!
```

#### With `https://example.com/` (works):

```
Electron 9.0.0-beta.3
onBeforeRequest: https://example.com/
onCompleted: https://example.com/
Load finished!
```

```
Electron 8.0.2
onBeforeRequest: https://example.com/
onCompleted: https://example.com/
Load finished!
```

```
Electron 7.0.0
onBeforeRequest: https://example.com/
onCompleted: https://example.com/
Load finished!
```

### To Reproduce

```js
const { BrowserWindow, app } = require('electron')

app.on('ready', () => {
  const window = new BrowserWindow({})
  console.log(`Electron ${process.versions.electron}`)
  window.webContents.session.webRequest.onBeforeRequest((details, callback) => {
    console.log(`onBeforeRequest: ${details.url}`)
    callback({})
  })
  window.webContents.session.webRequest.onCompleted((details) => {
    console.log(`onCompleted: ${details.url}`)
  })
  window.webContents.session.webRequest.onErrorOccurred((details) => {
    console.log(`onErrorOccured: ${details.url}`)
  })
  window.webContents.loadURL('file:///tmp/1.html') // compare with https://example.com/
  window.webContents.on('did-finish-load', () => {
    console.log('Load finished!')
  })
  window.show()
})
```

### Additional Information
* Documented to work with `file:` urls: https://www.electronjs.org/docs/api/web-request#webrequestonbeforerequestfilter-listener
* Specifying filters manually doesn't seem to help
* https://github.com/electron/electron/issues/21308 might be related
* Looks like a regression to me.
shell/browser/api/electron_api_web_request.cc
std::set<URLPattern> patterns_,
    SimpleListener listener_)
    : url_patterns(std::move(patterns_)), listener(listener_) {}
WebRequest::SimpleListenerInfo::SimpleListenerInfo() = default;
WebRequest::SimpleListenerInfo::~SimpleListenerInfo() = default;
WebRequest::ResponseListenerInfo::ResponseListenerInfo(
    std::set<URLPattern> patterns_,
    ResponseListener listener_)
    : url_patterns(std::move(patterns_)), listener(listener_) {}
WebRequest::ResponseListenerInfo::ResponseListenerInfo() = default;
WebRequest::ResponseListenerInfo::~ResponseListenerInfo() = default;
WebRequest::WebRequest(v8::Isolate* isolate,
                       content::BrowserContext* browser_context)
    : browser_context_(browser_context) {
  browser_context_->SetUserData(kUserDataKey, std::make_unique<UserData>(this));
}
WebRequest::~WebRequest() {