Sigh, I'll need to add the mojo::Environment::[Instantiate|Destroy]DefaultRunLoop helper functions for ApplicationTestBase, which is mirrored between ...
Sigh, I'll need to add the
mojo::Environment::[Instantiate|Destroy]DefaultRunLoop helper functions for
ApplicationTestBase, which is mirrored between Mojo and Chromium codebases. I'll
ping here when that's done.
Where's ApplicationTestBase? https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc File mojo/application/application_test_main_chromium.cc (right): https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc#newcode17 mojo/application/application_test_main_chromium.cc:17: base::AtExitManager at_exit; this is only needed if ...
6 years, 1 month ago
(2014-11-11 23:07:33 UTC)
#13
On 2014/11/11 23:07:33, jamesr wrote: > Where's ApplicationTestBase? mojo/public/cpp/application/application_test_base.h mojo/public/cpp/application/lib/application_test_base.cc I would [optionally] continue defining ...
6 years, 1 month ago
(2014-11-11 23:18:28 UTC)
#14
On 2014/11/11 23:07:33, jamesr wrote:
> Where's ApplicationTestBase?
mojo/public/cpp/application/application_test_base.h
mojo/public/cpp/application/lib/application_test_base.cc
I would [optionally] continue defining the header in
mojo/public/cpp/application:test_support, and then split the implementation into
separate files for the mojo/public/cpp/application:test_support_standalone and
mojo/application:test_support targets, similar to
application_test_main_[chromium].cc
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
File mojo/application/application_test_main_chromium.cc (right):
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
mojo/application/application_test_main_chromium.cc:17: base::AtExitManager
at_exit;
On 2014/11/11 23:07:33, jamesr wrote:
> this is only needed if we're creating a base::MessageLoop, right? do we know
at
> compile time that mojo::Environment::Instantiate..() is going to make a
> base::MessageLoop here always in that case?
Yes, this file (application_test_main_chromium.cc) uses the chromium-environment
and will use base::MessageLoop.
I previously suggested defining mojo::Environment ctors in the
chromium-environment to handle creation of the AtExitManager, so this bit would
be abstracted away like the run loop helpers using base::MessageLoop or
mojo::RunLoop, but Trung really didn't like that idea.
So again, perhaps these files and ApplicationTestBase should be split up so we
can be explicit about the environment everywhere?
jamesr
https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc File mojo/application/application_test_main_chromium.cc (right): https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc#newcode17 mojo/application/application_test_main_chromium.cc:17: base::AtExitManager at_exit; On 2014/11/11 23:18:28, msw wrote: > On ...
6 years, 1 month ago
(2014-11-11 23:22:21 UTC)
#15
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
File mojo/application/application_test_main_chromium.cc (right):
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
mojo/application/application_test_main_chromium.cc:17: base::AtExitManager
at_exit;
On 2014/11/11 23:18:28, msw wrote:
> On 2014/11/11 23:07:33, jamesr wrote:
> > this is only needed if we're creating a base::MessageLoop, right? do we know
> at
> > compile time that mojo::Environment::Instantiate..() is going to make a
> > base::MessageLoop here always in that case?
>
> Yes, this file (application_test_main_chromium.cc) uses the
chromium-environment
> and will use base::MessageLoop.
OK... then at line 21 why don't you just call base::MessageLoop directly? Why
call through mojo::Environment? This file already depends on base.
> So again, perhaps these files and ApplicationTestBase should be split up so we
> can be explicit about the environment everywhere?
Maybe I'm think but it seems like they already are separate files so they can
use different code.
msw
https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc File mojo/application/application_test_main_chromium.cc (right): https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc#newcode17 mojo/application/application_test_main_chromium.cc:17: base::AtExitManager at_exit; On 2014/11/11 23:22:21, jamesr wrote: > On ...
6 years, 1 month ago
(2014-11-11 23:29:33 UTC)
#16
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
File mojo/application/application_test_main_chromium.cc (right):
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
mojo/application/application_test_main_chromium.cc:17: base::AtExitManager
at_exit;
On 2014/11/11 23:22:21, jamesr wrote:
> On 2014/11/11 23:18:28, msw wrote:
> > On 2014/11/11 23:07:33, jamesr wrote:
> > > this is only needed if we're creating a base::MessageLoop, right? do we
know
> > at
> > > compile time that mojo::Environment::Instantiate..() is going to make a
> > > base::MessageLoop here always in that case?
> >
> > Yes, this file (application_test_main_chromium.cc) uses the
> chromium-environment
> > and will use base::MessageLoop.
>
> OK... then at line 21 why don't you just call base::MessageLoop directly? Why
> call through mojo::Environment? This file already depends on base.
For consistency with ApplicationTestBase and the standalone main.cc.
(I didn't have any other really compelling reasons)
> > So again, perhaps these files and ApplicationTestBase should be split up so
we
> > can be explicit about the environment everywhere?
>
> Maybe I'm think but it seems like they already are separate files so they can
> use different code.
Yeah, both MojoMain()s can use loops directly, ApplicationTestBase can't right
now; it seems like they should be consistent.
6 years, 1 month ago
(2014-11-11 23:38:19 UTC)
#17
On 2014/11/11 23:29:33, msw wrote:
>
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
> File mojo/application/application_test_main_chromium.cc (right):
>
>
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
> mojo/application/application_test_main_chromium.cc:17: base::AtExitManager
> at_exit;
> On 2014/11/11 23:22:21, jamesr wrote:
> > On 2014/11/11 23:18:28, msw wrote:
> > > On 2014/11/11 23:07:33, jamesr wrote:
> > > > this is only needed if we're creating a base::MessageLoop, right? do we
> know
> > > at
> > > > compile time that mojo::Environment::Instantiate..() is going to make a
> > > > base::MessageLoop here always in that case?
> > >
> > > Yes, this file (application_test_main_chromium.cc) uses the
> > chromium-environment
> > > and will use base::MessageLoop.
> >
> > OK... then at line 21 why don't you just call base::MessageLoop directly?
Why
> > call through mojo::Environment? This file already depends on base.
>
> For consistency with ApplicationTestBase and the standalone main.cc.
> (I didn't have any other really compelling reasons)
>
> > > So again, perhaps these files and ApplicationTestBase should be split up
so
> we
> > > can be explicit about the environment everywhere?
> >
> > Maybe I'm think but it seems like they already are separate files so they
can
> > use different code.
>
> Yeah, both MojoMain()s can use loops directly, ApplicationTestBase can't right
> now; it seems like they should be consistent.
This consistency does not seem useful.
mojo/application/application_test_main_chromium.cc already has code that *only*
does what you want if you're using a base::MessageLoop, so going through an
additional abstraction just obscures what's going on without providing any
increase in flexibility.
msw
On 2014/11/11 23:38:19, jamesr wrote: > On 2014/11/11 23:29:33, msw wrote: > > > https://codereview.chromium.org/710403002/diff/100001/mojo/application/application_test_main_chromium.cc ...
6 years, 1 month ago
(2014-11-11 23:45:26 UTC)
#18
On 2014/11/11 23:38:19, jamesr wrote:
> On 2014/11/11 23:29:33, msw wrote:
> >
>
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
> > File mojo/application/application_test_main_chromium.cc (right):
> >
> >
>
https://codereview.chromium.org/710403002/diff/100001/mojo/application/applic...
> > mojo/application/application_test_main_chromium.cc:17: base::AtExitManager
> > at_exit;
> > On 2014/11/11 23:22:21, jamesr wrote:
> > > On 2014/11/11 23:18:28, msw wrote:
> > > > On 2014/11/11 23:07:33, jamesr wrote:
> > > > > this is only needed if we're creating a base::MessageLoop, right? do
we
> > know
> > > > at
> > > > > compile time that mojo::Environment::Instantiate..() is going to make
a
> > > > > base::MessageLoop here always in that case?
> > > >
> > > > Yes, this file (application_test_main_chromium.cc) uses the
> > > chromium-environment
> > > > and will use base::MessageLoop.
> > >
> > > OK... then at line 21 why don't you just call base::MessageLoop directly?
> Why
> > > call through mojo::Environment? This file already depends on base.
> >
> > For consistency with ApplicationTestBase and the standalone main.cc.
> > (I didn't have any other really compelling reasons)
> >
> > > > So again, perhaps these files and ApplicationTestBase should be split up
> so
> > we
> > > > can be explicit about the environment everywhere?
> > >
> > > Maybe I'm think but it seems like they already are separate files so they
> can
> > > use different code.
> >
> > Yeah, both MojoMain()s can use loops directly, ApplicationTestBase can't
right
> > now; it seems like they should be consistent.
>
> This consistency does not seem useful.
> mojo/application/application_test_main_chromium.cc already has code that
*only*
> does what you want if you're using a base::MessageLoop, so going through an
> additional abstraction just obscures what's going on without providing any
> increase in flexibility.
The latest patch set uses base::MessageLoop directly in
application_test_main_chromium.cc, and I can make similar changes to the
standalone main file in a Mojo repo CL.
As-is we still need the environment functions for ApplicationTestBase.
jamesr
The ApplicationTestBase code doesn't appear to be changed in this patch. Does it currently not ...
6 years, 1 month ago
(2014-11-11 23:50:20 UTC)
#19
The ApplicationTestBase code doesn't appear to be changed in this patch. Does
it currently not function correctly or not work at all?
msw
On 2014/11/11 23:50:20, jamesr wrote: > The ApplicationTestBase code doesn't appear to be changed in ...
6 years, 1 month ago
(2014-11-11 23:51:58 UTC)
#20
On 2014/11/11 23:50:20, jamesr wrote:
> The ApplicationTestBase code doesn't appear to be changed in this patch. Does
> it currently not function correctly or not work at all?
Yeah, it was broken in the Chromium repro, it hadn't been used yet.
jamesr
OK. lgtm
6 years, 1 month ago
(2014-11-11 23:53:58 UTC)
#21
OK. lgtm
msw
The CQ bit was checked by msw@chromium.org
6 years, 1 month ago
(2014-11-11 23:58:24 UTC)
#22
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/27401) win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel/builds/11833)
6 years, 1 month ago
(2014-11-12 00:21:18 UTC)
#25
Issue 710403002: Add Mojo application test support to Chromium.
(Closed)
Created 6 years, 1 month ago by msw
Modified 6 years, 1 month ago
Reviewers: jamesr
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 20