Merge branch 'webcontent_invalid_loadurl_patch' of https://github.com/deepak1556/atom-shell into deepak1556-webcontent_invalid_loadurl_patch
This commit is contained in:
commit
08e5c1f6fe
3 changed files with 29 additions and 2 deletions
|
@ -102,12 +102,22 @@ describe('browser-window module', function() {
|
|||
w.loadURL('about:blank');
|
||||
});
|
||||
|
||||
it('should emit did-fail-load event', function(done) {
|
||||
w.webContents.on('did-fail-load', function() {
|
||||
it('should emit did-fail-load event for files that do not exist', function(done) {
|
||||
w.webContents.on('did-fail-load', function(event, code) {
|
||||
assert.equal(code, -6);
|
||||
done();
|
||||
});
|
||||
w.loadURL('file://a.txt');
|
||||
});
|
||||
|
||||
it('should emit did-fail-load event for invalid URL', function(done) {
|
||||
w.webContents.on('did-fail-load', function(event, code, desc) {
|
||||
assert.equal(desc, 'ERR_INVALID_URL');
|
||||
assert.equal(code, -300);
|
||||
done();
|
||||
});
|
||||
w.loadURL('http://example:port');
|
||||
});
|
||||
});
|
||||
|
||||
describe('BrowserWindow.show()', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue