| 
									
										
										
										
											2016-07-21 17:44:59 -07:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @license | 
					
						
							|  |  |  |  * Copyright Google Inc. All Rights Reserved. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  |  * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import {SecurityContext} from '@angular/core'; | 
					
						
							| 
									
										
										
										
											2017-03-02 12:12:46 -08:00
										 |  |  | import * as t from '@angular/core/testing/src/testing_internal'; | 
					
						
							| 
									
										
										
										
											2016-07-21 17:44:59 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-25 15:41:19 -07:00
										 |  |  | import {DomSanitizerImpl} from '../../src/security/dom_sanitization_service'; | 
					
						
							| 
									
										
										
										
											2016-07-21 17:44:59 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-16 14:42:55 -08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2016-07-21 17:44:59 -07:00
										 |  |  |   t.describe('DOM Sanitization Service', () => { | 
					
						
							|  |  |  |     t.it('accepts resource URL values for resource contexts', () => { | 
					
						
							| 
									
										
										
										
											2017-02-14 16:14:40 -08:00
										 |  |  |       const svc = new DomSanitizerImpl(null); | 
					
						
							| 
									
										
										
										
											2016-07-21 17:44:59 -07:00
										 |  |  |       const resourceUrl = svc.bypassSecurityTrustResourceUrl('http://hello/world'); | 
					
						
							|  |  |  |       t.expect(svc.sanitize(SecurityContext.URL, resourceUrl)).toBe('http://hello/world'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | } |