diff --git a/Gruntfile.js b/Gruntfile.js index 1734458..9fd062e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,9 +31,17 @@ if(process.env.TRAVIS) { base: 'Chrome', flags: ['--no-sandbox'] }, + ChromeHeadless_travis_ci: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'] + }, Chromium_travis_ci: { base: 'Chromium', flags: ['--no-sandbox'] + }, + ChromiumHeadless_travis_ci: { + base: 'ChromiumHeadless', + flags: ['--no-sandbox'] } }; @@ -43,10 +51,18 @@ if(process.env.TRAVIS) { if(chromeIndex !== -1) { browsers[chromeIndex] = 'Chrome_travis_ci'; } + var chromeHeadlessIndex = browsers.indexOf('ChromeHeadless'); + if(chromeHeadlessIndex !== -1) { + browsers[chromeHeadlessIndex] = 'ChromeHeadless_travis_ci'; + } var chromiumIndex = browsers.indexOf('Chromium'); if(chromiumIndex !== -1) { browsers[chromiumIndex] = 'Chromium_travis_ci'; } + var chromiumHeadlessIndex = browsers.indexOf('ChromiumHeadless'); + if(chromiumHeadlessIndex !== -1) { + browsers[chromiumHeadlessIndex] = 'ChromiumHeadless_travis_ci'; + } return browsers; }; } diff --git a/browsers/Chrome.js b/browsers/Chrome.js index e665134..73e002b 100644 --- a/browsers/Chrome.js +++ b/browsers/Chrome.js @@ -1,5 +1,5 @@ module.exports = { - name: 'Chrome', + name: 'ChromeHeadless', DEFAULT_CMD: { linux: ['google-chrome', 'google-chrome-stable'], darwin: ['/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'], diff --git a/browsers/Chromium.js b/browsers/Chromium.js index 0f12c3e..f9f8c32 100644 --- a/browsers/Chromium.js +++ b/browsers/Chromium.js @@ -1,5 +1,5 @@ module.exports = { - name: 'Chromium', + name: 'ChromiumHeadless', DEFAULT_CMD: { linux: [ // Try chromium-browser before chromium to avoid conflict with the legacy diff --git a/demo/karma.conf.js b/demo/karma.conf.js index 1412e51..34be3ce 100644 --- a/demo/karma.conf.js +++ b/demo/karma.conf.js @@ -44,7 +44,7 @@ module.exports = function (config) { // - PhantomJS // - IE (only Windows) // CLI --browsers Chrome,Firefox,Safari - browsers: [process.env.TRAVIS ? 'Chromium_travis_ci' : 'Chrome'], + browsers: [process.env.TRAVIS ? 'ChromiumHeadless_travis_ci' : 'Chrome'], // If browser does not capture in given timeout [ms], kill it // CLI --capture-timeout 5000