RESOLVED FIXED Bug 196710
Web Inspector: Audit: there should be a default test for WebInspectorAudit.Resources functionality
https://bugs.webkit.org/show_bug.cgi?id=196710
Summary Web Inspector: Audit: there should be a default test for WebInspectorAudit.Re...
Devin Rousso
Reported 2019-04-08 14:46:58 PDT
This will likely require that we expose another way for values to be returned, possibly even for arbitrary JSON objects (e.g. there's no non-error way of sending back a resource's contents).
Attachments
Patch (31.89 KB, patch)
2019-05-26 22:57 PDT, Devin Rousso
no flags
Archive of layout-test-results from ews103 for mac-highsierra (3.33 MB, application/zip)
2019-05-26 23:46 PDT, EWS Watchlist
no flags
Patch (34.47 KB, patch)
2019-05-27 00:26 PDT, Devin Rousso
no flags
Archive of layout-test-results from ews103 for mac-highsierra (3.16 MB, application/zip)
2019-05-27 01:32 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.79 MB, application/zip)
2019-05-27 01:46 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews114 for mac-highsierra (3.03 MB, application/zip)
2019-05-27 02:23 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews211 for win-future (14.01 MB, application/zip)
2019-05-27 04:45 PDT, EWS Watchlist
no flags
Patch (44.71 KB, patch)
2019-05-27 11:39 PDT, Devin Rousso
no flags
Archive of layout-test-results from ews101 for mac-highsierra (3.08 MB, application/zip)
2019-05-27 12:45 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.71 MB, application/zip)
2019-05-27 12:58 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews113 for mac-highsierra (2.89 MB, application/zip)
2019-05-27 13:27 PDT, EWS Watchlist
no flags
Patch (48.40 KB, patch)
2019-05-27 14:06 PDT, Devin Rousso
no flags
Patch (56.67 KB, patch)
2019-05-30 09:41 PDT, Devin Rousso
no flags
Patch (56.59 KB, patch)
2019-05-30 16:06 PDT, Devin Rousso
no flags
Radar WebKit Bug Importer
Comment 1 2019-04-08 14:48:33 PDT
Devin Rousso
Comment 2 2019-05-26 22:57:12 PDT
Created attachment 370671 [details] Patch My local build is currently not building (unrelated), so this is a test using the bots instead :|
EWS Watchlist
Comment 3 2019-05-26 22:59:33 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 4 2019-05-26 23:46:05 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 5 2019-05-26 23:46:07 PDT Comment hidden (obsolete)
Devin Rousso
Comment 6 2019-05-27 00:26:35 PDT
Created attachment 370674 [details] Patch Fix typo :P
EWS Watchlist
Comment 7 2019-05-27 01:32:26 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 8 2019-05-27 01:32:28 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 9 2019-05-27 01:46:24 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 10 2019-05-27 01:46:26 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 11 2019-05-27 02:23:16 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 12 2019-05-27 02:23:18 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 13 2019-05-27 04:45:46 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 14 2019-05-27 04:45:50 PDT Comment hidden (obsolete)
Devin Rousso
Comment 15 2019-05-27 11:39:19 PDT
EWS Watchlist
Comment 16 2019-05-27 12:45:06 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 17 2019-05-27 12:45:08 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 18 2019-05-27 12:58:16 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 19 2019-05-27 12:58:18 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 20 2019-05-27 13:27:02 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 21 2019-05-27 13:27:04 PDT Comment hidden (obsolete)
Devin Rousso
Comment 22 2019-05-27 14:06:40 PDT
Devin Rousso
Comment 23 2019-05-29 23:20:38 PDT
Comment on attachment 370707 [details] Patch There should be a provided `data-custom` default Audit that can act as a demo of both this special functionality and a good way to see the UI for custom return values.
Devin Rousso
Comment 24 2019-05-30 09:41:52 PDT
Joseph Pecoraro
Comment 25 2019-05-30 15:24:25 PDT
Comment on attachment 370948 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=370948&action=review rs=me > Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js:285 > + } catch (e) { Style: No need for the `(e)` if it is not used. > Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js:287 > + if (key !== "__proto__") Can we just skip __proto__ earlier, I don't think we'd want to set it. > Source/WebInspectorUI/UserInterface/Models/AuditTestCaseResult.js:136 > + if (key === "domNodes" || key === "domAttributes" || key === "errors") { Might be useful to make a static function for special attributes? AuditTestCaseResult.isSpecialAttribute(key) > Source/WebInspectorUI/UserInterface/Views/AuditTestCaseContentView.js:36 > + this._resultDataNonSpecialContainer = null; Instead of "NonSpecial" maybe "General" or "CustomData" would be a better name. > Source/WebInspectorUI/UserInterface/Views/AuditTestCaseContentView.js:141 > + let nonSpecialData = Object.filter(resultData, (key) => key !== "domNodes" && key !== "errors"); domAttributes? > LayoutTests/inspector/unit-tests/object-utilities-expected.txt:26 > +PASS: filter should remove all entries where the key isn't in ["a","b","c"] Nit: These normally end in a period.
Devin Rousso
Comment 26 2019-05-30 16:03:40 PDT
Comment on attachment 370948 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=370948&action=review >> Source/WebInspectorUI/UserInterface/Models/AuditTestCaseResult.js:136 >> + if (key === "domNodes" || key === "domAttributes" || key === "errors") { > > Might be useful to make a static function for special attributes? > > AuditTestCaseResult.isSpecialAttribute(key) It's less "special", more that we require that the value is an array. >> Source/WebInspectorUI/UserInterface/Views/AuditTestCaseContentView.js:141 >> + let nonSpecialData = Object.filter(resultData, (key) => key !== "domNodes" && key !== "errors"); > > domAttributes? I'm fine showing `domAttributes` as part of `this._resultDataGeneralContainer`, as it otherwise would only be visible if `domNodes` has values in it.
Devin Rousso
Comment 27 2019-05-30 16:06:44 PDT
WebKit Commit Bot
Comment 28 2019-05-30 17:12:09 PDT
Comment on attachment 370989 [details] Patch Clearing flags on attachment: 370989 Committed r245914: <https://trac.webkit.org/changeset/245914>
WebKit Commit Bot
Comment 29 2019-05-30 17:12:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.