Carlos created some unit testing framework for RenderWidget, and I
just extended them to support RenderView. These areas have not been
covered by unit tests before, and we have had some regressions as a
result of our laziness.

If you make changes to render_view.cc or render_widget.cc, please make
sure it includes a test from now on! Please be brutal in code reviews
when you see that others are making changes. If you change an area,
you may end up having to write a test for things that weren't tested
before (this includes porting efforts), but spending this extra time
will help everybody (and all ports).

Stuff you can do now with very little work:
- Send any IPC message to RenderView, or call any of its methods.
- Check that the RenderView sent certain IPC messages after you do
something, and inspect their contents.
- Load HTML and execute JS of your choosing into an offscreen RenderView.

This capability covers some of the stuff we've used UI tests to cover
in the past. Consider whether your UI tests can instead be expressed
as a render_view_unittest, as it will be much easier to write, debug,
and should be much less flaky (you don't need 3 levels of automation
proxy messages just to do something simple).

Don't forget about test_shell_tests if you're only testing parts of
the port or glue and don't need render_view.

Thanks,
Brett

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to