Bug 178805 - Web Inspector: Canvas Tab: starting a second recording doesn't show red titlebar if the first recording was empty
Summary: Web Inspector: Canvas Tab: starting a second recording doesn't show red title...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL: http://acko.net
Keywords: InRadar
Depends on:
Blocks: WebInspectorCanvasRecording WebInspectorCanvasTab
  Show dependency treegraph
 
Reported: 2017-10-25 10:12 PDT by BJ Burg
Modified: 2017-12-04 17:40 PST (History)
5 users (show)

See Also:


Attachments
Patch (4.89 KB, patch)
2017-10-25 12:31 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (4.89 KB, patch)
2017-10-25 14:20 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-10-25 10:12:56 PDT
STR:

1. Go to a site with a canvas that doesn't do anything without interaction (acko.net)
2. Select the Canvas, start a recording
3. Stop the recording
=> Nothing happens, the recording is empty
4. Start a new recording again
=> Red titlebar not present, Recording button doesn't change from circle to square
Comment 1 Radar WebKit Bug Importer 2017-10-25 10:13:19 PDT
<rdar://problem/35176303>
Comment 2 Devin Rousso 2017-10-25 12:31:44 PDT
Created attachment 324865 [details]
Patch
Comment 3 BJ Burg 2017-10-25 13:24:13 PDT
Comment on attachment 324865 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=324865&action=review

r=me with some test issues. Please re-EWS the test changes, thanks.

> LayoutTests/inspector/canvas/recording-2d.html:480
> +                throw "Missing 2D canvas.";

Does an async function wrap this in an Error? If not, please throw an Error. Throwing a string will lose exception context, IIRC.

> LayoutTests/inspector/canvas/recording-2d.html:493
> +            await CanvasAgent.stopRecording(canvas.identifier);

It is weird to use CanvasAgent directly, but use CanvasManager right above. I'd prefer you stick to manager API if using inspector-test.js
Comment 4 Devin Rousso 2017-10-25 14:14:51 PDT
Comment on attachment 324865 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=324865&action=review

>> LayoutTests/inspector/canvas/recording-2d.html:493
>> +            await CanvasAgent.stopRecording(canvas.identifier);
> 
> It is weird to use CanvasAgent directly, but use CanvasManager right above. I'd prefer you stick to manager API if using inspector-test.js

The issue with using CanvasManager is that it doesn't return a promise, meaning that we cant use async-await.  I'll restructure the test to make it work.
Comment 5 Devin Rousso 2017-10-25 14:20:08 PDT
Created attachment 324895 [details]
Patch
Comment 6 BJ Burg 2017-10-25 14:45:24 PDT
Comment on attachment 324895 [details]
Patch

r=mews
Comment 7 BJ Burg 2017-10-25 14:45:49 PDT
(In reply to Devin Rousso from comment #4)
> Comment on attachment 324865 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=324865&action=review
> 
> >> LayoutTests/inspector/canvas/recording-2d.html:493
> >> +            await CanvasAgent.stopRecording(canvas.identifier);
> > 
> > It is weird to use CanvasAgent directly, but use CanvasManager right above. I'd prefer you stick to manager API if using inspector-test.js
> 
> The issue with using CanvasManager is that it doesn't return a promise,
> meaning that we cant use async-await.  I'll restructure the test to make it
> work.

I figured. Sorry to ruin your fun. Someday we'll fix that?
Comment 8 WebKit Commit Bot 2017-10-25 16:50:15 PDT
Comment on attachment 324895 [details]
Patch

Clearing flags on attachment: 324895

Committed r223998: <https://trac.webkit.org/changeset/223998>
Comment 9 WebKit Commit Bot 2017-10-25 16:50:16 PDT
All reviewed patches have been landed.  Closing bug.