diff options
| author | Misko Hevery | 2012-03-12 16:49:28 -0700 |
|---|---|---|
| committer | Misko Hevery | 2012-03-12 21:59:50 -0700 |
| commit | 48096048cf92bcada9b8c4f54d7002fbcf239416 (patch) | |
| tree | b41a4354fbdb9583686521e5c4ffe0a6eaed48c2 /test/service/compilerSpec.js | |
| parent | 317adb36a480c60f41b6f69bc67d66fe1b08bdae (diff) | |
| download | angular.js-48096048cf92bcada9b8c4f54d7002fbcf239416.tar.bz2 | |
fix(svg): normalize class access for SVG
Diffstat (limited to 'test/service/compilerSpec.js')
| -rw-r--r-- | test/service/compilerSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/service/compilerSpec.js b/test/service/compilerSpec.js index d8ee697b..a9d0a5db 100644 --- a/test/service/compilerSpec.js +++ b/test/service/compilerSpec.js @@ -138,6 +138,16 @@ describe('$compile', function() { })); + it('should ignore not set CSS classes on SVG elements', inject(function($compile, $rootScope, log) { + if (!window.SVGElement) return; + // According to spec SVG element className property is readonly, but only FF + // implements it this way which causes compile exceptions. + element = $compile('<svg><text>{{1}}</text></svg>')($rootScope); + $rootScope.$digest(); + expect(element.text()).toEqual('1'); + })); + + it('should allow directives in comments', inject( function($compile, $rootScope, log) { element = $compile('<div>0<!-- directive: log angular -->1</div>')($rootScope); |
