WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 195265
Web Inspector: Audit: there should be a centralized place for reusable code
https://bugs.webkit.org/show_bug.cgi?id=195265
Summary
Web Inspector: Audit: there should be a centralized place for reusable code
Devin Rousso
Reported
2019-03-03 21:27:58 PST
As developers write their own audits, they will run into situations where they will want to reuse code.
Attachments
Patch
(24.26 KB, patch)
2019-03-03 21:29 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-highsierra
(2.63 MB, application/zip)
2019-03-03 22:15 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2
(2.80 MB, application/zip)
2019-03-03 22:30 PST
,
EWS Watchlist
no flags
Details
Patch
(27.14 KB, patch)
2019-03-03 22:57 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-highsierra
(2.48 MB, application/zip)
2019-03-04 00:00 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews104 for mac-highsierra-wk2
(2.58 MB, application/zip)
2019-03-04 00:12 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews117 for mac-highsierra
(1.79 MB, application/zip)
2019-03-04 00:45 PST
,
EWS Watchlist
no flags
Details
Patch
(27.17 KB, patch)
2019-03-04 11:05 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2
(2.48 MB, application/zip)
2019-03-04 13:08 PST
,
EWS Watchlist
no flags
Details
Patch
(27.62 KB, patch)
2019-03-07 01:27 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2019-03-03 21:28:13 PST
<
rdar://problem/47040673
>
Devin Rousso
Comment 2
2019-03-03 21:29:58 PST
Created
attachment 363484
[details]
Patch
Devin Rousso
Comment 3
2019-03-03 21:32:56 PST
Comment on
attachment 363484
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=363484&action=review
> Source/WebInspectorUI/UserInterface/Models/AuditTestBase.js:106 > + async setup()
I'm on the fence as to whether this should bump the `Audit.version`. On one hand, it's new functionality that should be able to be feature-checked. On the other hand, this is a purely additive change and won't affect any existing ability to run code. I'm leaning towards bumping the version, as otherwise an audit written with the expectation of being able to use `setup` would most likely fail with many errors (e.g. functionality defined in the `setup` would be missing).
EWS Watchlist
Comment 4
2019-03-03 22:15:03 PST
Comment hidden (obsolete)
Comment on
attachment 363484
[details]
Patch
Attachment 363484
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/11358610
New failing tests: inspector/audit/teardown.html inspector/audit/data-errors.html inspector/audit/data-domAttributes.html inspector/audit/run-dom.html inspector/audit/data-domNodes.html inspector/audit/run-accessibility.html inspector/audit/basic.html
EWS Watchlist
Comment 5
2019-03-03 22:15:04 PST
Comment hidden (obsolete)
Created
attachment 363487
[details]
Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 6
2019-03-03 22:30:41 PST
Comment hidden (obsolete)
Comment on
attachment 363484
[details]
Patch
Attachment 363484
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/11358722
New failing tests: inspector/audit/teardown.html inspector/audit/data-errors.html inspector/audit/data-domAttributes.html inspector/audit/data-domNodes.html inspector/audit/run-accessibility.html inspector/audit/basic.html
EWS Watchlist
Comment 7
2019-03-03 22:30:43 PST
Comment hidden (obsolete)
Created
attachment 363488
[details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Devin Rousso
Comment 8
2019-03-03 22:57:12 PST
Created
attachment 363491
[details]
Patch
EWS Watchlist
Comment 9
2019-03-03 22:59:56 PST
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
EWS Watchlist
Comment 10
2019-03-04 00:00:55 PST
Comment hidden (obsolete)
Comment on
attachment 363491
[details]
Patch
Attachment 363491
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/11359368
New failing tests: inspector/audit/data-domNodes.html inspector/audit/data-domAttributes.html inspector/audit/data-errors.html inspector/audit/basic.html
EWS Watchlist
Comment 11
2019-03-04 00:00:57 PST
Comment hidden (obsolete)
Created
attachment 363494
[details]
Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 12
2019-03-04 00:12:52 PST
Comment hidden (obsolete)
Comment on
attachment 363491
[details]
Patch
Attachment 363491
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/11359382
New failing tests: inspector/audit/data-domNodes.html inspector/audit/data-domAttributes.html inspector/audit/data-errors.html inspector/audit/basic.html
EWS Watchlist
Comment 13
2019-03-04 00:12:54 PST
Comment hidden (obsolete)
Created
attachment 363495
[details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 14
2019-03-04 00:45:33 PST
Comment hidden (obsolete)
Comment on
attachment 363491
[details]
Patch
Attachment 363491
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/11359440
New failing tests: inspector/audit/data-domNodes.html inspector/audit/data-domAttributes.html inspector/audit/data-errors.html inspector/audit/basic.html
EWS Watchlist
Comment 15
2019-03-04 00:45:35 PST
Comment hidden (obsolete)
Created
attachment 363498
[details]
Archive of layout-test-results from ews117 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-highsierra Platform: Mac OS X 10.13.6
Devin Rousso
Comment 16
2019-03-04 11:05:24 PST
Created
attachment 363529
[details]
Patch
EWS Watchlist
Comment 17
2019-03-04 13:08:37 PST
Comment hidden (obsolete)
Comment on
attachment 363529
[details]
Patch
Attachment 363529
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/11365188
New failing tests: fast/viewport/ios/device-width-viewport-after-changing-view-scale.html
EWS Watchlist
Comment 18
2019-03-04 13:08:39 PST
Comment hidden (obsolete)
Created
attachment 363545
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Joseph Pecoraro
Comment 19
2019-03-06 20:35:31 PST
Comment on
attachment 363529
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=363529&action=review
Awesome! r=me
> LayoutTests/inspector/audit/manager-start-setup.html:86 > + description: "Check that Audit.run is able to respond with a RemoteObject.",
Some of these descriptions are a little generic given this is testing nested behavior.
> LayoutTests/inspector/audit/manager-start-setup.html:98 > + async test() { > + const setupA = (function() { > + WebInspectorAudit.__test = "A"; > + }).toString(); > + > + const setupB = (function() { > + WebInspectorAudit.__test = "B"; > + }).toString(); > + > + let audit = new WI.AuditTestGroup("AuditManager.prototype.start.OverriddenLevelSetup.Group", [ > + new WI.AuditTestCase("AuditManager.prototype.start.OverriddenLevelSetup.Test", auditTestString, {setup: setupA}), > + ], {setup: setupB});
Do I understand correctly that both of these setup's ran, and "A" ran first and was overridden by "B". So our chain is only the Top Level setup, and the per-test Setup, but no additional groups in between?
Devin Rousso
Comment 20
2019-03-07 00:48:45 PST
Comment on
attachment 363529
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=363529&action=review
>> LayoutTests/inspector/audit/manager-start-setup.html:86 >> + description: "Check that Audit.run is able to respond with a RemoteObject.", > > Some of these descriptions are a little generic given this is testing nested behavior.
Copypasta :P Will fix.
>> LayoutTests/inspector/audit/manager-start-setup.html:98 >> + ], {setup: setupB}); > > Do I understand correctly that both of these setup's ran, and "A" ran first and was overridden by "B". > > So our chain is only the Top Level setup, and the per-test Setup, but no additional groups in between?
Not quite. This test is to make sure that we only run the top-level test. What I really should be doing is adding to `WebInspectorAudit.__test` so that we can confirm that `"A"` never gets added to the string. The idea is that only top-level `setup` are ever run.
Devin Rousso
Comment 21
2019-03-07 01:27:26 PST
Created
attachment 363856
[details]
Patch
WebKit Commit Bot
Comment 22
2019-03-12 11:56:34 PDT
Comment on
attachment 363856
[details]
Patch Clearing flags on attachment: 363856 Committed
r242808
: <
https://trac.webkit.org/changeset/242808
>
WebKit Commit Bot
Comment 23
2019-03-12 11:56:36 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.
Top of Page
Format For Printing
XML
Clone This Bug