-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[canvaskit] Remove additional copies of CanvasKit when testing
Speculative fix for flaky test bot. My guess is that since there were 3 .spec.js that were all trying to load CanvasKit at the same time, the browser would fail to compile/process all that WASM and timeout. This cleans it up so there's only one copy of CanvasKit shared by all tests. Bug: skia:8810 Change-Id: I60a77dae93b7c3e5d45923b4af93a223ac26220c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198161 Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
- Loading branch information
Showing
7 changed files
with
15 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// 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) { | ||
CanvasKitInit({ | ||
locateFile: (file) => '/canvaskit/'+file, | ||
}).ready().then((loaded) => { | ||
CanvasKit = loaded; | ||
resolve(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters