Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / modules / canvaskit / tests / bazel / canvaskitinit.js
1 // The increased timeout is especially needed with larger binaries
2 // like in the debug/gpu build
3 jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
4
5 let CanvasKit = null;
6 const _LoadCanvasKit = new Promise((resolve, reject) => {
7     console.log('canvaskit loading', new Date());
8     CanvasKitInit({
9         locateFile: (file) => '/static/skia/modules/canvaskit/canvaskit_wasm/'+file,
10     }).then((loaded) => {
11         console.log('canvaskit loaded', new Date());
12         CanvasKit = loaded;
13         resolve();
14     }).catch((e) => {
15         console.error('canvaskit failed to load', new Date(), e);
16         reject();
17     });
18 });
19
20 const _TestReportServer = new Promise((resolve, reject) => {
21     fetch('/gold_rpc/healthz').then((resp) => {
22         if (resp.ok) {
23             resolve();
24             return;
25         }
26         console.log('/healthz returned non 200 code')
27         reject();
28     }).catch((e) => {
29         console.log('Server for reporting results was not up', e)
30         reject();
31     });
32 });
33
34 const EverythingLoaded = Promise.all([_LoadCanvasKit, _TestReportServer]);