Comments (6)
I made a glance at the tests, and I noticed one suspicious point: in these tests, iframe has an onload
handler that calls a function, and test()
is used in that function. Is this allowed? I guess async_test()
should be used in such cases.
from wpt.
Well, to be clear, I think the test should use the following pattern:
var test = async_test(...);
var iframe = document.createElement('iframe');
// Set iframe's attributes, attach to document...
iframe.onload = test.step_func(function (evt) {
// assert_whatever...
test.done();
});
from wpt.
This git issue serves as a reminder that the event.*.htm tests were not working when I last tried them as the postMessage from testharness.js was mistakenly assumed in the test to carry the expected test data.
@yutak I don't think initiating the iFrame from JS or using the iFrame tag really matters, if we are discussing syntax and code style for example, I would more concerned about;
https://github.com/w3c/web-platform-tests/blob/master/webmessaging/event.data.htm
- var DATA is using ALL CAPS, WHY!?
- var ExpectedResult Uses Unexpected Caps someTimes On the First letter of a Variable name Instead of camelCase
- ==, should be ===, always.
... anyway. No one is perfect when it comes to code style, and there is no style guide for writing W3C tests (yet?).
This week it will make it my duty to finish off the minimum required work to get these tests to not fail.
Would be interested to know why testharness.js needs to use postMessages...
from wpt.
@aogilvie OK, I think I understand your problem. I'm not sure about why testharness.js is using postMessage, either.
FYI, see https://github.com/w3c/web-platform-tests/blob/master/webmessaging/postMessage_ArrayBuffer.htm for the problem I talked about; this test calls test()
function inside the onload
event handler, and I'm not sure if this is legitimate.
from wpt.
testharness.js uses postMessage to collect results cross-origin, see w3c/testharness.js#8
from wpt.
Sounds like this was about bugs in the tests at https://wpt.fyi/webmessaging to begin with? I've taken a look at it seems like all tests pass in at least one browser, which is better than expected. Are there still bugs to be fixed here?
@mdittmer @lukebjerring this is a typical case where the interop view would have come in handy :)
from wpt.
Related Issues (20)
- `./wpt run firefox path/to/someTest` doesn't run tests when Firefox is installed via Snap HOT 18
- "wpt /trusted-types/block-string-assignment-to-attribute-via-attribute-node.html" passes at <wpt.fyi> but fails locally HOT 3
- Simple test with `require-trusted-types-for 'script';` CSP throws HOT 27
- Missing Firefox stable runs since January 23 HOT 3
- DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() HOT 5
- chrome-wpt-mojom mojojs.zip files should be published together with browser releases HOT 3
- `cross-origin-reports-isolated.https.sub.html` failing in Firefox because of a missing Access-Control-Allow-Origin header HOT 1
- BidiException accesses non-existent field
- Lint for versioned directories? HOT 1
- Template code contains duplication
- CSS animation test flakiness specific to Chrome for Testing (Dev & Canary) HOT 1
- ./wpt serve fails with Python 3.12 (default on fedora39) HOT 2
- Trusted types tests timeout in failure case HOT 1
- `./wpt run firefox` runs Firefox release instead of Nightly HOT 3
- Running wdspec directly via pytest is unable to collect all tests HOT 3
- [wdspec] add fixture to wait for several WebDriver BiDi events HOT 8
- XColumns class in anchor test?
- Passing a basename (alone) to manifest.load_and_update causes a FileNotFoundError
- paint-context-001.svg has incorrect expectation
- Chrome and Firefox are not installed with `--install-browser` flag for integration tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wpt.