Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 654103002: Further refine mojo_example_apptests. (Closed)

Created:
6 years, 2 months ago by msw
Modified:
6 years, 2 months ago
Reviewers:
viettrungluu
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, DaveMoore
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Further refine mojo_example_apptests. Destroy MojoMain's RunLoop before executing tests. Reuse the shell handle for multiple test app instances. Add ApplicationImpl::UnbindShell for message pipe reuse. Add Apptest, a GTEST base class for application testing. TODO: Support/Exemplify actual command line arg use. BUG=392646 TEST=mojo_shell 'mojo:mojo_example_apptests <gtest_args>' still works. R=viettrungluu@chromium.org Committed: https://crrev.com/1b38080e455f6ee9e47e97bc1e03c8565111cfc1 Cr-Commit-Position: refs/heads/master@{#300155}

Patch Set 1 #

Patch Set 2 : Remove the unnecessary ApplicationDelegate subclass; cleanup. #

Total comments: 10

Patch Set 3 : Address comments; add Apptest base class. #

Total comments: 2

Patch Set 4 : Move RunLoop into the Apptest base class; rename SetCallback. #

Patch Set 5 : Keep a global POD MessagePipeHandle instance; cleanup. #

Patch Set 6 : Add MOJO_ALLOW_UNUSED_LOCAL for the MojoClose result. #

Patch Set 7 : Sync and rebase. #

Patch Set 8 : Fix MojoClose result check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -32 lines) Patch
M mojo/examples/apptest/example_apptest.cc View 1 2 3 4 5 6 7 5 chunks +83 lines, -24 lines 0 comments Download
M mojo/public/cpp/application/application_impl.h View 1 2 3 4 5 6 2 chunks +6 lines, -1 line 0 comments Download
M mojo/public/cpp/application/lib/application_impl.cc View 1 2 3 4 5 6 2 chunks +11 lines, -7 lines 0 comments Download

Messages

Total messages: 25 (11 generated)
msw
Hey Trung, please take a look; thanks!
6 years, 2 months ago (2014-10-15 00:21:28 UTC) #3
viettrungluu
https://codereview.chromium.org/654103002/diff/40001/mojo/examples/apptest/example_apptest.cc File mojo/examples/apptest/example_apptest.cc (right): https://codereview.chromium.org/654103002/diff/40001/mojo/examples/apptest/example_apptest.cc#newcode25 mojo/examples/apptest/example_apptest.cc:25: mojo::Array<mojo::String> g_args_hack; I don't think the individual tests actually ...
6 years, 2 months ago (2014-10-15 20:15:51 UTC) #4
msw
Thanks for the good comments, please take another look! https://codereview.chromium.org/654103002/diff/40001/mojo/examples/apptest/example_apptest.cc File mojo/examples/apptest/example_apptest.cc (right): https://codereview.chromium.org/654103002/diff/40001/mojo/examples/apptest/example_apptest.cc#newcode25 mojo/examples/apptest/example_apptest.cc:25: ...
6 years, 2 months ago (2014-10-16 00:34:09 UTC) #7
viettrungluu
LGTM w/nit. https://codereview.chromium.org/654103002/diff/100001/mojo/examples/apptest/example_apptest.cc File mojo/examples/apptest/example_apptest.cc (right): https://codereview.chromium.org/654103002/diff/100001/mojo/examples/apptest/example_apptest.cc#newcode33 mojo/examples/apptest/example_apptest.cc:33: application_impl_(NULL) { nit: nullptr instead of NULL
6 years, 2 months ago (2014-10-16 02:22:24 UTC) #8
msw
Please take another look. As discussed, I moved the RunLoop to the Apptest base class ...
6 years, 2 months ago (2014-10-16 19:40:59 UTC) #9
viettrungluu
lgtm
6 years, 2 months ago (2014-10-17 00:35:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654103002/160001
6 years, 2 months ago (2014-10-17 02:03:23 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/18256) linux_chromium_compile_dbg_32 on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32/builds/2663)
6 years, 2 months ago (2014-10-17 02:08:38 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654103002/200001
6 years, 2 months ago (2014-10-17 18:10:02 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654103002/220001
6 years, 2 months ago (2014-10-17 18:23:48 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu_retina_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_retina_triggered_tests/builds/59887)
6 years, 2 months ago (2014-10-17 19:14:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654103002/220001
6 years, 2 months ago (2014-10-17 20:23:33 UTC) #23
commit-bot: I haz the power
Committed patchset #8 (id:220001)
6 years, 2 months ago (2014-10-17 20:24:56 UTC) #24
commit-bot: I haz the power
6 years, 2 months ago (2014-10-17 20:27:22 UTC) #25
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/1b38080e455f6ee9e47e97bc1e03c8565111cfc1
Cr-Commit-Position: refs/heads/master@{#300155}

Powered by Google App Engine
This is Rietveld 408576698