aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/compilerSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2012-03-12 16:49:28 -0700
committerMisko Hevery2012-03-12 21:59:50 -0700
commit48096048cf92bcada9b8c4f54d7002fbcf239416 (patch)
treeb41a4354fbdb9583686521e5c4ffe0a6eaed48c2 /test/service/compilerSpec.js
parent317adb36a480c60f41b6f69bc67d66fe1b08bdae (diff)
downloadangular.js-48096048cf92bcada9b8c4f54d7002fbcf239416.tar.bz2
fix(svg): normalize class access for SVG
Diffstat (limited to 'test/service/compilerSpec.js')
-rw-r--r--test/service/compilerSpec.js10
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);