Ticket #10198 (open feature)
Run jQuery unit tests in XHTML
| Reported by: | dmethvin | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.next |
| Component: | build | Version: | 1.6.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
We need to run the unit tests with an XHTML doctype to ensure that everything passes.
Change History
comment:1 Changed 22 months ago by dmethvin
- Owner set to dmethvin
- Priority changed from undecided to blocker
- Status changed from new to assigned
- Component changed from unfiled to build
- Milestone changed from None to 1.7
comment:3 Changed 21 months ago by dmethvin
- Priority changed from blocker to high
- Milestone changed from 1.8 to 1.next
Still searching for a good solution, but this isn't a blocker.
comment:5 Changed 10 months ago by tomgrohl
Is it a case of copying all the tests and changing the doctype to xhtml, or is it limited to certain test.
I might be able to help on this one.
comment:6 Changed 10 months ago by dmethvin
That's part of the investigation to be done.
For example, we support Firefox and you can serve XHTML with the right docttype and HTTP Content-Type to ensure it's interpreted as XHTML, but it just spits out console warnings if you get it wrong according to #12359. Our automated tests wouldn't catch that type of problem.
On the other hand, in #12357 it seems a Firefox XUL application demands correct XHTML to run at all. We don't have XUL on our automated tests so there's no formal support for it, but we've been able to keep it running except when we break XHTML by accident as we've done a couple of times now. There have been similar reports related to Chrome plugins.
Perhaps we can just provide some sort of XUL test in Testswarm, since that seems to be the most sensitive environment.
comment:7 Changed 10 months ago by tomgrohl
Thanks for the info.
I'll have a look into it, see what else I can find.
comment:8 Changed 10 months ago by tomgrohl
@dmethvin
As a starting point, I've wrote some code to check for content type and doctype.
It detects if closing tags / quoted attributes are required based on the following:
1 - content type is application/xhtml+xml 2 - content type is text/html and doctype is XHTML 3 - document is xul (Needs more testing though)
Generally is a doctype and/or content type is omitted it detaults to text/html.
This logic will be good to use and probably fix #12359 as well.
I'll now work on creating some tests for xhtml (based on the existing ones) and see where I get.
comment:9 Changed 9 months ago by dmethvin
- Type changed from enhancement to feature
Bulk change from enhancement to feature.
comment:10 Changed 8 months ago by dmethvin
- Owner dmethvin deleted
- Status changed from assigned to open
comment:11 Changed 6 months ago by dmethvin
Add IE10 to the list of browsers that will generate console warnings when there are doctype-related errors. Those happen too early for a shim to console.warn to see them.
comment:12 Changed 2 months ago by dmethvin
Although I wonder whether the shim would see them in a delay-loaded iframe.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
