mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
test($sce): make ie8 happy
Ref: https://github.com/angular/angular.js/pull/4221#/issuecomment-25515813 Closes #4221
This commit is contained in:
parent
e773029717
commit
6231a7cf6a
1 changed files with 10 additions and 10 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue