Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
test($sce): make ie8 happy
Browse files Browse the repository at this point in the history
Ref: #4221

Closes #4221
  • Loading branch information
chirayuk committed Oct 2, 2013
1 parent e773029 commit 6231a7c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/ng/sceSpecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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() {
Expand Down

0 comments on commit 6231a7c

Please sign in to comment.