RESOLVED FIXED 46907
[Chromium] Enable webkit unit tests in chromium multi-dll build
https://bugs.webkit.org/show_bug.cgi?id=46907
Summary [Chromium] Enable webkit unit tests in chromium multi-dll build
Victor Wang
Reported 2010-09-30 08:56:54 PDT
In chromium Windows multi-dll build, webkit is built as a shared library (dll). To run the webkit unit tests in this mode, we need to compile the unit tests code in the webkit.dll and export an webkit api that launches all the tests.
Attachments
Proposed Patch (11.60 KB, patch)
2010-09-30 09:31 PDT, Victor Wang
no flags
Proposed Patch (11.65 KB, patch)
2010-10-06 11:49 PDT, Victor Wang
fishd: review+
Victor Wang
Comment 1 2010-09-30 09:31:12 PDT
Created attachment 69341 [details] Proposed Patch
Darin Fisher (:fishd, Google)
Comment 2 2010-10-04 10:41:23 PDT
Comment on attachment 69341 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69341&action=review > WebKit/chromium/tests/RunAllTests.cpp:44 > +#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST) is it possible to unify these two branches so that we can avoid the #ifdef here?
Victor Wang
Comment 3 2010-10-04 14:46:24 PDT
(In reply to comment #2) > (From update of attachment 69341 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=69341&action=review > > > WebKit/chromium/tests/RunAllTests.cpp:44 > > +#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST) > > is it possible to unify these two branches so that we can avoid the > #ifdef here? Not sure a good way to do this. The atExitManager (TestSuite) must to be created before WebKit support SetUpTestEnvironment, but it can not be created more than once in the binary.
Darin Fisher (:fishd, Google)
Comment 4 2010-10-05 14:00:58 PDT
Also, it would be nice to avoid directly using base::AtExitManager from the WebKit code base. We need to hide such dependencies. Otherwise, it will be very difficult to ever rename AtExitManager or change the way it works (if we wanted to do so). Circular dependencies between Chromium and WebKit repositories add pain. I have some ideas about how to resolve this. Perhaps we could introduce a method to webkit_support that makes a callback to run the tests. Then, the details of how the AtExitManager gets initialized could live in the Chromium repository.
Victor Wang
Comment 5 2010-10-06 11:49:00 PDT
Created attachment 69972 [details] Proposed Patch Do not see a simple way to avoid #ifdef. New patch uploaded per our discussion, it hides the AtExitManager by creating a TestSuite instance.
Darin Fisher (:fishd, Google)
Comment 6 2010-10-06 11:56:35 PDT
Comment on attachment 69972 [details] Proposed Patch R=me
Victor Wang
Comment 7 2010-10-06 15:35:21 PDT
WebKit Review Bot
Comment 8 2010-10-06 16:55:11 PDT
http://trac.webkit.org/changeset/69243 might have broken Chromium Win Release
Victor Wang
Comment 9 2010-10-06 19:22:32 PDT
(In reply to comment #8) > http://trac.webkit.org/changeset/69243 might have broken Chromium Win Release Think this is false alarm. The build was broken by another patch (http://trac.webkit.org/changeset/69247) and was fixed later (http://trac.webkit.org/changeset/69251).
Note You need to log in before you can comment on or make changes to this bug.