#686 enhancement
Roland van Ipenburg

Missing tests for anything but XHTML 1.0 Transitional

Reported by Roland van Ipenburg | May 25th, 2009 @ 09:42 PM | in 2.0

It's not clear if Prototype is supposed to be working with anything else than straight XHTML 1.0 Transitional. Since the unit tests are generated anyway, it shouldn't be that hard to generate those tests using several different doctypes and see how compatible Prototype is in an HTML 4.01, XHTML 1.1 or XSLT environment.

Comments and changes to this ticket

  • Tobie Langel

    Tobie Langel May 25th, 2009 @ 11:44 PM

    • Tag set to needs_patch
    • State changed from “new” to “enhancement”
    • Milestone set to 2.0

    Patch welcomed

  • Juriy Zaytsev

    Juriy Zaytsev May 26th, 2009 @ 04:47 AM

    Prototype most definitely works with HTML 4.01 and most definitely breaks with XHTML 1.1 (served as application/xhtml+xml)

  • Roland van Ipenburg

    Roland van Ipenburg May 28th, 2009 @ 03:14 AM

    • Tag changed from needs_patch to patch

    Patch adds basic functionality to unittest_js that generates the HTML unit test files in multiple flavors (currently XHTML 1.0 Strict and XHTML 1.0 Transitional). Other flavors can be added by putting their HTML prelude in the flavors directory.

    Nice to have:
    - Configure what flavors to use from rake environment - Change the closing of tags for HTML flavors - Allow for XHTML served as application/xhtml+xml - Allow encodings other than utf-8

  • Tobie Langel

    Tobie Langel May 29th, 2009 @ 07:31 PM

    Thank you for the patch, Roland.

    I do however think that this makes more sense implemented as multiple templates, rather than as an option.

    The reasoning behind this is that you may want to run your tests not only with different doctypes, but also, with other libs present on the page (for example, would Prototype still work on a page with jQuery in regular mode, MooTools, json2.js, etc.), inside an iFrame, etc.

  • Roland van Ipenburg

    Roland van Ipenburg May 29th, 2009 @ 08:55 PM

    For what the patch currently does you are correct. But at some point I also want to be able to have the same XHTML test files served as both text/html and application/xhtml+xml and maybe some other variations on the HTTP level. So then it's not just about generating an HTML file from a template, but also it's HTTP header.

  • Tobie Langel

    Tobie Langel May 30th, 2009 @ 12:07 AM

    Right, but that is a totally different issue, imho.

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 02:28 AM

    • Tag changed from patch to patched

    [not-tagged:"patch" tagged:"patched" bulk edit command]

  • T.J. Crowder

    T.J. Crowder November 16th, 2009 @ 04:50 PM

    [responsible:none bulk edit command]

  • Tisho Georgiev

    Tisho Georgiev March 1st, 2010 @ 08:45 PM

    • Tag changed from patched to general, patched
  • Pandit.Vk.Shastri ji

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins