diff options
| author | Chirayu Krishnappa | 2013-10-01 23:38:22 -0700 |
|---|---|---|
| committer | Chirayu Krishnappa | 2013-10-01 23:47:01 -0700 |
| commit | 6231a7cf6a9e2d07fcfa2f722bef684bd3ea1e1f (patch) | |
| tree | c6015d9059238dc7496632aba1de7f980538b6c0 /test | |
| parent | e773029717f11d727af609a139b173a135c79eab (diff) | |
| download | angular.js-6231a7cf6a9e2d07fcfa2f722bef684bd3ea1e1f.tar.bz2 | |
test($sce): make ie8 happy
Ref: https://github.com/angular/angular.js/pull/4221#/issuecomment-25515813
Closes #4221
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/sceSpecs.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/ng/sceSpecs.js b/test/ng/sceSpecs.js index 7a309f95..6c814e7e 100644 --- a/test/ng/sceSpecs.js +++ b/test/ng/sceSpecs.js @@ -262,7 +262,9 @@ describe('SCE', function() { $sceDelegateProvider.resourceUrlBlacklist(cfg.blackList); } }); - inject(testFn); + // This needs to be angular.mock.inject even though it's === window.inject. + // Ref: https://github.com/angular/angular.js/pull/4221#/issuecomment-25515813 + angular.mock.inject(testFn); } } @@ -288,15 +290,13 @@ describe('SCE', function() { '$sce', 'insecurl', 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo'); })); - if (!msie || msie > 8) { - it('should not accept unknown matcher type', function() { - expect(function() { - runTest({whiteList: [{}]}, null)(); - }).toThrowMinErr('$injector', 'modulerr', new RegExp( - /Failed to instantiate module function ?\(\$sceDelegateProvider\) due to:\n/.source + - /[^[]*\[\$sce:imatcher\] Matchers may only be "self", string patterns or RegExp objects/.source)); - }); - } + it('should not accept unknown matcher type', function() { + expect(function() { + runTest({whiteList: [{}]}, null)(); + }).toThrowMinErr('$injector', 'modulerr', new RegExp( + /Failed to instantiate module function ?\(\$sceDelegateProvider\) due to:\n/.source + + /[^[]*\[\$sce:imatcher\] Matchers may only be "self", string patterns or RegExp objects/.source)); + }); describe('adjustMatcher', function() { it('should rewrite regex into regex and add ^ & $ on either end', function() { |
