@@ -186,6 +186,16 @@ define(function (require, exports, module) {
186186 expect ( tag ) . toEqual ( HTMLUtils . createTagInfo ( HTMLUtils . TAG_NAME ) ) ;
187187 } ) ;
188188
189+ it ( "should hint tagname for a closing tag" , function ( ) {
190+ var pos = { "ch" : 0 , "line" : 0 } ;
191+ setContentAndUpdatePos ( pos ,
192+ [ "<html>" , "<body>" , "<div id='test' class='foo'></div>" ] ,
193+ "</body></ht" , "ml>" ) ;
194+
195+ var tag = HTMLUtils . getTagInfo ( myEditor , pos ) ;
196+ expect ( tag ) . toEqual ( HTMLUtils . createTagInfo ( HTMLUtils . CLOSING_TAG , 6 , "html" ) ) ;
197+ } ) ;
198+
189199 it ( "should find the tagname of the current tag if two tags are right next to each other" , function ( ) {
190200 var pos = { "ch" : 0 , "line" : 0 } ;
191201 setContentAndUpdatePos ( pos ,
@@ -237,16 +247,6 @@ define(function (require, exports, module) {
237247 expect ( tag ) . toEqual ( HTMLUtils . createTagInfo ( ) ) ;
238248 } ) ;
239249
240- it ( "should not hint anything inside a closing tag" , function ( ) {
241- var pos = { "ch" : 0 , "line" : 0 } ;
242- setContentAndUpdatePos ( pos ,
243- [ "<html>" , "<body>" , "<div id='test' class='foo'></div>" ] ,
244- "</body></ht" , "ml>" ) ;
245-
246- var tag = HTMLUtils . getTagInfo ( myEditor , pos ) ;
247- expect ( tag ) . toEqual ( HTMLUtils . createTagInfo ( ) ) ;
248- } ) ;
249-
250250 it ( "should not find attributes in an empty editor" , function ( ) {
251251 var pos = { "ch" : 0 , "line" : 0 } ;
252252 var attrs = HTMLUtils . getTagAttributes ( myEditor , pos ) ;
0 commit comments