[Webkit-unassigned] [Bug 69409] [GTK] [WebKit2] Make adding another unit test easier

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 5 08:45:41 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=69409





--- Comment #4 from Martin Robinson <mrobinson at webkit.org>  2011-10-05 08:45:41 PST ---
I think I prefer my original approach in the end for a few reasons:

1. Having a generic fixture means that we can apply logic before and after all tests in all suites. The logic for the test path isn't duplicated in multiple places.

2. I think it's important that we push the most common fixtures now to other files so that they can be used in more than one place. If necessary simple fixtures can be kept inline near tests.

For an example, I could have easily extended the LoadTrackingTest fixture to also load alternate HTML when a failure happens. Then I could have used that fixture for multiple tests. This test probably belongs in TestWebKitWebView anyway.

In the second patch we have to duplicate the WebView and main loop creation. Seeing this in every single WebKit1 unit test file is one of the main reasons I set out to do this. We get to use the C++ class system to our advantage.

3. I think we should avoid having the main method as a macro. I dislike macros in general, and perhaps I'll look for a way to implement this via templates.

4. I renamed the test files to better match the other files in the source tree. I believe we should use WebKit naming conventions everywhere possible. The only other binaries we produce that are named like this are the WK1 tests.  I'm not sure it makes sense in this case. I'll upload a new patch which fixes build-webkit as well.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list