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

Issue 959963002: [Chromoting] Enable jscompile for webapp unittests. (Closed)

Created:
5 years, 10 months ago by garykac
Modified:
5 years, 9 months ago
Reviewers:
kelvinp
CC:
chromium-reviews, jshin+watch_chromium.org, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chromoting] Enable jscompile for webapp unittests. This adds a target to run jscompile over the unittest files. The save/restore functions of chromeMocks are removed since they are not necessary. chromeMocks.reset() is called automatically before each test. It also fixes most of the errors that jscompile produces. For the unittests where all the errors have not been fixed, jscompile is disabled for those files. Cases where errors were not fixed include those that require refactoring base classes to expose an interface that the corresponding mock can use -- these are best done is a separate, targetted cl. Also, the it2me tests are not checked because they will be removed soon. BUG= Committed: https://crrev.com/818c8017bfe5555ab5093613bba737f520a73131 Cr-Commit-Position: refs/heads/master@{#318725}

Patch Set 1 #

Total comments: 34

Patch Set 2 : Update copyright #

Patch Set 3 : Merge #

Patch Set 4 : Revert chromeMocks to fix unittests #

Patch Set 5 : Rename sinon.$testStub -> sinon.TestStub #

Total comments: 8

Patch Set 6 : Fix key_tester jscompile #

Patch Set 7 : Fix key tester #

Unified diffs Side-by-side diffs Delta from patch set Stats (+769 lines, -266 lines) Patch
M remoting/remoting_key_tester.gypi View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M remoting/remoting_webapp.gypi View 3 chunks +23 lines, -2 lines 0 comments Download
M remoting/remoting_webapp_files.gypi View 1 2 4 chunks +41 lines, -14 lines 0 comments Download
M remoting/webapp/base/js/auth_init.js View 1 2 3 2 chunks +9 lines, -7 lines 0 comments Download
M remoting/webapp/base/js/ipc.js View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M remoting/webapp/crd/html/template_unittest.html View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/crd/js/apps_v2_migration.js View 1 2 3 2 chunks +9 lines, -11 lines 0 comments Download
M remoting/webapp/crd/js/oauth2.js View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M remoting/webapp/crd/js/xmpp_login_handler.js View 1 chunk +6 lines, -0 lines 0 comments Download
A remoting/webapp/js_proto/chrome_cast_proto.js View 1 chunk +129 lines, -0 lines 0 comments Download
A remoting/webapp/js_proto/chrome_event_proto.js View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M remoting/webapp/js_proto/chrome_proto.js View 2 chunks +0 lines, -131 lines 0 comments Download
M remoting/webapp/js_proto/dom_proto.js View 1 chunk +6 lines, -0 lines 0 comments Download
A remoting/webapp/js_proto/qunit_proto.js View 1 2 1 chunk +87 lines, -0 lines 0 comments Download
A remoting/webapp/js_proto/sinon_proto.js View 1 2 3 4 1 chunk +113 lines, -0 lines 0 comments Download
A remoting/webapp/js_proto/sinon_stub_proto.js View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
M remoting/webapp/js_proto/test_proto.js View 1 chunk +0 lines, -4 lines 0 comments Download
M remoting/webapp/unittests/apps_v2_migration_unittest.js View 1 2 3 4 6 chunks +19 lines, -10 lines 0 comments Download
M remoting/webapp/unittests/base_unittest.js View 1 2 3 4 5 8 chunks +35 lines, -19 lines 0 comments Download
M remoting/webapp/unittests/chrome_mocks.js View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M remoting/webapp/unittests/desktop_viewport_unittest.js View 1 chunk +12 lines, -2 lines 0 comments Download
M remoting/webapp/unittests/dns_blackhole_checker_unittest.js View 1 2 2 chunks +13 lines, -1 line 0 comments Download
M remoting/webapp/unittests/event_hook_unittest.js View 1 2 3 2 chunks +25 lines, -4 lines 0 comments Download
M remoting/webapp/unittests/fallback_signal_strategy_unittest.js View 1 2 2 chunks +25 lines, -1 line 0 comments Download
M remoting/webapp/unittests/ipc_unittest.js View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M remoting/webapp/unittests/it2me_helpee_channel_unittest.js View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M remoting/webapp/unittests/it2me_helper_channel_unittest.js View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M remoting/webapp/unittests/it2me_service_unittest.js View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M remoting/webapp/unittests/l10n_unittest.js View 7 chunks +11 lines, -8 lines 0 comments Download
M remoting/webapp/unittests/menu_button_unittest.js View 1 2 3 chunks +8 lines, -4 lines 0 comments Download
M remoting/webapp/unittests/mock_signal_strategy.js View 1 chunk +2 lines, -2 lines 0 comments Download
A remoting/webapp/unittests/sinon_helpers.js View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
A remoting/webapp/unittests/test_start.js View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M remoting/webapp/unittests/xhr_unittest.js View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M remoting/webapp/unittests/xmpp_connection_unittest.js View 1 2 5 chunks +29 lines, -21 lines 0 comments Download
M remoting/webapp/unittests/xmpp_login_handler_unittest.js View 1 2 5 chunks +38 lines, -15 lines 0 comments Download
M remoting/webapp/unittests/xmpp_stream_parser_unittest.js View 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
garykac
5 years, 10 months ago (2015-02-25 23:15:10 UTC) #2
kelvinp
Thank you for doing this change and battling with all the JSCompile errors. Looks good ...
5 years, 10 months ago (2015-02-26 00:31:31 UTC) #3
garykac
ptal https://codereview.chromium.org/959963002/diff/1/remoting/remoting_webapp.gypi File remoting/remoting_webapp.gypi (right): https://codereview.chromium.org/959963002/diff/1/remoting/remoting_webapp.gypi#newcode63 remoting/remoting_webapp.gypi:63: '<@(remoting_webapp_crd_js_files)', On 2015/02/26 00:31:30, kelvinp wrote: > Would ...
5 years, 9 months ago (2015-02-28 02:33:34 UTC) #4
kelvinp
lgtm once comments are addressed. https://codereview.chromium.org/959963002/diff/80001/remoting/webapp/base/js/auth_init.js File remoting/webapp/base/js/auth_init.js (right): https://codereview.chromium.org/959963002/diff/80001/remoting/webapp/base/js/auth_init.js#newcode46 remoting/webapp/base/js/auth_init.js:46: /** @param {{email:string, name:string}} ...
5 years, 9 months ago (2015-02-28 03:03:52 UTC) #5
garykac
https://codereview.chromium.org/959963002/diff/80001/remoting/webapp/base/js/auth_init.js File remoting/webapp/base/js/auth_init.js (right): https://codereview.chromium.org/959963002/diff/80001/remoting/webapp/base/js/auth_init.js#newcode46 remoting/webapp/base/js/auth_init.js:46: /** @param {{email:string, name:string}} userInfo */ On 2015/02/28 03:03:52, ...
5 years, 9 months ago (2015-02-28 03:28:23 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/959963002/100001
5 years, 9 months ago (2015-02-28 03:29:25 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_clobber_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_clobber_rel_ng/builds/1966)
5 years, 9 months ago (2015-02-28 05:07:51 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/959963002/100001
5 years, 9 months ago (2015-03-02 16:06:58 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_clobber_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_clobber_rel_ng/builds/2311)
5 years, 9 months ago (2015-03-02 17:55:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/959963002/120001
5 years, 9 months ago (2015-03-02 17:57:43 UTC) #18
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 9 months ago (2015-03-02 18:38:03 UTC) #19
commit-bot: I haz the power
5 years, 9 months ago (2015-03-02 18:38:48 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/818c8017bfe5555ab5093613bba737f520a73131
Cr-Commit-Position: refs/heads/master@{#318725}

Powered by Google App Engine
This is Rietveld 408576698