@@ -12878,13 +12878,13 @@ describe('$compile', function() {
12878
12878
it('should NOT set html for untrusted values', inject(function($rootScope, $compile) {
12879
12879
element = $compile('<div ng-prop-inner_h_t_m_l="html"></div>')($rootScope);
12880
12880
$rootScope.html = '<div onclick="">hello</div>';
12881
- expect(function() { $rootScope.$digest(); }).toThrow( );
12881
+ expect(function() { $rootScope.$digest(); }).toThrowMinErr('$sce', 'unsafe', 'Attempting to use an unsafe value in a safe context.' );
12882
12882
}));
12883
12883
12884
12884
it('should NOT set html for wrongly typed values', inject(function($rootScope, $compile, $sce) {
12885
12885
element = $compile('<div ng-prop-inner_h_t_m_l="html"></div>')($rootScope);
12886
12886
$rootScope.html = $sce.trustAsCss('<div onclick="">hello</div>');
12887
- expect(function() { $rootScope.$digest(); }).toThrow( );
12887
+ expect(function() { $rootScope.$digest(); }).toThrowMinErr('$sce', 'unsafe', 'Attempting to use an unsafe value in a safe context.' );
12888
12888
}));
12889
12889
12890
12890
it('should set html for trusted values', inject(function($rootScope, $compile, $sce) {
@@ -12962,13 +12962,13 @@ describe('$compile', function() {
12962
12962
it('should NOT set style for untrusted values', inject(function($rootScope, $compile) {
12963
12963
element = $compile('<div ng-prop-style="style"></div>')($rootScope);
12964
12964
$rootScope.style = 'background: red';
12965
- expect(function() { $rootScope.$digest(); }).toThrow( );
12965
+ expect(function() { $rootScope.$digest(); }).toThrowMinErr('$sce', 'unsafe', 'Attempting to use an unsafe value in a safe context.' );
12966
12966
}));
12967
12967
12968
12968
it('should NOT set style for wrongly typed values', inject(function($rootScope, $compile, $sce) {
12969
12969
element = $compile('<div ng-prop-style="style"></div>')($rootScope);
12970
12970
$rootScope.style = $sce.trustAsHtml('background: red');
12971
- expect(function() { $rootScope.$digest(); }).toThrow( );
12971
+ expect(function() { $rootScope.$digest(); }).toThrowMinErr('$sce', 'unsafe', 'Attempting to use an unsafe value in a safe context.' );
12972
12972
}));
12973
12973
12974
12974
it('should set style for trusted values', inject(function($rootScope, $compile, $sce) {
0 commit comments