license 'use strict' ; ( function ( global ) { const NativeError = global [ 'Error' ] ; NativeError . customProperty = 'customProperty' ; NativeError . customFunction = function ( ) { } ; const fakeCordova = function ( ) { } ; ( fakeCordova as any ) . exec = function ( success , error , service , action , args ) { if ( action === 'successAction' ) { success ( ) ; } else { error ( ) ; } } ; global . cordova = fakeCordova ; const TestTarget = global . TestTarget = function ( ) { } ; Object . defineProperties ( TestTarget . prototype , { 'onprop1' : { configurable : true , writable : true } , 'onprop2' : { configurable : true , writable : true } , 'onprop3' : { configurable : true , get : function ( ) { return this . _onprop3 ; } , set : function ( _value ) { this . _onprop3 = _value ; } } , '_onprop3' : { configurable : true , writable : true , value : function ( ) { } } , 'addEventListener' : { configurable : true , writable : true , value : function ( eventName , callback ) { if ( ! this . events ) { this . events = { } ; } this . events . eventName = { zone : Zone . current , callback : callback } ; } } , 'removeEventListener' : { configurable : true , writable : true , value : function ( eventName , callback ) { if ( ! this . events ) { return ; } this . events . eventName = null ; } } , 'dispatchEvent' : { configurable : true , writable : true , value : function ( eventName ) { const zoneCallback = this . events && this . events . eventName ; zoneCallback && zoneCallback . zone . run ( zoneCallback . callback , this , [ { type : eventName } ] ) ; } } } ) ; const zoneSymbolPrefix = global [ '__Zone_symbol_prefix' ] || '__zone_symbol__' ; global [ '__Zone_ignore_on_properties' ] = [ { target : TestTarget . prototype , ignoreProperties : [ 'prop1' ] } ] ; global [ zoneSymbolPrefix + 'FakeAsyncTestMacroTask' ] = [ { source : 'TestClass.myTimeout' } ] ; global [ zoneSymbolPrefix + 'UNPATCHED_EVENTS' ] = [ 'scroll' ] ; } ) ( typeof window === 'object' && window || typeof self === 'object' && self || global ) ;