chore: make crash-reporter specs not use URL module (#16840)
This commit is contained in:
parent
ccf46a57bc
commit
10607f7e86
2 changed files with 4 additions and 4 deletions
2
spec/fixtures/api/crash-restart.html
vendored
2
spec/fixtures/api/crash-restart.html
vendored
|
@ -2,7 +2,7 @@
|
|||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
const {port} = require('url').parse(window.location.href, true).query
|
||||
const port = (new URLSearchParams(location.search)).get('port')
|
||||
const {crashReporter, ipcRenderer} = require('electron')
|
||||
|
||||
crashReporter.start({
|
||||
|
|
6
spec/fixtures/api/crash.html
vendored
6
spec/fixtures/api/crash.html
vendored
|
@ -2,9 +2,9 @@
|
|||
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
const url = require('url').parse(window.location.href, true);
|
||||
const uploadToServer = !url.query.skipUpload;
|
||||
const port = url.query.port;
|
||||
const query = new URLSearchParams(location.search)
|
||||
const port = query.get('port')
|
||||
const uploadToServer = !query.has('skipUpload')
|
||||
const {crashReporter, ipcRenderer} = require('electron');
|
||||
|
||||
crashReporter.start({
|
||||
|
|
Loading…
Add table
Reference in a new issue