[webkit-dev] Auto-injecting JavaScript with DRT (was Introducing dumpAsMarkup)

Ojan Vafai ojan at chromium.org
Mon Jul 26 17:46:34 PDT 2010

> Then again it should be possible to re-write our script-test support
> so that this is all you need to write:
> <script src="script-tests.js"></script>
> <script>
> description("foo");
> shouldBe("foo", "bar");
> </script>
> <script src="end-script-test.js"></script>
> Instead of the current (cumbersome) templating system.  Should be
> possible to even get rid of the final "end-script-test.js" tag if
> we're smart.

Yes! The templating system is just too much overhead, not to mention that it
creates too many files. There's a few minor issues with the above though:
1. What if you want to include multiple js files? For example, then
editing/selection tests include two JS files. Maybe we should just move all
our JS code into one file?
2. The src will need to be relative, so you'll need some "../.." action. But
that seems OK to me. Unless we had a script that put the JS files in every
directory (or maybe in the resources subdirectory of every directory).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100726/1d394add/attachment.html>

More information about the webkit-dev mailing list