2019-03-06 14:30:44 +00:00
|
|
|
// The increased timeout is especially needed with larger binaries
|
|
|
|
// like in the debug/gpu build
|
|
|
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
|
|
|
|
|
|
|
|
let CanvasKit = null;
|
|
|
|
const LoadCanvasKit = new Promise(function(resolve, reject) {
|
2019-03-07 16:31:08 +00:00
|
|
|
console.log('canvaskit loading', new Date());
|
2019-03-06 14:30:44 +00:00
|
|
|
CanvasKitInit({
|
|
|
|
locateFile: (file) => '/canvaskit/'+file,
|
|
|
|
}).ready().then((loaded) => {
|
2019-03-07 13:43:11 +00:00
|
|
|
console.log('canvaskit loaded', new Date());
|
2019-03-06 14:30:44 +00:00
|
|
|
CanvasKit = loaded;
|
|
|
|
resolve();
|
2019-03-07 13:43:11 +00:00
|
|
|
}).catch((e) => {
|
|
|
|
console.error('canvaskit failed to load', new Date(), e);
|
|
|
|
reject();
|
2019-03-06 14:30:44 +00:00
|
|
|
});
|
|
|
|
});
|