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

Issue 250713003: Test sending corrupt mojo messages back from javascript. (Closed)

Created:
6 years, 8 months ago by Tom Sepez
Modified:
6 years, 7 months ago
CC:
chromium-reviews, viettrungluu+watch_chromium.org, jam, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), ben+mojo_chromium.org
Visibility:
Public.

Description

Test sending corrupt mojo messages back from javascript. This CL adds hooks to allow an outgoing message to be re-written just before it is handed off to C++ for transmission. I then build a simple bit-flipping test based upon this to see how the C++ side stands up to this (under ASAN). Another small change is to pass the number of iterations from the C++ side so that there no longer is a need to keep two constants in sync with each other. Another small change is to pull some of repeated code dealing with isolated testing into its own function to avoid duplication. The test is currently disabled pending the associated bug. This does not fix the bug but introduces a realiable repro for it. BUG=366797 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267925

Patch Set 1 #

Patch Set 2 : Fix Uint32 => Uint8 for consistency. #

Total comments: 4

Patch Set 3 : Don't modify the production JS. #

Patch Set 4 : Tidy code, avoid need for intermediate objects. #

Patch Set 5 : Fuzzing from apps/test unit tests. #

Patch Set 6 : Consolidate some duplicated sections. #

Patch Set 7 : Missing TestFinished() method in bit flip test, and add comment. #

Patch Set 8 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -56 lines) Patch
M mojo/apps/js/test/js_to_cpp.mojom View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M mojo/apps/js/test/js_to_cpp_unittest.cc View 1 2 3 4 5 6 5 chunks +111 lines, -47 lines 0 comments Download
M mojo/apps/js/test/js_to_cpp_unittest.js View 1 2 3 4 4 chunks +37 lines, -7 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
Tom Sepez
Sky, MP, Darin, please take a look. Thanks.
6 years, 8 months ago (2014-04-24 23:39:09 UTC) #1
abarth-chromium
https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js File mojo/public/js/bindings/connection.js (right): https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js#newcode25 mojo/public/js/bindings/connection.js:25: } We shouldn't need this test code in the ...
6 years, 8 months ago (2014-04-25 00:27:53 UTC) #2
Matt Perry
https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js File mojo/public/js/bindings/connection.js (right): https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js#newcode25 mojo/public/js/bindings/connection.js:25: } On 2014/04/25 00:27:54, abarth wrote: > We shouldn't ...
6 years, 8 months ago (2014-04-25 00:30:45 UTC) #3
abarth-chromium
https://codereview.chromium.org/250713003/diff/20001/content/test/data/web_ui_mojo.js File content/test/data/web_ui_mojo.js (right): https://codereview.chromium.org/250713003/diff/20001/content/test/data/web_ui_mojo.js#newcode67 content/test/data/web_ui_mojo.js:67: })()); Rather than hooking in like this, you should ...
6 years, 8 months ago (2014-04-25 00:36:48 UTC) #4
sky
Meta question posed to Matt in other thread: How come tests exercising JS bindings code ...
6 years, 8 months ago (2014-04-25 15:27:05 UTC) #5
Tom Sepez
On 2014/04/25 15:27:05, sky wrote: > Meta question posed to Matt in other thread: How ...
6 years, 8 months ago (2014-04-25 17:52:01 UTC) #6
Tom Sepez
https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js File mojo/public/js/bindings/connection.js (right): https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js#newcode25 mojo/public/js/bindings/connection.js:25: } On 2014/04/25 00:27:54, abarth wrote: > We shouldn't ...
6 years, 8 months ago (2014-04-25 18:30:33 UTC) #7
abarth-chromium
On 2014/04/25 18:30:33, Tom Sepez wrote: > https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js > File mojo/public/js/bindings/connection.js (right): > > https://codereview.chromium.org/250713003/diff/20001/mojo/public/js/bindings/connection.js#newcode25 ...
6 years, 8 months ago (2014-04-25 19:32:28 UTC) #8
sky
On Fri, Apr 25, 2014 at 10:52 AM, <tsepez@chromium.org> wrote: > On 2014/04/25 15:27:05, sky ...
6 years, 8 months ago (2014-04-25 19:33:33 UTC) #9
Tom Sepez
> I think it's better for this code to live in mojo land. Maybe in ...
6 years, 8 months ago (2014-04-25 19:38:23 UTC) #10
Matt Perry
On 2014/04/25 19:38:23, Tom Sepez wrote: > > I think it's better for this code ...
6 years, 8 months ago (2014-04-25 19:54:54 UTC) #11
Tom Sepez
> Does it need to be transported cross-process, or would it suffice to go through ...
6 years, 8 months ago (2014-04-25 20:10:16 UTC) #12
sky
On Fri, Apr 25, 2014 at 12:38 PM, <tsepez@chromium.org> wrote: > > I think it's ...
6 years, 8 months ago (2014-04-25 20:32:18 UTC) #13
Tom Sepez
> Hey Scott, does the mojo_js_unittests "framework" actually result in a > > situation > ...
6 years, 7 months ago (2014-04-28 17:29:55 UTC) #14
sky
This should all be possible from a unit test. I'll see if I can find ...
6 years, 7 months ago (2014-04-28 20:23:29 UTC) #15
Tom Sepez
Sky, please re-review. This requires https://codereview.chromium.org/268593002/
6 years, 7 months ago (2014-05-01 21:59:43 UTC) #16
sky
LGTM
6 years, 7 months ago (2014-05-01 22:22:45 UTC) #17
Tom Sepez
The CQ bit was checked by tsepez@chromium.org
6 years, 7 months ago (2014-05-02 17:36:40 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/250713003/140001
6 years, 7 months ago (2014-05-02 17:37:56 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 18:40:52 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium
6 years, 7 months ago (2014-05-02 18:40:53 UTC) #21
Tom Sepez
The CQ bit was checked by tsepez@chromium.org
6 years, 7 months ago (2014-05-02 18:42:02 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/250713003/140001
6 years, 7 months ago (2014-05-02 18:42:40 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 18:53:04 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium
6 years, 7 months ago (2014-05-02 18:53:05 UTC) #25
Tom Sepez
The CQ bit was checked by tsepez@chromium.org
6 years, 7 months ago (2014-05-02 18:56:16 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/250713003/140001
6 years, 7 months ago (2014-05-02 18:56:24 UTC) #27
commit-bot: I haz the power
6 years, 7 months ago (2014-05-02 21:30:40 UTC) #28
Message was sent while issue was closed.
Change committed as 267925

Powered by Google App Engine
This is Rietveld 408576698