Discard usage of deprecated APIs.
This commit is contained in:
parent
ac31dc9672
commit
6df86afef8
3 changed files with 4 additions and 4 deletions
|
@ -58,7 +58,7 @@ describe 'ipc module', ->
|
||||||
|
|
||||||
describe 'ipc.sendSync', ->
|
describe 'ipc.sendSync', ->
|
||||||
it 'can be replied by setting event.returnValue', ->
|
it 'can be replied by setting event.returnValue', ->
|
||||||
msg = ipc.sendChannelSync 'echo', 'test'
|
msg = ipc.sendSync 'echo', 'test'
|
||||||
assert.equal msg, 'test'
|
assert.equal msg, 'test'
|
||||||
|
|
||||||
it 'does not crash when reply is not sent and browser is destroyed', (done) ->
|
it 'does not crash when reply is not sent and browser is destroyed', (done) ->
|
||||||
|
|
2
spec/fixtures/api/send-sync-message.html
vendored
2
spec/fixtures/api/send-sync-message.html
vendored
|
@ -2,7 +2,7 @@
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
var ipc = require('ipc');
|
var ipc = require('ipc');
|
||||||
ipc.sendChannelSync('send-sync-message', 'message');
|
ipc.sendSync('send-sync-message', 'message');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -37,11 +37,11 @@
|
||||||
return {
|
return {
|
||||||
log: function() {
|
log: function() {
|
||||||
args = Array.prototype.slice.call(arguments);
|
args = Array.prototype.slice.call(arguments);
|
||||||
ipc.sendChannel('console.log', args);
|
ipc.send('console.log', args);
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
args = Array.prototype.slice.call(arguments);
|
args = Array.prototype.slice.call(arguments);
|
||||||
ipc.sendChannel('console.error', args);
|
ipc.send('console.error', args);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue