Skip to content

Commit

Permalink
feat: Disable -extoff flag to be set by default
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

IE Addons are now disabled by default when using the karma-ie-launcher.

Closes #27
  • Loading branch information
v12 authored and dignifiedquire committed Jun 9, 2015
1 parent cbfbe4e commit 5aa409e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
23 changes: 22 additions & 1 deletion README.md
Expand Up @@ -49,10 +49,31 @@ customLaunchers: {
```
See [Specifying legacy document modes] on MSDN.

### Running IE in "No add-ons mode"

Please note that since **v0.2.0** default behaviour of launching Internet Explorer has changed.
Now it runs using system-wide configuration (uses same settings as if you would run it manually) but prior to **v0.2.0** it was spawned with `-extoff` flag set explicitly, so all extensions were disabled.

If you expect the same behaviour as it was before **v0.2.0**, Karma configuration should be slightly changed:
- create new `customLauncher` configuration (`IE_no_addons` is used in an example below) with custom flags (in our case it is `-extoff` only)
- browser `IE` in `browsers` field should be replaced with your new custom launcher name
```js
browsers: ['IE_no_addons'],
customLaunchers: {
IE_no_addons: {
base: 'IE',
flags: ['-extoff']
}
}
```

See [IE Command-Line Options] on MSDN.

----

For more information on Karma see the [homepage].


[homepage]: http://karma-runner.github.com
[Specifying legacy document modes]: http://msdn.microsoft.com/en-us/library/ie/jj676915(v=vs.85).aspx
[Specifying legacy document modes]: http://msdn.microsoft.com/en-us/library/ie/jj676915(v=vs.85).aspx
[IE Command-Line Options]: https://msdn.microsoft.com/en-us/library/hh826025(v=vs.85).aspx
4 changes: 1 addition & 3 deletions index.js
Expand Up @@ -82,9 +82,7 @@ var IEBrowser = function(baseBrowserDecorator, logger, args) {
delete urlObj.search; //url.format does not want search attribute
url = urlformat(urlObj);

return [
'-extoff'
].concat(flags, [url]);
return flags.concat(url);
};

var baseOnProcessExit = this._onProcessExit;
Expand Down
9 changes: 2 additions & 7 deletions test/launcher.spec.coffee
Expand Up @@ -63,16 +63,11 @@ describe 'launcher', ->
launcher = injector.get('launcher:IE')
launcher._getOptions('url')

it 'should add -extoff', (done) ->
options = getOptions('url', module)
expect(options[0]).to.equal '-extoff'
done()

it 'should include args.flags', (done) ->
module.args[1] = {flags: ['-flag1', '-flag2']}
options = getOptions('url', module)
expect(options[1]).to.equal '-flag1'
expect(options[2]).to.equal '-flag2'
expect(options[0]).to.equal '-flag1'
expect(options[1]).to.equal '-flag2'
done()

it 'should return url as the last flag', (done) ->
Expand Down

0 comments on commit 5aa409e

Please sign in to comment.