mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
IE8 should use XDomainRequest to avoid loading bar flashing
This commit is contained in:
@@ -17,6 +17,7 @@ require('./transport');
|
||||
// browser only tests
|
||||
if (env.browser) {
|
||||
require('./connection');
|
||||
require('./xmlhttprequest');
|
||||
if (global.ArrayBuffer) {
|
||||
require('./arraybuffer');
|
||||
} else {
|
||||
|
||||
24
test/xmlhttprequest.js
Normal file
24
test/xmlhttprequest.js
Normal file
@@ -0,0 +1,24 @@
|
||||
var expect = require('expect.js');
|
||||
var XMLHttpRequest = require('../lib/xmlhttprequest');
|
||||
var isIE8 = /MSIE 8/.test(navigator.userAgent);
|
||||
|
||||
describe('XMLHttpRequest', function () {
|
||||
|
||||
if (isIE8) {
|
||||
describe('IE8', function() {
|
||||
it('should have same properties as XDomainRequest does when xscheme is false', function() {
|
||||
var xhr = new XMLHttpRequest({xdomain: false, xscheme: false});
|
||||
expect(xhr).to.be.an('object');
|
||||
expect(xhr).to.have.property('onload');
|
||||
expect(xhr).to.have.property('onerror');
|
||||
});
|
||||
|
||||
it('should have same properties as XMLHttpRequest does when xscheme is true', function() {
|
||||
var xhr = new XMLHttpRequest({xdomain: false, xscheme: true});
|
||||
expect(xhr).to.be.an('object');
|
||||
expect(xhr).to.have.property('onreadystatechange');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user