On Tue, Jan 18, 2011 at 4:46 PM, Simon Fraser <[email protected]>wrote:

> On Jan 18, 2011, at 4:30 PM, Darin Adler wrote:
> > Any ideas on how to improve the situation?
>
> I usually take an existing .html file for a script test and modify it. It
> would be good if the generated HTML had a big <!-- THIS IS AUTOGENERATED, DO
> NOT COPY OR EDIT --> in it.


I agree this would be valuable.

If you need a non-standard wrapper, don't put the JS file in the
script-tests directory. If you need shared JS resources, they should go in
the resources directory, not in the script-tests directory. We should not
need any exclusions AFAIK and should remove the concept of exclusions from
the generator script entirely.

Also, there's been a number of discussions about this on webkit-dev. There
seemed to be general consensus then that we should eliminate or simplify
this generator script. All we need to do is fix js-test-pre.js to use onload
events to eliminate the need for js-test-post.js. Then we don't need the
generator script and can just write these tests by hand.

Pure script test (possibly generated by a script):

<!DocType html>

<script src="path/to/js-test-pre.js"></script>

<script src="path/to/test.js"></script>

Regular test (hand rolled):

<!DocType html>

<script src="path/to/js-test-pre.js"></script>
<div>html that demonstrates bug</div>
<script>
// Script that verifies correctness or otherwise excersizes bug.
</script>

Ojan
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to