Bug 226800

Summary: [LayoutTests] Delete unused LayoutTests/inspector resources
Product: WebKit Reporter: Amir Mark Jr <amir_mark>
Component: Tools / TestsAssignee: Amir Mark Jr <amir_mark>
Status: RESOLVED FIXED    
Severity: Normal CC: 4536uik, darin, eric.carlson, ews-watchlist, glenn, hi, jbedard, jenner, jer.noble, philipj, sergio, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Amir Mark Jr 2021-06-08 17:37:48 PDT
There a number of unused LayoutTest/inspector resources that are not used that should be deleted.
Comment 1 Radar WebKit Bug Importer 2021-06-08 17:39:07 PDT
<rdar://problem/79045870>
Comment 2 Amir Mark Jr 2021-06-08 17:45:03 PDT
Created attachment 430925 [details]
Patch
Comment 3 Devin Rousso 2021-06-08 18:08:27 PDT
Comment on attachment 430925 [details]
Patch

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

> LayoutTests/ChangeLog:12
> +        * inspector/formatting/resources/css-tests/basic-expected.css: Removed.

These are used by tests inside `inspector/formatting-*.html`.  They're just not included directly and instead are loaded by Web Inspector (see `loadFormattingTestAndExpectedResults` inside `inspector/formatting/resources/formatting-utilities.js`).
Comment 4 Robert Jenner 2021-06-09 15:17:30 PDT
These were the three tests that started to fail with the proposed patch above:
inspector/formatting/formatting-xml.html
inspector/formatting/formatting-css.html
inspector/formatting/formatting-html.html

They required the following resources that were deleted in that patch:
inspector/formatting/resources/xml-tests/atom-expected.xml
inspector/formatting/resources/xml-tests/basic-expected.xml
inspector/formatting/resources/xml-tests/rss-expected.xml
inspector/formatting/resources/xml-tests/self-closing-expected.xml
inspector/formatting/resources/xml-tests/tag-case-expected.xml
inspector/formatting/resources/xml-tests/valid-html-invalid-xml-expected.xml
inspector/formatting/resources/xml-tests/xslt-expected.xml
inspector/formatting/resources/css-tests/basic-expected.css
inspector/formatting/resources/css-tests/comment-expected.css
inspector/formatting/resources/css-tests/gradient-expected.css
inspector/formatting/resources/css-tests/keyframes-expected.css
inspector/formatting/resources/css-tests/media-query-expected.css
inspector/formatting/resources/css-tests/selectors-expected.css
inspector/formatting/resources/css-tests/url-expected.css
inspector/formatting/resources/css-tests/wrapping-expected.css
inspector/formatting/resources/html-tests/attributes-expected.html
inspector/formatting/resources/html-tests/auto-close-normal-expected.html
inspector/formatting/resources/html-tests/auto-close-special-expected.html
inspector/formatting/resources/html-tests/basic-1-expected.html
inspector/formatting/resources/html-tests/basic-2-expected.html
inspector/formatting/resources/html-tests/comments-expected.html
inspector/formatting/resources/html-tests/eof-1-expected.html
inspector/formatting/resources/html-tests/eof-2-expected.html
inspector/formatting/resources/html-tests/eof-3-expected.html
inspector/formatting/resources/html-tests/eof-4-expected.html
inspector/formatting/resources/html-tests/eof-5-expected.html
inspector/formatting/resources/html-tests/eof-6-expected.html
inspector/formatting/resources/html-tests/eof-7-expected.html
inspector/formatting/resources/html-tests/eof-8-expected.html
inspector/formatting/resources/html-tests/eof-9-expected.html
inspector/formatting/resources/html-tests/inline-script-expected.html
inspector/formatting/resources/html-tests/inline-style-expected.html
inspector/formatting/resources/html-tests/list-expected.html
inspector/formatting/resources/html-tests/not-well-formed-1-expected.html
inspector/formatting/resources/html-tests/not-well-formed-2-expected.html
inspector/formatting/resources/html-tests/not-well-formed-3-expected.html
inspector/formatting/resources/html-tests/p-expected.html
inspector/formatting/resources/html-tests/self-closing-expected.html
inspector/formatting/resources/html-tests/table-expected.html
inspector/formatting/resources/html-tests/tag-case-expected.html

@Amir will need to resubmit the patch excluding those resources, and just deleting the following:

