mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Tests: Always load WPT interfaces from root interfaces directory
Previously we would load from "../interfaces" which wouldn't work for nested tests.
This commit is contained in:
parent
ccb87b4cb4
commit
fc395f9824
Notes:
github-actions[bot]
2025-07-11 08:58:59 +00:00
Author: https://github.com/Calme1709
Commit: fc395f9824
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5395
Reviewed-by: https://github.com/gmta ✅
1 changed files with 6 additions and 1 deletions
|
@ -3557,7 +3557,12 @@ globalThis.idl_test = idl_test;
|
||||||
* Note: ShadowRealm-specific implementation in testharness-shadowrealm-inner.js
|
* Note: ShadowRealm-specific implementation in testharness-shadowrealm-inner.js
|
||||||
*/
|
*/
|
||||||
function fetch_spec(spec) {
|
function fetch_spec(spec) {
|
||||||
var url = '../interfaces/' + spec + '.idl';
|
const url_parts = window.location.href.split("/");
|
||||||
|
|
||||||
|
while (url_parts[url_parts.length - 1] != "wpt-import")
|
||||||
|
url_parts.pop();
|
||||||
|
|
||||||
|
var url = url_parts.join("/") + '/interfaces/' + spec + '.idl';
|
||||||
return fetch(url).then(function (r) {
|
return fetch(url).then(function (r) {
|
||||||
if (!r.ok) {
|
if (!r.ok) {
|
||||||
throw new IdlHarnessError("Error fetching " + url + ".");
|
throw new IdlHarnessError("Error fetching " + url + ".");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue