-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Test streamlining/browser support for W3C and other tests #249
Comments
Note that it is now possible to set up a robust testing environment for the latest W3C tests (along with our own good number of tests), both for Node and the browser. The W3C test runner for the browser still has to be patched (I've submitted a couple PRs as per web-platform-tests/wpt#5133 (comment) ), but if you get the We could really use help, with WebSQL-supporting browsers (modern Chrome (57) and Safari 10) attempting to fix the issues they have in failing those tests that are working in Node.js (the ones still failing in our Node implementation are pretty much unresolvable, particularly in the browser). Chrome would probably be best to start with as it is easier to test and it has fewer failures that are not present in Node. The test runner is not as useful in Safari which chokes on even native testing, so in that case, it will be necessary to test the file one-by-one or by regex (adding As far as iOS9, I intend to post shortly to #277 in this regard. |
Here's the code I currently have for an alternative testharness runner, which I've placed at <!DOCTYPE html>
<meta charset="utf-8" />
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<script src="http://localhost:9999/dist/indexeddbshim-noninvasive.js"></script>
<iframe id="ifr" style="width:100%; height: 680px;" src="http://web-platform.test:8000/tools/runner/index.html"></iframe>
<script>
var win = document.querySelector('#ifr').contentWindow;
win.addEventListener('load', function () {
var oldLink = win.VisualOutput.prototype.link;
win.VisualOutput.prototype.link = function(href) {
var link = oldLink.apply(this, arguments);
link.target = '_blank';
var linkPolyfill = link.cloneNode(true);
var suffix = '.any.html';
if (!(/\.any\.html$/).test(href)) {
linkPolyfill.href += suffix;
linkPolyfill.textContent = 'polyfill';
}
var span = document.createElement('span');
span.appendChild(link);
span.appendChild(document.createTextNode(' ('));
span.appendChild(linkPolyfill);
span.appendChild(document.createTextNode(')'));
return span;
};
win.testharness_properties = Object.assign({}, win.testharness_properties, {
callback: function (win) {
setGlobalVars(win, {
fullIDLSupport: true,
replaceNonIDBGlobals: true
});
win.shimIndexedDB.__useShim();
// Object.defineProperty(win.IDBTransaction, 'READ_WRITE', {configurable: true, value: 55555}); // Use with `/IndexedDB/historical.html` to confirm we're injecting
}
});
});
</script> Also adding this to
|
Nevermind the above instructions--just follow the instructions in |
Tracking this issue for new package at #15 |
@brettz9 - should I archive this repo, so that we can move to the new location ? |
See my comment at #353 (comment) . Thanks! |
Although we have a recent addition of W3C-adapted tests for Node, I'd like us to:
ws
is breaking our worker code; ought to investigate rather than justkeeping the last working version hard-coded
and get W3C test server working (if nothing else than for WebIDL tests; our tests are now copying the source of theWebIDLParser.js
file directly, so no need to build)Modifying the beginning ofWe can instead useFileHandler
get_data
inweb-platform-tests/tools/wptserve/wptserve/handlers.py
to the snippet below works but waiting on Code injection config web-platform-tests/wpt#5133 . Alternatively, there are the following changes (they have the disadvantage of adding.any.js
files as per ournpm run w3c-add-wrap
routine and duplicating work in runner but the runner has the advantage of adding polyfill links alongside non-polyfill ones and was the recommended approach): Code injection config web-platform-tests/wpt#5133npm run wrap
even though it unfortunately messes up theweb-platform-tests/IndexedDB
directory, requiring a reset of those files.** iframe tests (opaque tests) using polyfill in browser testsinterfaces.worker.js
and any other worker orThree long-term goals (which are not milestone 3 but which I'll track here for now):
todo
markers in code for minor lower priority issues not being tracked** Could add the following to workers in theory (and in Safari 10, in the workers only, the old bug of needing to define
indexedDB
in a closure as an alias toshimIndexedDB
was also present):However, Safari apparently removed its support of IndexedDB from workers (as did Chrome) as per https://bugs.chromium.org/p/chromium/issues/detail?id=434740
The text was updated successfully, but these errors were encountered: