Make sure protocol module's specs do not pollute main.js.

This commit is contained in:
Cheng Zhao 2013-08-25 20:45:34 +08:00
parent 9e16e41bb3
commit 0f6617ec26
2 changed files with 25 additions and 23 deletions

View file

@ -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',