Bug 257123

Summary: Update 'testharness.js' from upstream for WPT tests
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: annevk, ap, cdumez, gsnedders, ntim
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-05-22 08:30:15 PDT
Hi Team,

I noticed that we updated / upstreamed 'testharness.js' last time about two years ago.

(Last Push) Commit: https://github.com/WebKit/WebKit/commit/3e631739e295a4f82140d130f26236c7721cbc8b

Latest Version (with History from WPT GitHub): https://github.com/web-platform-tests/wpt/commits/74236ab210e6d6dc8bd735ce3a586541bf066bd4/resources/testharness.js

I think it would be good to sync it after two years.

Any thoughts or opinions? or if there is something super planned in WPT realm, so we should hold out?

Thanks!
Comment 1 Sam Sneddon [:gsnedders] 2023-05-22 15:14:39 PDT
If we do this (and we should do it at some point!) we should re-import all of resources/, not just testharness.js.
Comment 2 Ahmad Saleem 2023-05-22 16:12:52 PDT
(In reply to Sam Sneddon [:gsnedders] from comment #1)
> If we do this (and we should do it at some point!) we should re-import all
> of resources/, not just testharness.js.

Thanks! I think it would be beyond my expertise, if it would've been just copy paste of 'testharness.js', I was happy to do PR. :-)

Though still happy to learn something new on how to do this 'resource' stuff. :-)
Comment 3 Chris Dumez 2023-05-22 16:17:34 PDT
What do you mean, I resync'd testharness.js from upstream in January of this year (as part of the whole resources/ folder):
```
commit 4a4574451a99cffd3197fec02b0df9437594bfd2 (fork/250872_resync_wpt_resources_jan23, cdumez/250872_resync_wpt_resources_jan23)
Author: Chris Dumez <cdumez@apple.com>
Date:   Fri Jan 20 09:29:07 2023 -0800

    Resync web-platform-tests/resources from upstream
    https://bugs.webkit.org/show_bug.cgi?id=250872
    
    Reviewed by Tim Nguyen.
    
    Resync web-platform-tests/resources from upstream d20c3cdbf6e91f14dda92737e.
    
    * LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window-expected.txt:
    * LayoutTests/imported/w3c/web-platfrom-tests/html/user-activation/*: Updated since they would break otherwise after the resources/ folder re-sync.
    * LayoutTests/imported/w3c/web-platform-tests/resources/*: Updated.
    
    Canonical link: https://commits.webkit.org/259143@main
```

Are you looking at the wrong testharness.js ? Note that there is an old version is LayoutTests/resources but it is not used by WPT tests, only by some WebKit-specific tests.
Comment 4 Chris Dumez 2023-05-22 16:17:50 PDT

*** This bug has been marked as a duplicate of bug 250872 ***