Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fixing IE #1818

Merged
merged 3 commits into from
Feb 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/config/01-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ will return exit-code `0` and display a warning.

See [config/files] for more information.

## forceJSONP
**Type:** Boolean

**Default:** `false`

**Description:** Force socket.io to use JSONP polling instead of XHR polling.

## frameworks
**Type:** Array
Expand Down
1 change: 1 addition & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ var Config = function () {
this.reportSlowerThan = 0
this.loggers = [constant.CONSOLE_APPENDER]
this.transports = ['polling', 'websocket']
this.forceJSONP = false
this.plugins = ['karma-*']
this.defaultClient = this.client = {
args: [],
Expand Down
3 changes: 2 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function createSocketIoServer (webServer, executor, config) {
// avoid destroying http upgrades from socket.io to get proxied websockets working
destroyUpgrade: false,
path: config.urlRoot + 'socket.io/',
transports: config.transports
transports: config.transports,
forceJSONP: config.forceJSONP
})

// hack to overcome circular dependency
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
"grunt-mocha-test": "^0.12.7",
"grunt-npm": "0.0.2",
"jasmine-core": "^2.3.4",
"json3": "^3.3.2",
"karma-browserify": "^5.0.1",
"karma-browserstack-launcher": "^0.1.10",
"karma-chrome-launcher": "*",
Expand Down
93 changes: 64 additions & 29 deletions test/client/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,68 @@
var TRAVIS_WITHOUT_SAUCE = process.env.TRAVIS_SECURE_ENV_VARS === 'false'
var TRAVIS_WITHOUT_BS = process.env.TRAVIS_SECURE_ENV_VARS === 'false'

var launchers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 7',
version: '47'
bs_chrome: {
base: 'BrowserStack',
browser: 'chrome',
os: 'Windows',
os_version: '10'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '43'
bs_firefox: {
base: 'BrowserStack',
browser: 'firefox',
os: 'Windows',
os_version: '10'
},
sl_safari: {
base: 'SauceLabs',
browserName: 'safari',
version: '9',
platform: 'OS X 10.11'
bs_safari: {
base: 'BrowserStack',
browser: 'safari',
browser_version: '9.0',
os_version: 'El Capitan',
os: 'OS X'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
bs_ie_11: {
base: 'BrowserStack',
browser: 'ie',
browser_version: '11.0',
os: 'Windows',
os_version: '10'
},
sl_ie_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '10'
bs_ie_10: {
base: 'BrowserStack',
browser: 'ie',
browser_version: '10.0',
os: 'Windows',
os_version: '8'
},
bs_ie_9: {
base: 'BrowserStack',
browser: 'ie',
browser_version: '9.0',
os: 'Windows',
os_version: '7'
}
// TODO: Figure out why these fail on browserstack
// ,
// bs_ie_8: {
// base: 'BrowserStack',
// browser: 'ie',
// browser_version: '8.0',
// os: 'Windows',
// os_version: '7'
// },
// bs_ie_7: {
// base: 'BrowserStack',
// browser: 'ie',
// browser_version: '7.0',
// os: 'Windows',
// os_version: 'XP'
// }
}

var browsers = []

if (process.env.TRAVIS) {
if (TRAVIS_WITHOUT_SAUCE) {
if (TRAVIS_WITHOUT_BS) {
browsers.push('Firefox')
} else {
browsers = Object.keys(launchers)
Expand Down Expand Up @@ -67,7 +94,7 @@ module.exports = function (config) {
// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots', 'progress'
// CLI --reporters progress
reporters: ['progress', 'junit', 'saucelabs'],
reporters: ['progress', 'junit'],

junitReporter: {
// will be resolved to basePath (in the same way as files/exclude patterns)
Expand Down Expand Up @@ -122,7 +149,15 @@ module.exports = function (config) {
'karma-firefox-launcher',
'karma-junit-reporter',
'karma-browserify',
'karma-sauce-launcher'
]
'karma-browserstack-launcher'
],

concurrency: 3,

forceJSONP: true,

browserStack: {
project: 'Karma'
}
})
}
Loading