W3C home > Mailing lists > Public > public-html-testsuite@w3.org > August 2011

Re: Submission of tests

From: Ms2ger <ms2ger@gmail.com>
Date: Tue, 23 Aug 2011 16:06:22 +0200
Message-ID: <4E53B3DE.6050809@gmail.com>
To: Kris Krueger <krisk@microsoft.com>
CC: "public-html-testsuite@w3.org" <public-html-testsuite@w3.org>
On 08/19/2011 06:44 PM, Kris Krueger wrote:
> I took a quick peek at http://w3c-test.org/html/tests/submission/Ms2ger/browsing-the-web/load-text-plain.html
>
> #2 The iframe content doesn't match the assert_equals(doc.documentElement.lastChild.firstChild.firstChild.data, "Text\n") assertion

Yes, this was written before I was aware we were going to use PHP. A 
working example is up at 
<http://ms2ger.freehostia.com/tests/html-official/submission/Ms2ger/browsing-the-web/load-text-plain.html>. 
Rather than rewriting the test to use PHP, though, I'd prefer using a 
declarative approach to setting HTTP headers; I've filed 
<http://www.w3.org/Bugs/Public/show_bug.cgi?id=13875>.

> #3 This test doesn't seem to actually be testing any normative parts of the section 5.5.4 from the spec
>
> http://dev.w3.org/html5/spec/Overview.html#read-text
>
> 5.5.4 Page load processing model for text files
>
> When a plain text document is to be loaded in a browsing context, the user agent should queue a task to create a Document object, mark it as being an HTML document, set its media type to "text/plain", create an HTML parser, associate it with the document, act as if the tokenizer had emitted a start tag token with the tag name "pre" followed by a single U+000A LINE FEED (LF) character, and switch the HTML parser's tokenizer to the PLAINTEXT state. Each task that the networking task source places on the task queue while the fetching algorithm runs must then fill the parser's input stream with the fetched bytes and cause the HTML parser to perform the appropriate processing of the input stream.

This is the part of the spec it is testing.

(While looking back at the test, I've also added a couple more assertions.)

Thanks for having a look
Ms2ger
Received on Tuesday, 23 August 2011 14:06:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 August 2011 14:06:57 GMT