[webkit-dev] WebKit unit test framework

David Levin levin at chromium.org
Wed Apr 20 17:15:18 PDT 2011

On Wed, Apr 20, 2011 at 4:59 PM, Darin Fisher <darin at chromium.org> wrote:

> I believe both maruel and jcivelli have had experience contributing changes
> to gtest.
> While I wouldn't characterize its code as simple, I haven't had trouble
> understanding it.  It is a fairly mature project, having been used
> internally at Google for ages.  It seems to be fairly well maintained, and
> the code is clean to my eyes.  Chances are good that it already has
> solutions for much of what you may wish of a unit testing framework.
> By the way, I was originally not in favor of using gtest for Chromium.  It
> seemed too complicated at first blush.  I had created a very simple testing
> framework that I liked for all the reasons you state below.  That was ~5
> years ago.  However, I quickly became more than convinced that it was worth
> it to use an established tool for unit testing.  It has so many nice
> features--features I didn't even know I would appreciate.  It was also
> really easy to use.
> -Darin
> On Wed, Apr 20, 2011 at 4:01 PM, Sam Weinig <weinig at apple.com> wrote:
>> So, my questions for people who have used gtest is, "Is it hackable?" What
>> kind of changes have you had success making?
Darin's email said it so well that I hate to follow up with this, but in the
interest of full disclosure, I'll include this info even though it may make
folks feel less comfortable.

(Before Darin's email) I talked to two people from chromium land who did
changes to it. I believe those changes were to add support for "FLAKY_" and

Here's what those two people had to say to me about hacking gtest:

Person 1:

The codebase was somewhat hackable.  The people maintaining it were not
welcoming though.  Most of the patches I tried to send ended up being R-
because it was not important for them.
However, they ended up writing a plugin API for it, and with that API it is
a lot easier to make the needed improvement to gtest without having to do
gtest changes.

Person 2:

gtest makes heavy use of templates and has many levels of indirection both
of which made the code more difficult to deal with.
Using it is fine. Hacking on it is definitely harder.

In short, if we really need to make changes in gtest itself, it sounds
pretty possible to do them. Getting them upstreamed may be harder, but we
could always fork if needed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110420/3231ae92/attachment.html>

More information about the webkit-dev mailing list