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

Commit b3563c5

Browse files
committed
fixup! feat($compile): add support for arbitrary property and event bindings
1 parent 9dfcdd5 commit b3563c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/ng/compileSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12878,13 +12878,13 @@ describe('$compile', function() {
1287812878
it('should NOT set html for untrusted values', inject(function($rootScope, $compile) {
1287912879
element = $compile('<div ng-prop-inner_h_t_m_l="html"></div>')($rootScope);
1288012880
$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.');
1288212882
}));
1288312883

1288412884
it('should NOT set html for wrongly typed values', inject(function($rootScope, $compile, $sce) {
1288512885
element = $compile('<div ng-prop-inner_h_t_m_l="html"></div>')($rootScope);
1288612886
$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.');
1288812888
}));
1288912889

1289012890
it('should set html for trusted values', inject(function($rootScope, $compile, $sce) {
@@ -12962,13 +12962,13 @@ describe('$compile', function() {
1296212962
it('should NOT set style for untrusted values', inject(function($rootScope, $compile) {
1296312963
element = $compile('<div ng-prop-style="style"></div>')($rootScope);
1296412964
$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.');
1296612966
}));
1296712967

1296812968
it('should NOT set style for wrongly typed values', inject(function($rootScope, $compile, $sce) {
1296912969
element = $compile('<div ng-prop-style="style"></div>')($rootScope);
1297012970
$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.');
1297212972
}));
1297312973

1297412974
it('should set style for trusted values', inject(function($rootScope, $compile, $sce) {

0 commit comments

Comments
 (0)