From 48096048cf92bcada9b8c4f54d7002fbcf239416 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 12 Mar 2012 16:49:28 -0700 Subject: fix(svg): normalize class access for SVG --- test/service/compilerSpec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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('')($rootScope); + $rootScope.$digest(); + expect(element.text()).toEqual('1'); + })); + + it('should allow directives in comments', inject( function($compile, $rootScope, log) { element = $compile('