Last modified: 2014-02-12 23:46:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33876, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31876 - MobileFrontend extension should validate against W3C in Jenkins
MobileFrontend extension should validate against W3C in Jenkins
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: High enhancement
: ---
Assigned To: Jon
:
Depends on: 31875
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-22 01:05 UTC by Tomasz Finc
Modified: 2014-02-12 23:46 UTC (History)
13 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tomasz Finc 2011-10-22 01:05:00 UTC
After we resolve Bug 31875 lets add the W3C validator for all builds http://validator.w3.org/mobile/
Comment 1 Sam Reed (reedy) 2011-10-22 03:55:56 UTC
(In reply to comment #0)
> After we resolve Bug 31875 lets add the W3C validator for all builds
> http://validator.w3.org/mobile/

Is there some sort of an API for this data? So we don't have to paste and scrape the output...

Not sure how we'd actually go about doing this
Comment 2 Mark A. Hershberger 2011-10-24 16:20:47 UTC
http://validator.w3.org/docs/api.html
Comment 3 Jon 2012-03-27 10:54:11 UTC
The HTML code now validates as of https://gerrit.wikimedia.org/r/3801 and https://gerrit.wikimedia.org/r/3802

It could still do with an automation step though.
Comment 4 Jon 2012-05-08 10:30:45 UTC
I should say the HTML code validates until you introduce wikitext :D - since wikitext can contain any html markup this leads to lots of validation errors on various pages.
Comment 5 Krinkle 2012-07-04 19:08:27 UTC
Note sure what implementation you have in mind, but perhaps it makes sense to do this as a PHPUnit test? Generate the html, pass it over to the api using MediaWiki's Http methods and assert based on the W3 API repsonse.
Comment 6 Jon 2012-07-05 20:59:07 UTC
Krinkle - exactly what I had in mind :-)
What if the user running phpunit does not have an internet connection? Should the tests still fail or should a warning be printed instead?
Comment 7 Krinkle 2012-07-05 23:07:56 UTC
PHPUnit has various alternative modes for assertions (next to Passed and Failing). Such as "Incomplete", "Skipped" and "Broken" (which are all effectively the same as "Skipped").
Comment 8 Juliusz Gonera 2012-12-19 18:43:21 UTC
We could also run the validator ourselves I guess, not to depend on any 3rd party. They're open source:
http://dvcs.w3.org/hg/markup-validator/
https://hg.mozilla.org/projects/htmlparser/
Comment 9 Jon 2013-04-23 23:51:23 UTC
We just ran into a bug today (unclosed div) which could have been easily trapped if we had this.
Comment 10 Michelle Grover 2013-04-27 00:41:40 UTC
Assigned Mingle Ticket https://mingle.corp.wikimedia.org/projects/mobile/cards/696
Comment 11 Gerrit Notification Bot 2013-05-01 14:25:09 UTC
Related URL: https://gerrit.wikimedia.org/r/61775 (Gerrit Change I1414e2fbc71b090e07d4a1073ee3b6f3159f3759)
Comment 12 Jon 2013-05-01 14:41:53 UTC
This has been bothering me for some time. I knocked up a shell script. In future we might want to run it as part of a pre-commit hook when template files change.
Comment 13 Arthur Richards 2013-05-06 18:44:26 UTC
Code merged, marking resolved.
Comment 14 Gerrit Notification Bot 2013-05-06 18:44:40 UTC
https://gerrit.wikimedia.org/r/61775 (Gerrit Change I1414e2fbc71b090e07d4a1073ee3b6f3159f3759) | change APPROVED and MERGED [by jenkins-bot]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links