This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13956 - Port tests to a form usable by browsers
Summary: Port tests to a form usable by browsers
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14061 14063 14065
  Show dependency treegraph
 
Reported: 2011-08-29 18:24 UTC by Aryeh Gregor
Modified: 2011-09-07 19:15 UTC (History)
2 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-08-29 18:24:32 UTC

    
Comment 1 Aryeh Gregor 2011-09-02 22:19:45 UTC
First stab:

http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=eeaedb93
http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=69d2d303

You can run the tests here:

http://aryeh.name/spec/editing/conformancetest/runtest.html

The expected results are generated here:

http://aryeh.name/spec/editing/conformancetest/gentest.html

Documentation is in the spec:

http://aryeh.name/tmp/editing/editing.html#tests


Issues to work out still:

* Tests don't really work at all in IE or Opera (whoops).
* They don't test queryCommand*() yet.
* Test that DOMs match, not just innerHTML.  (But this might require fixups in the algorithms to merge text nodes or such, maybe not worth it.)
* Try to produce less confusing failure messages when style normalization kicks in.  I have to normalize style="" attributes to work around the fact that the serialization format isn't actually standardized meaningfully, but this shouldn't be reflected in the failure messages.
* Make sure expected results start getting generated as they should for the unserializable cases where it's just browser bugs (like <xmp> in Gecko, or <pre> followed by newline in Gecko/WebKit).
* Review browser test failures to unearth further bugs.

But it's a start.
Comment 2 Aryeh Gregor 2011-09-02 22:41:36 UTC
Also should remove the dependency in runtest.html on correct HTML5 serialization.  It causes lots of noisy failures in Opera (presumably IE too) because it omits closing tags when serializing the same DOM.
Comment 3 Aryeh Gregor 2011-09-07 19:15:49 UTC
(In reply to comment #1)
> * Tests don't really work at all in IE or Opera (whoops).

Filed bug 14063.

> * They don't test queryCommand*() yet.

Filed bug 14065.

> * Test that DOMs match, not just innerHTML.  (But this might require fixups in
> the algorithms to merge text nodes or such, maybe not worth it.)

I'm not going to try this for now.  We'd need some way of serializing a DOM perfectly, or else make sure every DOM really really serializes correctly (like by throwing normalize() into execCommand() someplace).

> * Try to produce less confusing failure messages when style normalization kicks
> in.  I have to normalize style="" attributes to work around the fact that the
> serialization format isn't actually standardized meaningfully, but this
> shouldn't be reflected in the failure messages.

http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=2b19002f

> * Make sure expected results start getting generated as they should for the
> unserializable cases where it's just browser bugs (like <xmp> in Gecko, or
> <pre> followed by newline in Gecko/WebKit).

Filed bug 14061.

> * Review browser test failures to unearth further bugs.

This will be an ongoing effort.

Marking fixed.  Will work on followups.