(image: ImageModule.Image, src: string)
| 55 | const IMAGE_LOADED_EVENT = 'isLoadingChange'; |
| 56 | |
| 57 | function runImageTestSync(image: ImageModule.Image, src: string) { |
| 58 | image.loadMode = 'sync'; |
| 59 | image.src = null; |
| 60 | |
| 61 | const page = helper.getCurrentPage(); |
| 62 | page.content = image; |
| 63 | |
| 64 | image.src = src; |
| 65 | |
| 66 | let imageSourceAvailable = __APPLE__ ? !!image.imageSource : true; |
| 67 | TKUnit.assertFalse(image.isLoading, 'Image.isLoading should be false.'); |
| 68 | TKUnit.assertTrue(imageSourceAvailable, 'imageSource should be set.'); |
| 69 | } |
| 70 | |
| 71 | function runImageTestAsync(image: ImageModule.Image, src: string, done: (e: any) => void) { |
| 72 | image.loadMode = 'async'; |
no outgoing calls
no test coverage detected