skia2/experimental/canvaskit/tests/canvaskitinit.js
Kevin Lubick f2aaa0815b [canvaskit] more testing logs
Bug: skia:
Change-Id: Iaf6210f58cad82648756b7593d09396aeaf3a7fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198660
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-07 16:54:13 +00:00

18 lines
596 B
JavaScript

// 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) {
console.log('canvaskit loading', new Date());
CanvasKitInit({
locateFile: (file) => '/canvaskit/'+file,
}).ready().then((loaded) => {
console.log('canvaskit loaded', new Date());
CanvasKit = loaded;
resolve();
}).catch((e) => {
console.error('canvaskit failed to load', new Date(), e);
reject();
});
});