Skip to content

Commit

Permalink
Merge pull request webrtc#549 from webrtc/updateDeps
Browse files Browse the repository at this point in the history
Update deps and fix chrome automation
  • Loading branch information
KaptenJansson authored Mar 9, 2018
2 parents cfb35d9 + 14076df commit 20cdd76
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
17 changes: 16 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Karma configuration
module.exports = function(config) {
var browser = process.env.BROWSER || 'chrome';
var browser = (process.env.BROWSER === '' || process.env.BROWSER === 'chrome')
? 'Chrome_no_sandbox' : process.env.BROWSER
var travis = process.env.TRAVIS;
var files = function() {
// List of tests that can run in "any" browser.
Expand All @@ -26,6 +27,13 @@ module.exports = function(config) {
}
return filteredFiles;
}

let chromeFlags = [
'--use-fake-device-for-media-stream',
'--use-fake-ui-for-media-stream',
'--no-sandbox',
'--headless', '--disable-gpu', '--remote-debugging-port=9222'
];
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
Expand Down Expand Up @@ -93,6 +101,13 @@ module.exports = function(config) {
// https://npmjs.org/browse/keyword/karma-launcher
browsers: [browser[0].toUpperCase() + browser.substr(1)],

customLaunchers: {
Chrome_no_sandbox: {
base: 'Chrome',
flags: chromeFlags
}
},

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"eslint-config-webrtc": ">=1.0.0",
"grunt": ">=1.0.0",
"grunt": "^1.0.2",
"grunt-cli": ">=0.1.9",
"grunt-closurecompiler-new-grunt": ">=0.0.21",
"grunt-contrib-compress": ">=1.0.0",
Expand All @@ -22,15 +22,15 @@
"grunt-htmlhint": ">=0.9.12",
"grunt-jinja-new-grunt": ">=0.3.0",
"grunt-shell": ">=1.1.1",
"jasmine-core": ">=2.4.1",
"karma": ">=1.1.0",
"jasmine-core": "^3.1.0",
"karma": "^2.0.0",
"karma-chrome-launcher": ">=1.0.1",
"karma-cli": ">=1.0.1",
"karma-eslint": ">=2.1.0",
"karma-firefox-launcher": ">=1.0.0",
"karma-jasmine": ">=1.0.2",
"travis-multirunner": "^4.2.5",
"webrtc-adapter": "^6.0.0"
"travis-multirunner": "^4.4.1",
"webrtc-adapter": "^6.1.3"
},
"dependencies": {
"pako": "^1.0.6"
Expand Down

0 comments on commit 20cdd76

Please sign in to comment.