Bug 212661 - Layout tests outside of the WPT import should not use resources from it
Summary: Layout tests outside of the WPT import should not use resources from it
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-02 14:11 PDT by Carlos Alberto Lopez Perez
Modified: 2020-06-10 08:36 PDT (History)
9 users (show)

See Also:


Attachments
Patch (85.43 KB, patch)
2020-06-02 15:00 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (87.03 KB, patch)
2020-06-10 04:44 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2020-06-02 14:11:10 PDT
I noticed meanwhile working on bug 212613 that the update of the WPT imported canvas tests was breaking tests in the directory canvas/philip/tests/

This is because some of this tests are using scripts from the directory of imported WPT tests.
Checking in more detail I see more tests doing things like this (for example some MathML tests trying to use fonts from the imported WPT tests) and tests in fast/css and fast/custom-elements trying also to use scripts.


This is major issue (IMHO) because updating the imported WPT tests and resources shouldn't break tests outside of the imported WPT Tests.

Let's try to copy the needed resources for this tests so they can work on their own without depending on a specific version of the imported WPT resources.
Comment 1 Carlos Alberto Lopez Perez 2020-06-02 15:00:35 PDT
Created attachment 400858 [details]
Patch
Comment 2 youenn fablet 2020-06-08 01:10:25 PDT
Comment on attachment 400858 [details]
Patch

Do we know if these tests should be upstreamed to WPT or already have equivalent WPT tests?
Comment 3 Simon Fraser (smfr) 2020-06-08 11:11:43 PDT
"try resources" ?
Comment 4 Carlos Alberto Lopez Perez 2020-06-10 04:23:17 PDT
(In reply to youenn fablet from comment #2)
> Comment on attachment 400858 [details]
> Patch
> 
> Do we know if these tests should be upstreamed to WPT or already have
> equivalent WPT tests?

I have checked, this is what I found:

> canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
> canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
> canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
> canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
> canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html

^^ All of this are duplicated and can be removed in favor of the ones inside LayoutTests/imported/w3c/web-platform-tests/html/canvas/element

> fast/css/shadow-parts/exportparts-syntax.html
> fast/css/shadow-parts/invalidation-class-before-after.html
> fast/css/shadow-parts/invalidation-class-descendant-combinator-export.html
> fast/css/shadow-parts/invalidation-class-descendant-combinator.html
> fast/css/shadow-parts/invalidation-class-sibling-combinator-export.html
> fast/css/shadow-parts/invalidation-class-sibling-combinator.html

^^ I couldn't find duplicates for this tests in WPT. And according to git log, all of them were added by Antti (cc'ing). Maybe this ones can be upstreamed to WPT.


> fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html
> fast/custom-elements/perform-microtask-checkpoint-before-construction.html
> fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html
> fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html

^^ This 4 are upstreamed in WPT, but we still have not re-imported the WPT ones back. So we can't still de-duplicate them.

> fast/custom-elements/DOMImplementation-createDocument.html
> fast/custom-elements/adopting-from-frameless-document.html
> fast/custom-elements/disconnected-callback-in-detached-iframe.html
> fast/custom-elements/document-createElementNS.html
> fast/custom-elements/reactions-for-webkit-extensions.html

^^ I couldn't find this on WPT. Maybe some of them can be upstreamed


> fast/images/sizes-dynamic-001.html
> fast/images/sizes-dynamic-002.html

^^ This two ones are upstreamed to WPT, and we have reimported them back. But the WPT version of this tests its not working for us due to we still don't support reftest-wait. See bug 186045

> fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html

^ This one its upsteamed to WPT and we have re-imported it back already. We can de-duplicate it.

> mathml/non-core/frac-linethickness-001.html
> mathml/non-core/frac-linethickness-002.html
> mathml/non-core/lengths-1.html
> mathml/non-core/lengths-2.html
> mathml/non-core/lengths-3.html

^ I understand this are upstreamed to WPT but we want to keep the older version for WebKit. See r249713

> mathml/presentation/radical-bar-visibility.html

^ This one its not upstreamed to WPT, it was added in r193743 ... not sure if it makes sense to do it or not. CC'ed Fred.
Comment 5 Carlos Alberto Lopez Perez 2020-06-10 04:44:20 PDT
Created attachment 401534 [details]
Patch

Updated patch (for landing) de-duplicating fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html and canvas/philip/tests/*
Comment 6 EWS 2020-06-10 08:35:29 PDT
Committed r262840: <https://trac.webkit.org/changeset/262840>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401534 [details].
Comment 7 Radar WebKit Bug Importer 2020-06-10 08:36:17 PDT
<rdar://problem/64210417>