@@ -168,6 +168,34 @@ describe('element observation', () => {
168
168
expect ( el . style . backgroundColor ) . toBe ( '' ) ;
169
169
expect ( el . style . backgroundImage ) . toBe ( '' ) ;
170
170
171
+ observer . setValue ( ` width : 25px ; background: url("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~:/?#[]%@!$&'()*+,;=");` ) ;
172
+ expect ( observer . getValue ( ) ) . toBe ( `width: 25px; background: url("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~:/?#[]%@!$&'()*+,;=");` ) ;
173
+
174
+ observer . setValue ( '' ) ;
175
+ expect ( el . style . width ) . toBe ( '' ) ;
176
+ expect ( el . style . background ) . toBe ( '' ) ;
177
+
178
+ observer . setValue ( ` width : 25px ; background: url('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~:/?#[]%@!$&\\'()*+,;=');` ) ;
179
+ expect ( observer . getValue ( ) ) . toBe ( `width: 25px; background: url("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~:/?#[]%@!$&'()*+,;=");` ) ;
180
+
181
+ observer . setValue ( '' ) ;
182
+ expect ( el . style . width ) . toBe ( '' ) ;
183
+ expect ( el . style . background ) . toBe ( '' ) ;
184
+
185
+ observer . setValue ( ` color : rgb( 255 , 255 , 255 ) ; background: url(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~:/?#[]%@!$&*+,;=);` ) ;
186
+ expect ( observer . getValue ( ) ) . toBe ( `color: rgb(255, 255, 255); background: url("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~:/?#[]%@!$&*+,;=");` ) ;
187
+
188
+ observer . setValue ( '' ) ;
189
+ expect ( el . style . color ) . toBe ( '' ) ;
190
+ expect ( el . style . background ) . toBe ( '' ) ;
191
+
192
+ observer . setValue ( `background: url(data:image/gif;base64,R0lGODh0o/XBs/fNl3/zy7//wA7);` ) ;
193
+ expect ( observer . getValue ( ) ) . toBe ( `background: url("data:image/gif;base64,R0lGODh0o/XBs/fNl3/zy7//wA7");` ) ;
194
+
195
+ observer . setValue ( '' ) ;
196
+ expect ( el . style . width ) . toBe ( '' ) ;
197
+ expect ( el . style . background ) . toBe ( '' ) ;
198
+
171
199
observer . setValue ( { width : '50px' , height : '40px' , 'background-color' : 'blue' , 'background-image' : 'url("http://aurelia.io/test2.png")' } ) ;
172
200
expect ( observer . getValue ( ) ) . toBe ( 'width: 50px; height: 40px; background-image: url("http://aurelia.io/test2.png"); background-color: blue;' ) ;
173
201
expect ( el . style . height ) . toBe ( '40px' ) ;
0 commit comments