@@ -111,8 +111,7 @@ define(function (require, exports, module) {
111111 waitsForFail ( promise , "loadStyleSheet: " + path ) ;
112112 } ) ;
113113 } ) ;
114-
115- // putting everything LESS related in 1 test so it runs faster
114+
116115 it ( "should attach LESS style sheets" , function ( ) {
117116 var promise , result ;
118117
@@ -137,6 +136,35 @@ define(function (require, exports, module) {
137136 expect ( testWindow . $ . contains ( testWindow . document , result ) ) . toBeTruthy ( ) ;
138137 } ) ;
139138 } ) ;
139+
140+ it ( "should attach LESS style sheets using absolute url" , function ( ) {
141+ var promise , result ;
142+
143+ runs ( function ( ) {
144+ var indexLocation = testWindow . location . origin + testWindow . location . pathname ,
145+ bracketsLocation = indexLocation . substring ( 0 , indexLocation . length - "src/index.html" . length ) ,
146+ basicLessLocation = bracketsLocation + "test/spec/ExtensionUtils-test-files/basic.less" ;
147+
148+ promise = loadStyleSheet ( testWindow . document , basicLessLocation ) ;
149+ promise . done ( function ( style ) {
150+ result = style ;
151+ } ) ;
152+
153+ waitsForDone ( promise ) ;
154+ } ) ;
155+
156+ runs ( function ( ) {
157+ // convert all line endings to platform default
158+ var windowText = FileUtils . translateLineEndings ( testWindow . $ ( result ) . text ( ) ) ,
159+ lessText = FileUtils . translateLineEndings ( LESS_RESULT ) ;
160+
161+ // confirm style sheet contents
162+ expect ( windowText ) . toBe ( lessText ) ;
163+
164+ // confirm style is attached to document
165+ expect ( testWindow . $ . contains ( testWindow . document , result ) ) . toBeTruthy ( ) ;
166+ } ) ;
167+ } ) ;
140168 } ) ;
141169 } ) ;
142170} ) ;
0 commit comments