Bug 176441

Summary: Web Inspector: make Canvas recording tests more human readable
Product: WebKit Reporter: Devin Rousso <drousso>
Component: Web InspectorAssignee: Devin Rousso <drousso>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, buildbot, commit-queue, inspector-bugzilla-changes, joepeck, rniwa, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=176178
Bug Depends on: 176936    
Bug Blocks: 173807    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews100 for mac-elcapitan
none
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews114 for mac-elcapitan
none
Patch
none
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
none
Patch
none
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
none
Patch
none
Archive of layout-test-results from ews112 for mac-elcapitan
none
Patch
none
Archive of layout-test-results from ews114 for mac-elcapitan
none
Patch
none
Patch
none
Archive of layout-test-results from ews112 for mac-elcapitan
none
Patch none

Description Devin Rousso 2017-09-05 22:36:19 PDT
Instead of calling JSON.stringify on the payload, we can format the output ourselves and try to show the data in its non-deduplicated state (after swizzling).
Comment 1 Brian Burg 2017-09-06 09:06:39 PDT
This is a great idea.
Comment 2 Devin Rousso 2017-09-10 00:03:11 PDT
Created attachment 320383 [details]
Patch
Comment 3 Build Bot 2017-09-10 01:10:25 PDT
Comment on attachment 320383 [details]
Patch

Attachment 320383 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4502493

New failing tests:
inspector/canvas/recording-2d.html
inspector/canvas/recording-webgl-snapshots.html
Comment 4 Build Bot 2017-09-10 01:10:26 PDT
Created attachment 320386 [details]
Archive of layout-test-results from ews100 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 5 Build Bot 2017-09-10 01:16:15 PDT
Comment on attachment 320383 [details]
Patch

Attachment 320383 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4502501

New failing tests:
inspector/canvas/recording-webgl-snapshots.html
Comment 6 Build Bot 2017-09-10 01:16:17 PDT
Created attachment 320388 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 7 Build Bot 2017-09-10 01:30:25 PDT
Comment on attachment 320383 [details]
Patch

Attachment 320383 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4502502

New failing tests:
inspector/canvas/recording-2d.html
inspector/canvas/recording-webgl-snapshots.html
Comment 8 Build Bot 2017-09-10 01:30:26 PDT
Created attachment 320389 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 9 Devin Rousso 2017-09-10 15:07:21 PDT
Created attachment 320403 [details]
Patch
Comment 10 Build Bot 2017-09-10 16:19:37 PDT
Comment on attachment 320403 [details]
Patch

Attachment 320403 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4507030

New failing tests:
inspector/canvas/recording-2d.html
Comment 11 Build Bot 2017-09-10 16:19:38 PDT
Created attachment 320405 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 12 Joseph Pecoraro 2017-09-11 19:49:48 PDT
Comment on attachment 320403 [details]
Patch

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

Awesome! r=me

> LayoutTests/inspector/canvas/resources/recording-utilities.js:71
> +                            if (action.parameters[i] != action._payloadParameters[i] && Number.isInteger(action._payloadParameters[i]))

Style: Can we use `!==` here?
Comment 13 Joseph Pecoraro 2017-09-11 19:50:48 PDT
Comment on attachment 320403 [details]
Patch

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

> LayoutTests/inspector/canvas/resources/recording-utilities.js:81
> +                        for (let i = 0; i < action.trace.length; ++i) {

You might want to use `k` instead of `i` again given you are already inside of an `i`. This would trigger "shadow" linter warnings, but it does behave fine right now, its just weird form.
Comment 14 Devin Rousso 2017-09-11 21:33:52 PDT
Comment on attachment 320403 [details]
Patch

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

>> LayoutTests/inspector/canvas/resources/recording-utilities.js:71
>> +                            if (action.parameters[i] != action._payloadParameters[i] && Number.isInteger(action._payloadParameters[i]))
> 
> Style: Can we use `!==` here?

The main reason for not using `!==` is that `1 !== true`, which is what happens when we swizzle boolean values.  I could add another case for that, but I figured that this was slightly cleaner.

>> LayoutTests/inspector/canvas/resources/recording-utilities.js:81
>> +                        for (let i = 0; i < action.trace.length; ++i) {
> 
> You might want to use `k` instead of `i` again given you are already inside of an `i`. This would trigger "shadow" linter warnings, but it does behave fine right now, its just weird form.

Crap.  Weird that ESLint didn't show it :(
Comment 15 Devin Rousso 2017-09-12 14:31:49 PDT
Created attachment 320567 [details]
Patch
Comment 16 Build Bot 2017-09-12 15:45:12 PDT
Comment on attachment 320567 [details]
Patch

Attachment 320567 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4527312

New failing tests:
inspector/canvas/recording-2d.html
Comment 17 Build Bot 2017-09-12 15:45:13 PDT
Created attachment 320574 [details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 18 Devin Rousso 2017-09-13 23:14:37 PDT
Created attachment 320730 [details]
Patch
Comment 19 Build Bot 2017-09-14 00:41:39 PDT
Comment on attachment 320730 [details]
Patch

Attachment 320730 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4542658

New failing tests:
inspector/canvas/recording-webgl.html
Comment 20 Build Bot 2017-09-14 00:41:40 PDT
Created attachment 320741 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 21 Devin Rousso 2017-09-14 00:58:04 PDT
Created attachment 320743 [details]
Patch
Comment 22 Build Bot 2017-09-14 02:30:50 PDT
Comment on attachment 320743 [details]
Patch

Attachment 320743 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4543612

New failing tests:
inspector/canvas/recording-webgl.html
Comment 23 Build Bot 2017-09-14 02:30:51 PDT
Created attachment 320751 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 24 Devin Rousso 2017-09-14 04:14:05 PDT
Created attachment 320757 [details]
Patch
Comment 25 Devin Rousso 2017-09-14 17:46:20 PDT
Created attachment 320856 [details]
Patch
Comment 26 Build Bot 2017-09-14 18:52:45 PDT
Comment on attachment 320856 [details]
Patch

Attachment 320856 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4552934

New failing tests:
inspector/canvas/recording-webgl.html
Comment 27 Build Bot 2017-09-14 18:52:48 PDT
Created attachment 320861 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 28 Devin Rousso 2017-09-14 22:18:24 PDT
Created attachment 320868 [details]
Patch
Comment 29 Joseph Pecoraro 2017-09-18 11:13:35 PDT
Comment on attachment 320868 [details]
Patch

r=me!
Comment 30 WebKit Commit Bot 2017-09-18 15:27:09 PDT
Comment on attachment 320868 [details]
Patch

Clearing flags on attachment: 320868

Committed r222182: <http://trac.webkit.org/changeset/222182>
Comment 31 WebKit Commit Bot 2017-09-18 15:27:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 32 Radar WebKit Bug Importer 2017-09-27 12:53:24 PDT
<rdar://problem/34694214>