mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix refreshing test window
This commit is contained in:
@@ -39,8 +39,12 @@ describe 'crash-reporter module', ->
|
||||
res.end('abc-123-def')
|
||||
server.close()
|
||||
done()
|
||||
server.listen 0, '127.0.0.1', ->
|
||||
# Server port is generated randomly for the first run, it will be reused
|
||||
# when page is refreshed.
|
||||
port = remote.process.port
|
||||
server.listen port, '127.0.0.1', ->
|
||||
{port} = server.address()
|
||||
remote.process.port = port
|
||||
url = url.format
|
||||
protocol: 'file'
|
||||
pathname: path.join fixtures, 'api', 'crash.html'
|
||||
|
||||
@@ -5,6 +5,7 @@ var BrowserWindow = require('browser-window');
|
||||
var Menu = require('menu');
|
||||
|
||||
var window = null;
|
||||
process.port = 0; // will be used by crash-reporter spec.
|
||||
|
||||
app.commandLine.appendSwitch('js-flags', '--expose_gc');
|
||||
app.commandLine.appendSwitch('ignore-certificate-errors');
|
||||
|
||||
Reference in New Issue
Block a user