Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleWorkerHandler is broken #48832

Open
saschanaz opened this issue Oct 27, 2024 · 0 comments
Open

ModuleWorkerHandler is broken #48832

saschanaz opened this issue Oct 27, 2024 · 0 comments

Comments

@saschanaz
Copy link
Member

saschanaz commented Oct 27, 2024

It should use fetch_tests_from_worker but somehow it's trying to use testharness directly, which fails and throw "TypeError: window.__wptrunner_process_next_event is not a function". It should follow what SharedWorkerModulesHandler and ServiceWorkerModulesHandler do.

wpt/tools/serve/serve.py

Lines 519 to 531 in 73d6bd0

class ModuleWorkerHandler(BaseWorkerHandler):
path_replace = [(".any.worker-module.js", ".any.js")]
wrapper = """%(meta)s
self.GLOBAL = {
isWindow: function() { return false; },
isWorker: function() { return true; },
isShadowRealm: function() { return false; },
};
import "/resources/testharness.js";
%(script)s
import "%(path)s";
done();
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant