Fix refreshing test window
This commit is contained in:
parent
cd7b3dd291
commit
13c1b078f9
2 changed files with 6 additions and 1 deletions
|
@ -39,8 +39,12 @@ describe 'crash-reporter module', ->
|
||||||
res.end('abc-123-def')
|
res.end('abc-123-def')
|
||||||
server.close()
|
server.close()
|
||||||
done()
|
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()
|
{port} = server.address()
|
||||||
|
remote.process.port = port
|
||||||
url = url.format
|
url = url.format
|
||||||
protocol: 'file'
|
protocol: 'file'
|
||||||
pathname: path.join fixtures, 'api', 'crash.html'
|
pathname: path.join fixtures, 'api', 'crash.html'
|
||||||
|
|
|
@ -5,6 +5,7 @@ var BrowserWindow = require('browser-window');
|
||||||
var Menu = require('menu');
|
var Menu = require('menu');
|
||||||
|
|
||||||
var window = null;
|
var window = null;
|
||||||
|
process.port = 0; // will be used by crash-reporter spec.
|
||||||
|
|
||||||
app.commandLine.appendSwitch('js-flags', '--expose_gc');
|
app.commandLine.appendSwitch('js-flags', '--expose_gc');
|
||||||
app.commandLine.appendSwitch('ignore-certificate-errors');
|
app.commandLine.appendSwitch('ignore-certificate-errors');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue