Make sure protocol module's specs do not pollute main.js.
This commit is contained in:
parent
9e16e41bb3
commit
0f6617ec26
2 changed files with 25 additions and 23 deletions
17
spec/main.js
17
spec/main.js
|
@ -34,23 +34,6 @@ app.on('window-all-closed', function() {
|
|||
app.terminate();
|
||||
});
|
||||
|
||||
app.on('will-finish-launching', function() {
|
||||
// Reigster some protocols, used by the protocol spec.
|
||||
// FIXME(zcbenz): move this to somewhere else.
|
||||
var protocol = require('protocol');
|
||||
protocol.registerProtocol('atom-string', function(url) {
|
||||
return url;
|
||||
});
|
||||
|
||||
protocol.registerProtocol('atom-string-job', function(url) {
|
||||
return new protocol.RequestStringJob({mimeType: 'text/html', data: url});
|
||||
});
|
||||
|
||||
protocol.registerProtocol('atom-file-job', function(url) {
|
||||
return new protocol.RequestFileJob(url.substr(16));
|
||||
});
|
||||
});
|
||||
|
||||
app.on('finish-launching', function() {
|
||||
window = new BrowserWindow({
|
||||
title: 'atom-shell tests',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue