diff options
author | Kevin Lubick <kjlubick@google.com> | 2018-11-05 07:51:40 -0500 |
---|---|---|
committer | Kevin Lubick <kjlubick@google.com> | 2018-11-05 13:07:02 +0000 |
commit | e71e9ef311ba2ebd67044120b74801c33323a20e (patch) | |
tree | ea92d77eead71d49b0f111cd1086421b1539c58a /experimental | |
parent | 51916083e75254f7bb46ad0e638530259026813a (diff) | |
download | skqp-e71e9ef311ba2ebd67044120b74801c33323a20e.tar.gz |
[canvaskit] Add catchException everywhere
This should make the logs in the bots more actionable by showing
the error and trace.
This also fixes the API change causing mysterious red.
Bug: skia:
Change-Id: I38df2bb4557041f8bdfefcae5c8d95b58e770033
Reviewed-on: https://skia-review.googlesource.com/c/168180
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/canvaskit/tests/path.spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/experimental/canvaskit/tests/path.spec.js b/experimental/canvaskit/tests/path.spec.js index 970c79dd3d..b05660855e 100644 --- a/experimental/canvaskit/tests/path.spec.js +++ b/experimental/canvaskit/tests/path.spec.js @@ -59,7 +59,7 @@ describe('CanvasKit\'s Path Behavior', function() { } it('can draw a path', function(done) { - LoadCanvasKit.then(() => { + LoadCanvasKit.then(catchException(done, () => { // This is taken from example.html const surface = CanvasKit.MakeCanvasSurface('test'); expect(surface).toBeTruthy('Could not make surface') @@ -72,7 +72,7 @@ describe('CanvasKit\'s Path Behavior', function() { paint.setStrokeWidth(1.0); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); - paint.setStyle(CanvasKit.PaintStyle.STROKE); + paint.setStyle(CanvasKit.PaintStyle.Stroke); const path = new CanvasKit.SkPath(); path.moveTo(20, 5); @@ -107,7 +107,7 @@ describe('CanvasKit\'s Path Behavior', function() { paint.delete(); reportSurface(surface, 'path_api_example', done); - }); + })); // See CanvasKit for more tests, since they share implementation }); @@ -122,7 +122,7 @@ describe('CanvasKit\'s Path Behavior', function() { } it('can apply an effect and draw text', function(done) { - LoadCanvasKit.then(() => { + LoadCanvasKit.then(catchException(done, () => { const surface = CanvasKit.MakeCanvasSurface('test'); expect(surface).toBeTruthy('Could not make surface') if (!surface) { @@ -142,7 +142,7 @@ describe('CanvasKit\'s Path Behavior', function() { const dpe = CanvasKit.MakeSkDashPathEffect([15, 5, 5, 10], 1); paint.setPathEffect(dpe); - paint.setStyle(CanvasKit.PaintStyle.STROKE); + paint.setStyle(CanvasKit.PaintStyle.Stroke); paint.setStrokeWidth(5.0); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(66, 129, 164, 1.0)); @@ -156,6 +156,6 @@ describe('CanvasKit\'s Path Behavior', function() { path.delete(); reportSurface(surface, 'effect_and_text_example', done); - }); + })); }); }); |