Monday, September 01, 2008

The most exciting part of Google Chrome

You've probably already heard about tomorrow's release of Google's browser project, Google Chrome. (This link is broken, but broken quite differently from other Google 404's. It's a safe bet they are already proxying this page to some other server and will put something there When It's Ready.)

There are many awesome in this, but I'd like to draw you web developers' attention to something that promises to be as exciting as the browser itself:

Comic pages: page 9, page 10, page 11

These pages describe the testing apparatus used to develop Chrome. It describes a continuous integration server that processes every build against a perfect rendering of tens of thousands of sites. The perfect rendering is described as being "a schematic of what the browser thinks it's displaying". I read this as being an internal data structure representing the rendered view.

There are two reasons I love this. First, it means that Google will be Ready on Day One to render the web. It will be "another platform to support", but not to nearly the degree that (for example) Safari or IE7 is another platform to support. This kind of testing apparatus can only lead to a more compliant, more reasonable platform. (At the least, it should have only the same bugs Firefox does. I wonder what they used to make their benchmark renderings?) Edit: I know Chrome is based on WebKit, I should clarify that, if they used Firefox for reference renderings, then their rendering bugs will match Firefox's. Apparently WebKit already does this, but it wouldn't make much sense to use WebKit as the reference rendering for a test of WebKit! So they must be using some other browser; Firefox would make sense.

Second, it means we may finally get the holy grail of web testing: a headless DOM! We currently have a test apparatus that consists of a big, fast Mac machine with a 1920px display and 4 VMware machines, running Selenium on multiple browsers. Automating this is nightmarish, and completely unsuitable for agile development methodologies. We only have one of these, so access to it has to be gated, and the barrier to entry to test your code is huge. (You have to commit it, to start with.) The web badly needs a way to test applications without a browser showing up on your desktop. I just want to see green/red for the question "did my login page render the same way it did last time?"

The phrase "schematic" tantalizingly hints at a test suite with the ability to tell you about test failures in a descriptive way. I imagine seeing something like "div#nameEntry expected position:(258,317) got position(258,0)". But now we've veered away from speculation into wishful thinking.

This makes a big assumption that Google will release the code of the test apparatus. But I'm betting they will, because it makes extremely good business sense. If web devs start to rely on their test engine, their applications automatically support Chrome.


Johan Dahlin said...

It's based mostly on WebKit, not firefox.
WebKit has been doing that kind of testing for a long while now, check out their LayoutTests.

movie buff said...

poor Firefox... they're gonna take more and more of a hit as Chrome inevitably gains in popularity