-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Code injection config #5133
Comments
@inexorabletash you should probably comment on this. @brettz9 one thing you might be able to is to refactor the existing tests using the |
Sorry for delay in responding. I don't think there's an IndexedDB-specific request here - you'd want this for any tests exercising a polyfill. As @annevk mentions the place to do this would be something closer to wptserve (Blink doesn't run Have you considered |
Thanks, @annevk , but I'd like to avoid making individual wrappers for all of the tests and keep them reflecting the same names, as I would imagine would be necessary. And thanks also, @inexorabletash . As far as As far as
|
@brettz9 the wrapper can be auto-generated from a Python script or some such though. No need to tailor it for each instance. |
🤦 Thanks! |
I created a Node script to populate the I am therefore now able to get individual files loading with our polyfill (and without using However, when I use the test runner, the manifest file it builds does not seem to base its listing from the directories (e.g., If it is not feasible to get this working, as previously mentioned, I am able to get |
…t one global `setGlobalVars` - Testing (W3C): Utilize `.any.js` scheme to unobtrusively allow testing of polyfill by web-platform-tests (as per <web-platform-tests/wpt#5133 (comment)>) - Docs (README/TESTING): Move from README to `docs` directory and indicate lack of currency of Cordova/PhoneGap info - Docs (CONTRIBUTING): Move to `docs` directory - Testing (Grunt): Add CORS headers to allow `web-platform.test` domain to access our polyfill (for W3C tests) - Testing (Grunt): Add `connect-watch` task to avoid having to rebuild
I think you shouldn't use the test runner. It's unstable. @jgraham can correct me if I'm wrong, but I'm pretty sure I'm not. |
I've added two minor tweaks at w3c/testharness.js#263 and w3c/wpt-tools#203 which allow unobtrusive mods to get the runner working for our polyfill injecter (though the PRs could be used by any polyfill tester). Since I don't need any changes within this repo, I'll close now. Thanks for your help! |
In working on our IndexedDB polyfill, leveraging your test server when doing browser testing appears most promising, but we need to inject our polyfill code into the IndexedDB tests, and it is not convenient for us to keep monkey-patching upon every test update.
Would you be open to a PR to allow passing in a command-line argument (or adding a setting on
config.json
) to be able to designate say a callback or file with a callback that could selectively inject code into the desired test files before they are served?While I suspect this might be seen as beyond your immediate scope, depending on how you might wish it implemented, it should only involve a few lines of code. (Our specific need can be met by overriding the
wptserve/handlers
FileHandler
behavior as used byweb-platform-tests
(viawpt-tools/serve
) for HTML files served by IndexedDB.)The text was updated successfully, but these errors were encountered: