(imageReady)
| 23 | } |
| 24 | |
| 25 | function loadInPhantom(imageReady) { |
| 26 | var xhr = new XMLHttpRequest(); |
| 27 | |
| 28 | xhr.responseType = 'blob'; |
| 29 | xhr.open('GET', 'base/test/fixtures/gh.png'); |
| 30 | xhr.onload = function() { |
| 31 | var reader = new FileReader(); |
| 32 | |
| 33 | reader.onloadend = function() { |
| 34 | var imageB64 = btoa(reader.result); |
| 35 | var imageBlob = reader.result; |
| 36 | |
| 37 | imageReady(imageB64, imageBlob); |
| 38 | }; |
| 39 | |
| 40 | reader.readAsBinaryString(xhr.response); |
| 41 | }; |
| 42 | |
| 43 | xhr.send(); |
| 44 | } |
| 45 | |
| 46 | function loadInRealBrowser(imageReady) { |
| 47 | // jscs:disable |
no outgoing calls
no test coverage detected
searching dependent graphs…