test($sce): make ie8 happy

Ref: https://github.com/angular/angular.js/pull/4221#/issuecomment-25515813

Closes #4221
This commit is contained in:
Chirayu Krishnappa 2013-10-01 23:38:22 -07:00
parent e773029717
commit 6231a7cf6a

View file

@ -262,7 +262,9 @@ describe('SCE', function() {
$sceDelegateProvider.resourceUrlBlacklist(cfg.blackList); $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,7 +290,6 @@ describe('SCE', function() {
'$sce', 'insecurl', 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo'); '$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() { it('should not accept unknown matcher type', function() {
expect(function() { expect(function() {
runTest({whiteList: [{}]}, null)(); runTest({whiteList: [{}]}, null)();
@ -296,7 +297,6 @@ describe('SCE', function() {
/Failed to instantiate module function ?\(\$sceDelegateProvider\) due to:\n/.source + /Failed to instantiate module function ?\(\$sceDelegateProvider\) due to:\n/.source +
/[^[]*\[\$sce:imatcher\] Matchers may only be "self", string patterns or RegExp objects/.source)); /[^[]*\[\$sce:imatcher\] Matchers may only be "self", string patterns or RegExp objects/.source));
}); });
}
describe('adjustMatcher', function() { describe('adjustMatcher', function() {
it('should rewrite regex into regex and add ^ & $ on either end', function() { it('should rewrite regex into regex and add ^ & $ on either end', function() {