inspector/console/resources/errors.css
inspector/dom/resources/highlight-iframe.html
inspector/formatting/resources/javascript-tests/arrow-functions-expected.js
inspector/formatting/resources/javascript-tests/classes-expected.js
inspector/formatting/resources/javascript-tests/comma-expressions-expected.js
inspector/formatting/resources/javascript-tests/comments-and-preserve-newlines-expected.js
inspector/formatting/resources/javascript-tests/comments-only-expected.js
inspector/formatting/resources/javascript-tests/do-while-statement-expected.js
inspector/formatting/resources/javascript-tests/for-statements-expected.js
inspector/formatting/resources/javascript-tests/functions-expected.js
inspector/formatting/resources/javascript-tests/generators-expected.js
inspector/formatting/resources/javascript-tests/if-statement-expected.js
inspector/formatting/resources/javascript-tests/import-expected.js
inspector/formatting/resources/javascript-tests/label-break-continue-block-expected.js
inspector/formatting/resources/javascript-tests/logic-expressions-expected.js
inspector/formatting/resources/javascript-tests/modules-expected.js
inspector/formatting/resources/javascript-tests/new-expression-expected.js
inspector/formatting/resources/javascript-tests/numbers-expected.js
inspector/formatting/resources/javascript-tests/object-array-literal-expected.js
inspector/formatting/resources/javascript-tests/other-statements-expected.js
inspector/formatting/resources/javascript-tests/return-statement-expected.js
inspector/formatting/resources/javascript-tests/sample-jquery-expected.js
inspector/formatting/resources/javascript-tests/sample-normal-utilities-expected.js
inspector/formatting/resources/javascript-tests/sample-webinspector-object-expected.js
inspector/formatting/resources/javascript-tests/switch-case-default-expected.js
inspector/formatting/resources/javascript-tests/template-strings-expected.js
inspector/formatting/resources/javascript-tests/ternary-expressions-expected.js
inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js
inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js
inspector/formatting/resources/javascript-tests/variable-declaration-expected.js
inspector/formatting/resources/javascript-tests/while-statement-expected.js
inspector/formatting/resources/javascript-tests/with-statement-expected.js
inspector/network/resources/data-intercepted.json


After running the re-submitted patch, we should have a more clearer picture on what resources are un-used, and can be deleted.
Comment 5 Devin Rousso 2021-06-09 15:19:59 PDT
I'm not sure why EWS didn't pick this up, but the files inside `inspector/formatting/resources/javascript-tests` are used by `inspector/formatting/formatting-javascript.html`
Comment 6 Ryan Haddad 2021-06-09 15:27:06 PDT
(In reply to Devin Rousso from comment #5)
> I'm not sure why EWS didn't pick this up, but the files inside
> `inspector/formatting/resources/javascript-tests` are used by
> `inspector/formatting/formatting-javascript.html`
That test is marked as flaky (webkit.org/b/156634), so EWS skips it.
Comment 7 Amir Mark Jr 2021-06-09 17:41:23 PDT
Created attachment 431033 [details]
Patch
Comment 8 Amir Mark Jr 2021-06-10 13:50:04 PDT
The failing test imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values.html appears to be a flaky failure and not caused by this patch in particular. 

A bug was already filed for it. https://bugs.webkit.org/show_bug.cgi?id=226881
Comment 9 Amir Mark Jr 2021-06-10 14:35:09 PDT
Created attachment 431132 [details]
Patch
Comment 10 Amir Mark Jr 2021-06-10 14:36:09 PDT
Resubmitting patch
Comment 11 Devin Rousso 2021-06-10 14:41:54 PDT
Comment on attachment 431132 [details]
Patch

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

> LayoutTests/ChangeLog:10
> +        * inspector/formatting/resources/javascript-tests/arrow-functions-expected.js: Removed.

Once again, the files in `inspector/formatting/resources/javascript-tests` are used by `inspector/formatting/formatting-javascript.html`.  Please do not delete them.
Comment 12 Amir Mark Jr 2021-06-11 10:46:53 PDT
(In reply to Devin Rousso from comment #11)
> Comment on attachment 431132 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431132&action=review
> 
> > LayoutTests/ChangeLog:10
> > +        * inspector/formatting/resources/javascript-tests/arrow-functions-expected.js: Removed.
> 
> Once again, the files in `inspector/formatting/resources/javascript-tests`
> are used by `inspector/formatting/formatting-javascript.html`.  Please do
> not delete them.

Okay will only remove these:

inspector/console/resources/errors.css
inspector/dom/resources/highlight-iframe.html
inspector/network/resources/data-intercepted.json
Comment 13 Amir Mark Jr 2021-06-11 14:07:01 PDT
Created attachment 431230 [details]
Patch
Comment 14 Amir Mark Jr 2021-06-11 14:13:18 PDT
Resubmitted patch with only three test removed:

inspector/console/resources/errors.css
inspector/dom/resources/highlight-iframe.html
inspector/network/resources/data-intercepted.json
Comment 15 EWS 2021-07-27 17:13:16 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 16 Robert Jenner 2021-07-27 17:37:15 PDT
Created attachment 434389 [details]
Patch
Comment 17 EWS 2021-07-27 18:38:13 PDT
Committed r280368 (240015@main): <https://commits.webkit.org/240015@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434389 [details].