Summary: | Web Inspector: REGRESSION(r221901): Single frame recordings don't reset the recording navigation item | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, mattbaker, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 176762 | ||||||
Bug Blocks: | 173807 | ||||||
Attachments: |
|
Description
Devin Rousso
2017-09-14 01:03:30 PDT
Created attachment 320744 [details]
Patch
Comment on attachment 320744 [details]
Patch
r-, because we should be able to add test coverage for this. In recording2d.html whenever RecordingFinished is received, we should check that WI.CanvasManager.recordingCanvas is null.
I should have added this test when introducing this change.
(In reply to Matt Baker from comment #2) > Comment on attachment 320744 [details] > Patch > > r-, because we should be able to add test coverage for this. In > recording2d.html whenever RecordingFinished is received, we should check > that WI.CanvasManager.recordingCanvas is null. > > I should have added this test when introducing this change. None of the tests use `CanvasManager.prototype.startRecording`. All the recording tests directly call `requestRecording`/`cancelRecording` on `CanvasAgent`. The issue is that the `CanvasManager` functions don't expose the `error` object or allow for a callback, both of which are needed in the tests. (In reply to Devin Rousso from comment #3) > (In reply to Matt Baker from comment #2) > > Comment on attachment 320744 [details] > > Patch > > > > r-, because we should be able to add test coverage for this. In > > recording2d.html whenever RecordingFinished is received, we should check > > that WI.CanvasManager.recordingCanvas is null. > > > > I should have added this test when introducing this change. > > None of the tests use `CanvasManager.prototype.startRecording`. All the > recording tests directly call `requestRecording`/`cancelRecording` on > `CanvasAgent`. The issue is that the `CanvasManager` functions don't expose > the `error` object or allow for a callback, both of which are needed in the > tests. If CanvasManager isn't testable, then we should take steps to address that. Updating it to be promise-based would be one solution. We could also rely more of event dispatched from the manager. Currently, when requestRecording fails CanvasManager dispatches a RecordingFinished event with a null recording. This is enough information to write a test, as long as you don't care about the actual error message. Comment on attachment 320744 [details]
Patch
r=me
Comment on attachment 320744 [details] Patch Clearing flags on attachment: 320744 Committed r222171: <http://trac.webkit.org/changeset/222171> All reviewed patches have been landed. Closing bug. |