Merge pull request #2787 from atom/test

Fix a few failing specs on the CI machine with OS X 10.10 SDK
This commit is contained in:
Cheng Zhao 2015-09-15 15:02:08 +08:00
commit cf6008a05e
4 changed files with 11 additions and 4 deletions

View file

@ -71,7 +71,7 @@ def main():
run_script('upload.py') run_script('upload.py')
else: else:
run_script('build.py', ['-c', 'D']) run_script('build.py', ['-c', 'D'])
if (is_travis or PLATFORM == 'linux') and target_arch == 'x64': if PLATFORM != 'win32' and target_arch == 'x64':
run_script('test.py', ['--ci']) run_script('test.py', ['--ci'])
run_script('clean.py') run_script('clean.py')

View file

@ -18,6 +18,10 @@ describe 'crash-reporter module', ->
# It is not working on 64bit Windows. # It is not working on 64bit Windows.
return if process.platform is 'win32' and process.arch is 'x64' return if process.platform is 'win32' and process.arch is 'x64'
# The crash-reporter test is not reliable on CI machine.
isCI = remote.process.argv[2] == '--ci'
return if isCI
it 'should send minidump when renderer crashes', (done) -> it 'should send minidump when renderer crashes', (done) ->
@timeout 120000 @timeout 120000
server = http.createServer (req, res) -> server = http.createServer (req, res) ->

View file

@ -51,6 +51,8 @@ describe 'chromium feature', ->
b = window.open "file://#{fixtures}/pages/window-opener-node.html", '', 'node-integration=no,show=no' b = window.open "file://#{fixtures}/pages/window-opener-node.html", '', 'node-integration=no,show=no'
describe 'window.opener', -> describe 'window.opener', ->
@timeout 10000
ipc = remote.require 'ipc' ipc = remote.require 'ipc'
url = "file://#{fixtures}/pages/window-opener.html" url = "file://#{fixtures}/pages/window-opener.html"
w = null w = null
@ -61,16 +63,17 @@ describe 'chromium feature', ->
it 'is null for main window', (done) -> it 'is null for main window', (done) ->
ipc.on 'opener', (event, opener) -> ipc.on 'opener', (event, opener) ->
done(if opener is null then undefined else opener) assert.equal opener, null
done()
BrowserWindow = remote.require 'browser-window' BrowserWindow = remote.require 'browser-window'
w = new BrowserWindow(show: false) w = new BrowserWindow(show: false)
w.loadUrl url w.loadUrl url
it 'is not null for window opened by window.open', (done) -> it 'is not null for window opened by window.open', (done) ->
b = window.open url, '', 'show=no'
ipc.on 'opener', (event, opener) -> ipc.on 'opener', (event, opener) ->
b.close() b.close()
done(if opener isnt null then undefined else opener) done(if opener isnt null then undefined else opener)
b = window.open url, '', 'show=no'
describe 'window.opener.postMessage', -> describe 'window.opener.postMessage', ->
it 'sets source and origin correctly', (done) -> it 'sets source and origin correctly', (done) ->

View file

@ -11,7 +11,7 @@ describe '<webview> tag', ->
beforeEach -> beforeEach ->
webview = new WebView webview = new WebView
afterEach -> afterEach ->
document.body.removeChild webview document.body.removeChild(webview) if document.body.contains(webview)
describe 'src attribute', -> describe 'src attribute', ->
it 'specifies the page to load', (done) -> it 'specifies the page to load', (done) ->