haikuwebkit/LayoutTests/inspector/audit
Patrick Angle 8ea2ceaf04 Web Inspector: Default Audits script are minified in release builds
https://bugs.webkit.org/show_bug.cgi?id=225009

Reviewed by BJ Burg.

Source/WebInspectorUI:

Covered by new test:
- inspector/audit/non-minified-default-audits.html

The default audits have been moved out of `AuditManager.js` and into a special `DefaultAudits.js` in the new
`NonMinified` directory, which contains JavaScript sources that should be included in `Main.js` and
`TestCombined.js`, but should not have whitespace stripped from their contents because the whitespace is
important to the script. For example, the source for the default audits are visible to the user, and therefore
we want to present well-formatted source in those contexts.

* Scripts/combine-resources.pl:
- Added `NonMinified` directory to list of default `inputDirectoryPattern` exceptions for combining resources.
- Added `--skip-concatenate-tag` so that we don't add tags for script we will eventually append to another script.
* Scripts/copy-user-interface-resources.pl:
- Handle `NonMinified` directory for sources that will be appended to Main.js, but should not be minified.
- Handle `NonMinified` directory for sources that will be appended to TestCombined.js.
(combineOrStripResourcesForWebKitAdditions):
- Drive-by fix for typo in combineOrStripResourcesForWebKitAdditions that caused errors to be emitted during builds.
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
(WI.AuditManager.prototype._addDefaultTests.const.levelPass): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelWarn): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelFail): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelError): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.levelUnsupported): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataDOMNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataDOMAttributes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataErrors): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.dataCustom): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getElementsByComputedRole): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getActiveDescendant): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getChildNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getComputedProperties): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getControlledNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getFlowedNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getMouseEventNode): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getOwnedNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getParentNode): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getSelectedChildNodes): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.hasEventListeners): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.hasEventListenersClick): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getResources): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.getResourceContent): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.unsupported): Deleted.
(WI.AuditManager.prototype._addDefaultTests.hasChildWithRole): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testMenuRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testGridRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForAriaLabelledBySpelling): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForMultipleBanners): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForLinkLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testRowGroupRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testTableRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForMultipleLiveRegions): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testListBoxRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testImageLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForAriaHiddenFalse): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testTreeRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testRadioGroupRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testFeedRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testTabListRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testButtonLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testRowRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testListRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testComboBoxRoleForRequiredChildren): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForMultipleMainContentSections): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testDialogsForLabels): Deleted.
(WI.AuditManager.prototype._addDefaultTests.const.testForInvalidAriaHiddenValue): Deleted.
(WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Deleted.
* UserInterface/Main.html:
* UserInterface/NonMinified/DefaultAudits.js: Added.
(WI.DefaultAudits.levelPass):
(WI.DefaultAudits.levelWarn):
(WI.DefaultAudits.levelFail):
(WI.DefaultAudits.levelError):
(WI.DefaultAudits.levelUnsupported):
(WI.DefaultAudits.dataDOMNodes):
(WI.DefaultAudits.dataDOMAttributes):
(WI.DefaultAudits.dataErrors):
(WI.DefaultAudits.dataCustom):
(WI.DefaultAudits.getElementsByComputedRole):
(WI.DefaultAudits.getActiveDescendant):
(WI.DefaultAudits.getChildNodes):
(WI.DefaultAudits.getComputedProperties):
(WI.DefaultAudits.getControlledNodes):
(WI.DefaultAudits.getFlowedNodes):
(WI.DefaultAudits.getMouseEventNode):
(WI.DefaultAudits.getOwnedNodes):
(WI.DefaultAudits.getParentNode):
(WI.DefaultAudits.getSelectedChildNodes):
(WI.DefaultAudits.hasEventListeners):
(WI.DefaultAudits.hasEventListenersClick):
(WI.DefaultAudits.getResources):
(WI.DefaultAudits.getResourceContent):
(WI.DefaultAudits.unsupported):
(hasChildWithRole):
(WI.DefaultAudits.testMenuRoleForRequiredChildren):
(WI.DefaultAudits.testGridRoleForRequiredChildren):
(WI.DefaultAudits.testForAriaLabelledBySpelling):
(WI.DefaultAudits.testForMultipleBanners):
(WI.DefaultAudits.testForLinkLabels):
(WI.DefaultAudits.testRowGroupRoleForRequiredChildren):
(WI.DefaultAudits.testTableRoleForRequiredChildren):
(WI.DefaultAudits.testForMultipleLiveRegions):
(WI.DefaultAudits.testListBoxRoleForRequiredChildren):
(WI.DefaultAudits.testImageLabels):
(WI.DefaultAudits.testForAriaHiddenFalse):
(WI.DefaultAudits.testTreeRoleForRequiredChildren):
(WI.DefaultAudits.testRadioGroupRoleForRequiredChildren):
(WI.DefaultAudits.testFeedRoleForRequiredChildren):
(WI.DefaultAudits.testTabListRoleForRequiredChildren):
(WI.DefaultAudits.testButtonLabels):
(WI.DefaultAudits.testRowRoleForRequiredChildren):
(WI.DefaultAudits.testListRoleForRequiredChildren):
(WI.DefaultAudits.testComboBoxRoleForRequiredChildren):
(WI.DefaultAudits.testForMultipleMainContentSections):
(WI.DefaultAudits.testDialogsForLabels):
(WI.DefaultAudits.testForInvalidAriaHiddenValue):
* UserInterface/Test.html:

LayoutTests:

Added test to check that whitespace is preserved in default audits.

* inspector/audit/non-minified-default-audits-expected.txt: Added.
* inspector/audit/non-minified-default-audits.html: Added.


Canonical link: https://commits.webkit.org/237097@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-27 23:53:42 +00:00
..
resources
basic-async-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-async.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-boolean-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-boolean.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-debugger-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-debugger.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-error-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-error.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-object-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-object.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-promise-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-promise.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-string-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-string.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
basic-timeout-expected.txt [ Mac Debug ] Layout Test inspector/audit/basic.html is a flaky timeout on bots 2019-05-13 22:16:55 +00:00
basic-timeout.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
data-domAttributes-expected.txt Web Inspector: replace all unicode characters with the escaped character code 2018-11-30 18:55:38 +00:00
data-domAttributes.html
data-domNodes-expected.txt Web Inspector: replace all unicode characters with the escaped character code 2018-11-30 18:55:38 +00:00
data-domNodes.html
data-errors-expected.txt Web Inspector: replace all unicode characters with the escaped character code 2018-11-30 18:55:38 +00:00
data-errors.html
manager-start-setup-expected.txt Web Inspector: Audit: there should be a default test for WebInspectorAudit.Resources functionality 2019-05-31 00:12:03 +00:00
manager-start-setup.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
non-minified-default-audits-expected.txt Web Inspector: Default Audits script are minified in release builds 2021-04-27 23:53:42 +00:00
non-minified-default-audits.html Web Inspector: Default Audits script are minified in release builds 2021-04-27 23:53:42 +00:00
run-accessibility-expected.txt Web Inspector: Audit: provide a way to get related Accessibility properties for a given node 2019-01-23 00:32:59 +00:00
run-accessibility.html Web Inspector: Audit: provide a way to get related Accessibility properties for a given node 2019-01-23 00:32:59 +00:00
run-dom-expected.txt Web Inspector: Audit: provide a way to determine whether a give node has event listeners 2019-01-15 16:31:05 +00:00
run-dom.html Web Inspector: Audit: provide a way to determine whether a give node has event listeners 2019-01-15 16:31:05 +00:00
run-expected.txt Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
run-resources-expected.txt Web Inspector: Audit: provide a way to get the contents of resources 2019-03-14 10:13:57 +00:00
run-resources.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
run.html Web Inspector: Audit: should be able to create/edit imported audits 2020-08-29 01:39:46 +00:00
setup-expected.txt Web Inspector: unify agent command error messages 2019-08-27 01:02:20 +00:00
setup.html Web Inspector: Audit: create new IDL type for exposing special functionality in test context 2019-01-15 08:25:33 +00:00
teardown-expected.txt Web Inspector: unify agent command error messages 2019-08-27 01:02:20 +00:00
teardown.html Web Inspector: Audit: create new IDL type for exposing special functionality in test context 2019-01-15 08:25:33 +00:00
version-expected.txt Web Inspector: expose Audit and Recording versions to the frontend 2019-01-23 04:17:06 +00:00
version.html Web Inspector: rework frontend agent construction to allow commands/events to be controlled by the related target's type 2019-10-17 08:00:46 +00:00