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

Issue 971083002: Create an apptesting framework for dart. (Closed)

Created:
5 years, 9 months ago by Elliot Glaysher
Modified:
5 years, 9 months ago
Reviewers:
zra, tonyg, msw
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, hansmuller, sky
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Create an apptesting framework for dart. This directly imports the dart unittest/unittest library and dependencies into third_party/, and creates a new apptest.dartzip which can be linked into your packaged mojo dart applications. This patch also rebuilds the current C++ apptests which test dart code in dart to show feasibility. BUG=459376 R=msw@chromium.org, tonyg@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/373b74f1339c7953007662dd5237d8507e156655

Patch Set 1 #

Total comments: 8

Patch Set 2 : Finish porting all the tests, and do some gn work. #

Total comments: 5

Patch Set 3 : Make the apptest runner work. #

Total comments: 6

Patch Set 4 : msw comments #

Total comments: 15

Patch Set 5 : Move all the gtest specific stuff from apptest_runner.py to gtest.py #

Patch Set 6 : Rebase to ToT to fix merge failure. #

Total comments: 4

Patch Set 7 : python nits #

Total comments: 7

Patch Set 8 : Update upload_binaries.py to add the apptest.dartzip artifact. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2045 lines, -391 lines) Patch
M mojo/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
A + mojo/dart/apptest/BUILD.gn View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A mojo/dart/apptest/apptest/apptest.dart View 1 2 3 4 5 6 7 1 chunk +61 lines, -0 lines 0 comments Download
M mojo/public/dart/src/application.dart View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/tools/apptest_runner.py View 1 2 3 4 5 6 3 chunks +9 lines, -46 lines 0 comments Download
M mojo/tools/data/apptests View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A mojo/tools/mopy/dart_apptest.py View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
M mojo/tools/mopy/gtest.py View 1 2 3 4 5 6 6 chunks +55 lines, -69 lines 0 comments Download
A mojo/tools/mopy/test_util.py View 1 2 3 4 1 chunk +77 lines, -0 lines 0 comments Download
M mojo/tools/upload_binaries.py View 1 2 3 4 5 6 7 6 chunks +43 lines, -6 lines 1 comment Download
M services/dart/BUILD.gn View 1 chunk +0 lines, -24 lines 0 comments Download
A services/dart/dart_apptests/BUILD.gn View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A services/dart/dart_apptests/echo_apptests.dart View 1 chunk +48 lines, -0 lines 0 comments Download
A services/dart/dart_apptests/main.dart View 1 chunk +13 lines, -0 lines 0 comments Download
A services/dart/dart_apptests/pingpong_apptests.dart View 1 2 3 1 chunk +118 lines, -0 lines 0 comments Download
D services/dart/echo_apptest.cc View 1 chunk +0 lines, -77 lines 0 comments Download
D services/dart/pingpong_apptest.cc View 1 1 chunk +0 lines, -123 lines 0 comments Download
A third_party/dart-packages/matcher/BUILD.gn View 1 chunk +28 lines, -0 lines 0 comments Download
A + third_party/dart-packages/matcher/LICENSE View 1 chunk +1 line, -1 line 0 comments Download
A third_party/dart-packages/matcher/README.md View 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/dart-packages/matcher/README.mojo View 1 chunk +4 lines, -0 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/matcher.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/mirror_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/core_matchers.dart View 2 chunks +2 lines, -5 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/description.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/error_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/expect.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/future_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/interfaces.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/iterable_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/map_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/numeric_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/operator_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/pretty_print.dart View 2 chunks +2 lines, -18 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/prints_matcher.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/string_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/throws_matcher.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/throws_matchers.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/matcher/matcher/src/util.dart View 2 chunks +31 lines, -0 lines 0 comments Download
A third_party/dart-packages/path/BUILD.gn View 1 chunk +21 lines, -0 lines 0 comments Download
A + third_party/dart-packages/path/LICENSE View 1 chunk +1 line, -1 line 0 comments Download
A third_party/dart-packages/path/README.md View 1 chunk +93 lines, -0 lines 0 comments Download
A third_party/dart-packages/path/README.mojo View 1 chunk +3 lines, -0 lines 0 comments Download
A + third_party/dart-packages/path/path/path.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/characters.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/context.dart View 1 chunk +7 lines, -1 line 0 comments Download
A + third_party/dart-packages/path/path/src/internal_style.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/parsed_path.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/path_exception.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/style.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/style/posix.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/style/url.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/style/windows.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/path/path/src/utils.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/dart-packages/stack_trace/BUILD.gn View 1 chunk +18 lines, -0 lines 0 comments Download
A + third_party/dart-packages/stack_trace/LICENSE View 1 chunk +1 line, -1 line 0 comments Download
A third_party/dart-packages/stack_trace/README.md View 1 chunk +208 lines, -0 lines 0 comments Download
A third_party/dart-packages/stack_trace/README.mojo View 1 chunk +3 lines, -0 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/chain.dart View 2 chunks +8 lines, -17 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/frame.dart View 3 chunks +15 lines, -10 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/lazy_trace.dart View 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/stack_zone_specification.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/trace.dart View 2 chunks +42 lines, -16 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/utils.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/src/vm_trace.dart View 1 chunk +4 lines, -1 line 0 comments Download
A + third_party/dart-packages/stack_trace/stack_trace/stack_trace.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/dart-packages/unittest/BUILD.gn View 1 chunk +29 lines, -0 lines 0 comments Download
A + third_party/dart-packages/unittest/LICENSE View 1 chunk +1 line, -1 line 0 comments Download
A third_party/dart-packages/unittest/README.md View 1 chunk +141 lines, -0 lines 0 comments Download
A third_party/dart-packages/unittest/README.mojo View 1 chunk +3 lines, -0 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/compact_vm_config.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/dart-packages/unittest/unittest/coverage_controller.js View 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/dart-packages/unittest/unittest/html_config.dart View 1 chunk +175 lines, -0 lines 0 comments Download
A third_party/dart-packages/unittest/unittest/html_enhanced_config.dart View 1 chunk +405 lines, -0 lines 0 comments Download
A third_party/dart-packages/unittest/unittest/html_individual_config.dart View 1 chunk +52 lines, -0 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/configuration.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/expected_function.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/group_context.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/internal_test_case.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/simple_configuration.dart View 1 chunk +1 line, -1 line 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/test_case.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/test_environment.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/src/utils.dart View 1 chunk +1 line, -1 line 0 comments Download
A third_party/dart-packages/unittest/unittest/test_controller.js View 1 chunk +237 lines, -0 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/unittest.dart View 2 chunks +2 lines, -2 lines 0 comments Download
A + third_party/dart-packages/unittest/unittest/vm_config.dart View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 22 (2 generated)
Elliot Glaysher
zra: first round review; still working on porting the last few tests, but I wanted ...
5 years, 9 months ago (2015-03-02 22:37:17 UTC) #2
tonyg
https://codereview.chromium.org/971083002/diff/1/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/971083002/diff/1/BUILD.gn#newcode16 BUILD.gn:16: "//third_party/dart-packages/unittest", nit: alphabetize https://codereview.chromium.org/971083002/diff/1/mojo/dart/apptest/BUILD.gn File mojo/dart/apptest/BUILD.gn (right): https://codereview.chromium.org/971083002/diff/1/mojo/dart/apptest/BUILD.gn#newcode7 mojo/dart/apptest/BUILD.gn:7: ...
5 years, 9 months ago (2015-03-02 22:43:31 UTC) #3
Elliot Glaysher
Finished porting the C++ tests and fixed some problems with the gn files. https://codereview.chromium.org/971083002/diff/1/BUILD.gn File ...
5 years, 9 months ago (2015-03-02 23:33:37 UTC) #4
Elliot Glaysher
https://codereview.chromium.org/971083002/diff/20001/services/dart/dart_apptests/pingpong_apptests.dart File services/dart/dart_apptests/pingpong_apptests.dart (right): https://codereview.chromium.org/971083002/diff/20001/services/dart/dart_apptests/pingpong_apptests.dart#newcode115 services/dart/dart_apptests/pingpong_apptests.dart:115: pingPongServiceProxy.close(); There's also a deeper question about if we ...
5 years, 9 months ago (2015-03-02 23:40:49 UTC) #5
tonyg
https://codereview.chromium.org/971083002/diff/1/mojo/dart/apptest/BUILD.gn File mojo/dart/apptest/BUILD.gn (right): https://codereview.chromium.org/971083002/diff/1/mojo/dart/apptest/BUILD.gn#newcode7 mojo/dart/apptest/BUILD.gn:7: dart_package("apptest") { On 2015/03/02 23:33:37, Elliot Glaysher wrote: > ...
5 years, 9 months ago (2015-03-03 00:07:55 UTC) #6
zra
https://codereview.chromium.org/971083002/diff/20001/services/dart/dart_apptests/pingpong_apptests.dart File services/dart/dart_apptests/pingpong_apptests.dart (right): https://codereview.chromium.org/971083002/diff/20001/services/dart/dart_apptests/pingpong_apptests.dart#newcode83 services/dart/dart_apptests/pingpong_apptests.dart:83: // tests, which is weird. On 2015/03/02 23:33:37, Elliot ...
5 years, 9 months ago (2015-03-03 00:45:04 UTC) #7
Elliot Glaysher
https://codereview.chromium.org/971083002/diff/20001/services/dart/dart_apptests/pingpong_apptests.dart File services/dart/dart_apptests/pingpong_apptests.dart (right): https://codereview.chromium.org/971083002/diff/20001/services/dart/dart_apptests/pingpong_apptests.dart#newcode83 services/dart/dart_apptests/pingpong_apptests.dart:83: // tests, which is weird. On 2015/03/03 00:45:04, zra ...
5 years, 9 months ago (2015-03-03 22:06:56 UTC) #8
Elliot Glaysher
+msw to review the changes to the apptesting framework
5 years, 9 months ago (2015-03-04 00:02:21 UTC) #10
msw
https://codereview.chromium.org/971083002/diff/40001/mojo/tools/apptest_runner.py File mojo/tools/apptest_runner.py (right): https://codereview.chromium.org/971083002/diff/40001/mojo/tools/apptest_runner.py#newcode67 mojo/tools/apptest_runner.py:67: # TODO(erg): Support android and external and fixture isolation. ...
5 years, 9 months ago (2015-03-04 00:49:50 UTC) #11
zra
On 2015/03/03 22:06:56, Elliot Glaysher wrote: > So, why does this work in the C++ ...
5 years, 9 months ago (2015-03-04 03:26:19 UTC) #12
Elliot Glaysher
msw: I've done all the fixes you asked for minus one. https://codereview.chromium.org/971083002/diff/40001/mojo/tools/apptest_runner.py File mojo/tools/apptest_runner.py (right): ...
5 years, 9 months ago (2015-03-04 20:17:02 UTC) #13
msw
https://codereview.chromium.org/971083002/diff/40001/mojo/tools/apptest_runner.py File mojo/tools/apptest_runner.py (right): https://codereview.chromium.org/971083002/diff/40001/mojo/tools/apptest_runner.py#newcode67 mojo/tools/apptest_runner.py:67: # TODO(erg): Support android and external and fixture isolation. ...
5 years, 9 months ago (2015-03-04 21:04:32 UTC) #14
Elliot Glaysher
https://codereview.chromium.org/971083002/diff/60001/mojo/tools/apptest_runner.py File mojo/tools/apptest_runner.py (right): https://codereview.chromium.org/971083002/diff/60001/mojo/tools/apptest_runner.py#newcode74 mojo/tools/apptest_runner.py:74: else: On 2015/03/04 21:04:31, msw wrote: > nit: maybe ...
5 years, 9 months ago (2015-03-04 22:20:59 UTC) #15
Elliot Glaysher
On 2015/03/04 22:20:59, Elliot Glaysher wrote: > https://codereview.chromium.org/971083002/diff/60001/mojo/tools/apptest_runner.py > File mojo/tools/apptest_runner.py (right): > > https://codereview.chromium.org/971083002/diff/60001/mojo/tools/apptest_runner.py#newcode74 ...
5 years, 9 months ago (2015-03-04 22:27:46 UTC) #16
msw
I guess the python code lgtm with nits... https://codereview.chromium.org/971083002/diff/100001/mojo/tools/mopy/gtest.py File mojo/tools/mopy/gtest.py (right): https://codereview.chromium.org/971083002/diff/100001/mojo/tools/mopy/gtest.py#newcode26 mojo/tools/mopy/gtest.py:26: def ...
5 years, 9 months ago (2015-03-04 22:36:45 UTC) #17
Elliot Glaysher
ping tonyg or zra to review the dart code. https://codereview.chromium.org/971083002/diff/1/third_party/dart-packages/matcher/BUILD.gn File third_party/dart-packages/matcher/BUILD.gn (right): https://codereview.chromium.org/971083002/diff/1/third_party/dart-packages/matcher/BUILD.gn#newcode1 third_party/dart-packages/matcher/BUILD.gn:1: ...
5 years, 9 months ago (2015-03-04 23:04:35 UTC) #18
tonyg
lgtm https://codereview.chromium.org/971083002/diff/120001/mojo/dart/apptest/apptest/apptest.dart File mojo/dart/apptest/apptest/apptest.dart (right): https://codereview.chromium.org/971083002/diff/120001/mojo/dart/apptest/apptest/apptest.dart#newcode20 mojo/dart/apptest/apptest/apptest.dart:20: List<Function> testFunctions; final? https://codereview.chromium.org/971083002/diff/120001/mojo/dart/apptest/apptest/apptest.dart#newcode30 mojo/dart/apptest/apptest/apptest.dart:30: for (var fun ...
5 years, 9 months ago (2015-03-04 23:13:55 UTC) #19
Elliot Glaysher
tonyg: next review. I've updated the upload_binaries.py file to add the dartzip thing. When performing ...
5 years, 9 months ago (2015-03-04 23:51:16 UTC) #20
tonyg
lgtm https://codereview.chromium.org/971083002/diff/140001/mojo/tools/upload_binaries.py File mojo/tools/upload_binaries.py (right): https://codereview.chromium.org/971083002/diff/140001/mojo/tools/upload_binaries.py#newcode131 mojo/tools/upload_binaries.py:131: gsutil_file_location = "gs://" + file_location_in_gs Would be nice ...
5 years, 9 months ago (2015-03-05 00:03:24 UTC) #21
Elliot Glaysher
5 years, 9 months ago (2015-03-05 00:08:40 UTC) #22
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
373b74f1339c7953007662dd5237d8507e156655 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698