| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  | import { | 
					
						
							|  |  |  |   AsyncTestCompleter, | 
					
						
							|  |  |  |   beforeEach, | 
					
						
							|  |  |  |   ddescribe, | 
					
						
							|  |  |  |   describe, | 
					
						
							|  |  |  |   expect, | 
					
						
							|  |  |  |   iit, | 
					
						
							|  |  |  |   inject, | 
					
						
							|  |  |  |   it, | 
					
						
							|  |  |  |   xdescribe, | 
					
						
							|  |  |  |   xit | 
					
						
							| 
									
										
										
										
											2015-10-13 00:29:13 -07:00
										 |  |  | } from 'angular2/testing_internal'; | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  | import {IS_DART, RegExpWrapper, StringWrapper} from 'angular2/src/facade/lang'; | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  | import {getSymbolsFromLibrary} from './symbol_inspector/symbol_inspector'; | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  | import {ListWrapper} from 'angular2/src/facade/collection'; | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | // =================================================================================================
 | 
					
						
							|  |  |  | // =================================================================================================
 | 
					
						
							|  |  |  | // =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========
 | 
					
						
							|  |  |  | // =================================================================================================
 | 
					
						
							|  |  |  | // =================================================================================================
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // DO NOT EDIT THIS LIST OF PUBLIC APIS UNLESS YOU GET IT CLEARED BY: mhevery, vsavkin, or tbosch!
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // =================================================================================================
 | 
					
						
							|  |  |  | // =================================================================================================
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | var NG_COMMON = [ | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'AbstractControl', | 
					
						
							|  |  |  |   'AbstractControlDirective', | 
					
						
							|  |  |  |   'AsyncPipe', | 
					
						
							| 
									
										
										
										
											2015-11-02 16:03:42 -08:00
										 |  |  |   'COMMON_DIRECTIVES', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'COMMON_PIPES', | 
					
						
							|  |  |  |   'CORE_DIRECTIVES', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'CheckboxControlValueAccessor', | 
					
						
							|  |  |  |   'Control', | 
					
						
							|  |  |  |   'ControlArray', | 
					
						
							|  |  |  |   'ControlContainer', | 
					
						
							|  |  |  |   'ControlGroup', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'ControlValueAccessor:dart', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'CurrencyPipe', | 
					
						
							|  |  |  |   'DatePipe', | 
					
						
							|  |  |  |   'DecimalPipe', | 
					
						
							|  |  |  |   'DefaultValueAccessor', | 
					
						
							|  |  |  |   'FORM_BINDINGS', | 
					
						
							|  |  |  |   'FORM_DIRECTIVES', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'FORM_PROVIDERS', | 
					
						
							|  |  |  |   'Form:dart', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'FormBuilder', | 
					
						
							| 
									
										
										
										
											2016-02-26 10:02:52 -08:00
										 |  |  |   'I18nPluralPipe', | 
					
						
							|  |  |  |   'I18nSelectPipe', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'JsonPipe', | 
					
						
							|  |  |  |   'LowerCasePipe', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'MaxLengthValidator', | 
					
						
							|  |  |  |   'MinLengthValidator', | 
					
						
							|  |  |  |   'NG_ASYNC_VALIDATORS', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'NG_VALIDATORS', | 
					
						
							| 
									
										
										
										
											2015-11-02 11:35:47 -08:00
										 |  |  |   'NG_VALUE_ACCESSOR', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'NgClass', | 
					
						
							|  |  |  |   'NgControl', | 
					
						
							|  |  |  |   'NgControlGroup', | 
					
						
							|  |  |  |   'NgControlName', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'NgControlStatus', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'NgFor', | 
					
						
							|  |  |  |   'NgForm', | 
					
						
							|  |  |  |   'NgFormControl', | 
					
						
							|  |  |  |   'NgFormModel', | 
					
						
							|  |  |  |   'NgIf', | 
					
						
							|  |  |  |   'NgModel', | 
					
						
							|  |  |  |   'NgSelectOption', | 
					
						
							|  |  |  |   'NgStyle', | 
					
						
							|  |  |  |   'NgSwitch', | 
					
						
							|  |  |  |   'NgSwitchWhen', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'NgSwitchDefault', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'NumberPipe', | 
					
						
							|  |  |  |   'ObservableListDiff:dart', | 
					
						
							|  |  |  |   'ObservableListDiffFactory:dart', | 
					
						
							| 
									
										
										
										
											2015-11-20 01:36:28 -05:00
										 |  |  |   'PatternValidator', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'PercentPipe', | 
					
						
							| 
									
										
										
										
											2015-12-27 08:05:25 +02:00
										 |  |  |   'ReplacePipe', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'RequiredValidator', | 
					
						
							|  |  |  |   'SelectControlValueAccessor', | 
					
						
							|  |  |  |   'SlicePipe', | 
					
						
							|  |  |  |   'UpperCasePipe', | 
					
						
							|  |  |  |   'Validator:dart', | 
					
						
							|  |  |  |   'Validators', | 
					
						
							| 
									
										
										
										
											2016-02-05 16:08:53 -08:00
										 |  |  |   'RadioButtonState', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'NgLocalization', | 
					
						
							|  |  |  |   'NgPlural', | 
					
						
							|  |  |  |   'NgPluralCase' | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var NG_COMPILER = [ | 
					
						
							|  |  |  |   "TemplateAst:dart", | 
					
						
							|  |  |  |   "TemplateAstVisitor:dart", | 
					
						
							|  |  |  |   "DEFAULT_PACKAGE_URL_PROVIDER", | 
					
						
							|  |  |  |   "UrlResolver", | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   "getUrlScheme", | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   "AttrAst", | 
					
						
							|  |  |  |   "BoundDirectivePropertyAst", | 
					
						
							|  |  |  |   "BoundElementPropertyAst", | 
					
						
							|  |  |  |   "BoundEventAst", | 
					
						
							|  |  |  |   "BoundTextAst", | 
					
						
							|  |  |  |   "COMPILER_PROVIDERS", | 
					
						
							|  |  |  |   "CompileDirectiveMetadata", | 
					
						
							|  |  |  |   "CompileTemplateMetadata", | 
					
						
							|  |  |  |   "CompileTypeMetadata", | 
					
						
							|  |  |  |   "DirectiveAst", | 
					
						
							|  |  |  |   "ElementAst", | 
					
						
							|  |  |  |   "EmbeddedTemplateAst", | 
					
						
							|  |  |  |   "NgContentAst", | 
					
						
							|  |  |  |   "PLATFORM_DIRECTIVES", | 
					
						
							|  |  |  |   "PLATFORM_PIPES", | 
					
						
							|  |  |  |   "PropertyBindingType", | 
					
						
							|  |  |  |   "SourceModule", | 
					
						
							|  |  |  |   "SourceWithImports", | 
					
						
							|  |  |  |   "TEMPLATE_TRANSFORMS", | 
					
						
							|  |  |  |   "TemplateCompiler", | 
					
						
							|  |  |  |   "TextAst", | 
					
						
							|  |  |  |   "VariableAst", | 
					
						
							|  |  |  |   "XHR", | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   "createWithoutPackagePrefix", | 
					
						
							|  |  |  |   "templateVisitAll" | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var NG_CORE = [ | 
					
						
							|  |  |  |   'APP_COMPONENT', | 
					
						
							|  |  |  |   'APP_INITIALIZER', | 
					
						
							|  |  |  |   'APP_ID', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'AngularEntrypoint:dart', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'AbstractProviderError', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'AppViewManager', | 
					
						
							|  |  |  |   'ApplicationRef', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'APPLICATION_COMMON_PROVIDERS', | 
					
						
							|  |  |  |   'Attribute', | 
					
						
							|  |  |  |   'AttributeMetadata', | 
					
						
							|  |  |  |   'Binding', | 
					
						
							|  |  |  |   'Provider', | 
					
						
							|  |  |  |   'ProviderBuilder', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'PLATFORM_DIRECTIVES', | 
					
						
							| 
									
										
										
										
											2016-02-20 08:52:51 -08:00
										 |  |  |   "CollectionChangeRecord", | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'ChangeDetectionError', | 
					
						
							|  |  |  |   'ChangeDetectionStrategy', | 
					
						
							|  |  |  |   'ChangeDetectorRef', | 
					
						
							|  |  |  |   'Class:js', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'Compiler', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'Component', | 
					
						
							|  |  |  |   'ComponentMetadata', | 
					
						
							|  |  |  |   'ComponentRef', | 
					
						
							|  |  |  |   'ContentChild', | 
					
						
							|  |  |  |   'ContentChildMetadata', | 
					
						
							|  |  |  |   'ContentChildren', | 
					
						
							|  |  |  |   'ContentChildrenMetadata', | 
					
						
							|  |  |  |   'CyclicDependencyError', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'PLATFORM_PIPES', | 
					
						
							| 
									
										
										
										
											2016-01-29 13:30:36 -08:00
										 |  |  |   'DebugNode', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'DebugElement', | 
					
						
							|  |  |  |   'Dependency', | 
					
						
							|  |  |  |   'DependencyMetadata', | 
					
						
							|  |  |  |   'Directive', | 
					
						
							|  |  |  |   'DirectiveMetadata', | 
					
						
							|  |  |  |   'DirectiveResolver', | 
					
						
							|  |  |  |   'DynamicComponentLoader', | 
					
						
							|  |  |  |   'ElementRef', | 
					
						
							|  |  |  |   'ErrorHandlingFn:dart', | 
					
						
							|  |  |  |   'Output', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'EmbeddedViewRef', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'EventEmitter', | 
					
						
							|  |  |  |   'ExceptionHandler', | 
					
						
							|  |  |  |   'OutputMetadata', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'enableProdMode', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'ExpressionChangedAfterItHasBeenCheckedException', | 
					
						
							|  |  |  |   'Host', | 
					
						
							|  |  |  |   'HostBinding', | 
					
						
							|  |  |  |   'HostBindingMetadata', | 
					
						
							|  |  |  |   'HostListener', | 
					
						
							|  |  |  |   'HostListenerMetadata', | 
					
						
							|  |  |  |   'HostMetadata', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'HostViewFactoryRef', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'Inject', | 
					
						
							|  |  |  |   'InjectMetadata', | 
					
						
							|  |  |  |   'Injectable', | 
					
						
							|  |  |  |   'InjectableMetadata', | 
					
						
							|  |  |  |   'Injector', | 
					
						
							|  |  |  |   'InstantiationError', | 
					
						
							|  |  |  |   'InvalidProviderError', | 
					
						
							|  |  |  |   'IterableDiffers', | 
					
						
							|  |  |  |   'Key', | 
					
						
							| 
									
										
										
										
											2016-02-20 08:52:51 -08:00
										 |  |  |   'KeyValueChangeRecord', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'KeyValueDiffers', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'NgZone', | 
					
						
							| 
									
										
										
										
											2015-10-19 14:41:15 -07:00
										 |  |  |   'NgZoneError', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'NoAnnotationError', | 
					
						
							| 
									
										
										
										
											2015-10-10 22:11:13 -07:00
										 |  |  |   'NoProviderError', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'OpaqueToken', | 
					
						
							|  |  |  |   'Optional', | 
					
						
							|  |  |  |   'OptionalMetadata', | 
					
						
							|  |  |  |   'OutOfBoundsError', | 
					
						
							|  |  |  |   'Pipe', | 
					
						
							|  |  |  |   'PipeMetadata', | 
					
						
							|  |  |  |   'PlatformRef', | 
					
						
							| 
									
										
										
										
											2015-09-30 20:59:23 -07:00
										 |  |  |   'Input', | 
					
						
							|  |  |  |   'InputMetadata', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'Query', | 
					
						
							|  |  |  |   'QueryList', | 
					
						
							|  |  |  |   'QueryMetadata', | 
					
						
							|  |  |  |   'Renderer', | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |   'RootRenderer', | 
					
						
							|  |  |  |   'RenderComponentType', | 
					
						
							| 
									
										
										
										
											2015-10-08 13:33:22 -07:00
										 |  |  |   'ResolvedBinding:dart', | 
					
						
							| 
									
										
										
										
											2015-10-10 22:11:13 -07:00
										 |  |  |   'ResolvedProvider:dart', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'ResolvedFactory', | 
					
						
							|  |  |  |   'Self', | 
					
						
							|  |  |  |   'SelfMetadata', | 
					
						
							|  |  |  |   'SkipSelf', | 
					
						
							|  |  |  |   'SkipSelfMetadata', | 
					
						
							| 
									
										
										
										
											2015-09-23 11:43:31 -07:00
										 |  |  |   'SimpleChange', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'TemplateRef', | 
					
						
							| 
									
										
										
										
											2015-11-17 15:24:36 -08:00
										 |  |  |   'Testability', | 
					
						
							|  |  |  |   'TestabilityRegistry', | 
					
						
							|  |  |  |   'GetTestability:dart', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'setTestabilityGetter', | 
					
						
							|  |  |  |   'Type', | 
					
						
							| 
									
										
										
										
											2015-12-05 02:21:38 -08:00
										 |  |  |   'PACKAGE_ROOT_URL', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'View', | 
					
						
							| 
									
										
										
										
											2015-09-19 18:39:35 -07:00
										 |  |  |   'ViewChild', | 
					
						
							|  |  |  |   'ViewChildMetadata', | 
					
						
							| 
									
										
										
										
											2015-09-17 18:45:14 -07:00
										 |  |  |   'ViewChildren', | 
					
						
							|  |  |  |   'ViewChildrenMetadata', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'ViewContainerRef', | 
					
						
							|  |  |  |   'ViewEncapsulation', | 
					
						
							|  |  |  |   'ViewMetadata', | 
					
						
							|  |  |  |   'ViewQuery', | 
					
						
							|  |  |  |   'ViewQueryMetadata', | 
					
						
							| 
									
										
										
										
											2015-10-16 13:21:31 -04:00
										 |  |  |   'ViewResolver', | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   'WrappedException', | 
					
						
							|  |  |  |   'WrappedValue', | 
					
						
							| 
									
										
										
										
											2015-10-19 14:41:15 -07:00
										 |  |  |   'ZeroArgFunction:dart', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'asNativeElements', | 
					
						
							|  |  |  |   'bind', | 
					
						
							|  |  |  |   'provide', | 
					
						
							|  |  |  |   'createNgZone', | 
					
						
							|  |  |  |   'forwardRef:js', | 
					
						
							|  |  |  |   'platform', | 
					
						
							|  |  |  |   'resolveForwardRef:js', | 
					
						
							| 
									
										
										
										
											2015-11-13 11:21:16 -08:00
										 |  |  |   'PLATFORM_COMMON_PROVIDERS', | 
					
						
							| 
									
										
										
										
											2015-11-18 09:18:37 -08:00
										 |  |  |   'PLATFORM_INITIALIZER', | 
					
						
							| 
									
										
										
										
											2015-10-08 13:33:22 -07:00
										 |  |  |   'AfterContentChecked:dart', | 
					
						
							|  |  |  |   'AfterContentInit:dart', | 
					
						
							|  |  |  |   'AfterViewChecked:dart', | 
					
						
							|  |  |  |   'AfterViewInit:dart', | 
					
						
							|  |  |  |   'DoCheck:dart', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'HostViewRef', | 
					
						
							| 
									
										
										
										
											2015-10-08 13:33:22 -07:00
										 |  |  |   'IterableDifferFactory:dart', | 
					
						
							|  |  |  |   'IterableDiffer:dart', | 
					
						
							|  |  |  |   'KeyValueDifferFactory:dart', | 
					
						
							|  |  |  |   'KeyValueDiffer:dart', | 
					
						
							|  |  |  |   'OnChanges:dart', | 
					
						
							|  |  |  |   'OnDestroy:dart', | 
					
						
							|  |  |  |   'OnInit:dart', | 
					
						
							|  |  |  |   'PipeTransform:dart', | 
					
						
							| 
									
										
										
										
											2015-11-13 11:21:16 -08:00
										 |  |  |   'reflector', | 
					
						
							| 
									
										
										
										
											2015-10-08 13:33:22 -07:00
										 |  |  |   'Stream:dart', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'GetterFn:dart', | 
					
						
							|  |  |  |   'MethodFn:dart', | 
					
						
							|  |  |  |   'NoReflectionCapabilities:dart', | 
					
						
							|  |  |  |   'PlatformReflectionCapabilities:dart', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'ReflectionInfo', | 
					
						
							|  |  |  |   'Reflector', | 
					
						
							| 
									
										
										
										
											2015-12-02 10:35:51 -08:00
										 |  |  |   'SetterFn:dart', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'ViewRef', | 
					
						
							|  |  |  |   'TrackByFn:dart' | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  | var NG_INSTRUMENTATION = | 
					
						
							|  |  |  |     ['wtfCreateScope', 'wtfEndTimeRange', 'wtfLeave', 'WtfScopeFn:dart', 'wtfStartTimeRange']; | 
					
						
							| 
									
										
										
										
											2015-11-13 11:21:16 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | var NG_PLATFORM_BROWSER = [ | 
					
						
							|  |  |  |   'AngularEntrypoint', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'BROWSER_APP_PROVIDERS', | 
					
						
							|  |  |  |   'BROWSER_PROVIDERS', | 
					
						
							|  |  |  |   'BrowserDomAdapter', | 
					
						
							|  |  |  |   'By', | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   'DOCUMENT', | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'ELEMENT_PROBE_PROVIDERS', | 
					
						
							|  |  |  |   'ELEMENT_PROBE_PROVIDERS_PROD_MODE', | 
					
						
							|  |  |  |   'Title', | 
					
						
							|  |  |  |   'bootstrap', | 
					
						
							|  |  |  |   'disableDebugTools', | 
					
						
							|  |  |  |   'enableDebugTools', | 
					
						
							|  |  |  |   'inspectNativeElement' | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  | ]; | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-26 20:17:46 -07:00
										 |  |  | var NG_UPGRADE = [ | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   'UpgradeAdapter', | 
					
						
							|  |  |  |   'UpgradeAdapterRef', | 
					
						
							| 
									
										
										
										
											2015-10-26 20:17:46 -07:00
										 |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | var NG_API = { | 
					
						
							|  |  |  |   ngCommon: NG_COMMON, | 
					
						
							|  |  |  |   ngCompiler: NG_COMPILER, | 
					
						
							|  |  |  |   ngCore: NG_CORE, | 
					
						
							|  |  |  |   ngInstrumentation: NG_INSTRUMENTATION, | 
					
						
							|  |  |  |   ngPlatformBrowser: NG_PLATFORM_BROWSER, | 
					
						
							|  |  |  |   ngUpgrade: NG_UPGRADE | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2015-10-26 20:17:46 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  | export function main() { | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  |   /** | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |    var x = getSymbolsFromLibrary('ng'); | 
					
						
							|  |  |  |    x.sort(); | 
					
						
							|  |  |  |    var parts = []; | 
					
						
							|  |  |  |    x.forEach((i) => parts.push(`'${i'`));
 | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  |   print(`[ ${parts.join(', | 
					
						
							|  |  |  |   ')} ]`);
 | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  |   describe('public API', () => { | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |     var barrelList = | 
					
						
							|  |  |  |         ['ngCommon', 'ngCompiler', 'ngCore', 'ngInstrumentation', 'ngPlatformBrowser', 'ngUpgrade']; | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |     if (IS_DART) { | 
					
						
							|  |  |  |       barrelList = barrelList.filter(b => b !== 'ngUpgrade'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     barrelList.forEach(mod => { | 
					
						
							|  |  |  |       // Dom Events are merged into DomAdapter in Dart
 | 
					
						
							|  |  |  |       if (IS_DART && mod === 'ngPlatformDomEvent') return; | 
					
						
							|  |  |  |       it(`should fail if public API for ${mod} has changed`, () => { | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |         var symbols = getSymbolsFromLibrary(mod); | 
					
						
							|  |  |  |         expect(diff(symbols, NG_API[mod])).toEqual([]); | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |       }) | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |   }); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function diff(actual: string[], expected: string[]): string[] { | 
					
						
							|  |  |  |   ListWrapper.sort(actual, compareIgnoreLang); | 
					
						
							|  |  |  |   ListWrapper.sort(expected, compareIgnoreLang); | 
					
						
							|  |  |  |   let mode = IS_DART ? "dart" : "js"; | 
					
						
							|  |  |  |   let missing = actual.filter(i => expected.indexOf(i) < 0 && expected.indexOf(`${i}:${mode}`) < 0) | 
					
						
							|  |  |  |                     .map(s => `+${s}`); | 
					
						
							|  |  |  |   let extra = expected.filter(i => shouldIgnore(i) ? false : (actual.indexOf(stripLang(i)) < 0)) | 
					
						
							|  |  |  |                   .map(s => `-${s}`); | 
					
						
							|  |  |  |   return ListWrapper.concat(missing, extra); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  | function shouldIgnore(expected: string): boolean { | 
					
						
							|  |  |  |   let isDart = RegExpWrapper.create('\\:dart$'); | 
					
						
							|  |  |  |   let isJs = RegExpWrapper.create('\\:js$'); | 
					
						
							|  |  |  |   return IS_DART ? RegExpWrapper.test(isJs, expected) : RegExpWrapper.test(isDart, expected); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  | function compareIgnoreLang(a: string, b: string): number { | 
					
						
							|  |  |  |   return StringWrapper.compare(stripLang(a), stripLang(b)); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function stripLang(text: string): string { | 
					
						
							|  |  |  |   let index = text.indexOf(':'); | 
					
						
							|  |  |  |   return (index >= 0) ? text.substring(0, index) : text; | 
					
						
							| 
									
										
										
										
											2015-09-14 20:49:29 -07:00
										 |  |  | } |