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

Issue 2006273005: [ios Mojo] Integration test for Mojo WebUI. (Closed)

Created:
4 years, 7 months ago by Eugene But (OOO till 7-30)
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[ios Mojo] Integration test for Mojo WebUI. Tests communication between WebUI page and the native code. When page is loaded it sends "syn" message to the native code, when native code receives "syn" it replies back with "ack", when page receives "ack" it replies back with "fin". Once "fin" is received the test succeeds. BUG=567809 Committed: https://crrev.com/dc9e9709213948d4db6308f71c4097950b9da8fa Cr-Commit-Position: refs/heads/master@{#396972}

Patch Set 1 #

Patch Set 2 : Updated build files #

Total comments: 15

Patch Set 3 : Updated GN files #

Total comments: 6

Patch Set 4 : Addressed review comments #

Total comments: 4

Patch Set 5 : Addressed review comments #

Total comments: 4

Patch Set 6 : Addressed review comments #

Patch Set 7 : Removed "data" from ios_web_inttest GN target. #

Total comments: 17

Patch Set 8 : Addressed review comments (GN and GYP) #

Total comments: 9

Patch Set 9 : Fixed GN #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -4 lines) Patch
M ios/web/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -4 lines 0 comments Download
M ios/web/ios_web_inttests.gyp View 1 2 3 4 5 6 7 1 chunk +82 lines, -0 lines 0 comments Download
M ios/web/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +35 lines, -0 lines 0 comments Download
A ios/web/test/data/mojo_test.html View 1 chunk +7 lines, -0 lines 0 comments Download
A ios/web/test/data/mojo_test.js View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A ios/web/test/test_resources.grd View 1 chunk +16 lines, -0 lines 0 comments Download
M ios/web/test/web_test_suite.mm View 2 chunks +9 lines, -0 lines 1 comment Download
A ios/web/webui/web_ui_mojo_inttest.mm View 1 2 3 4 5 1 chunk +164 lines, -0 lines 0 comments Download
M tools/gritsettings/resource_ids View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 64 (25 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/1
4 years, 7 months ago (2016-05-26 02:35:46 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/11864)
4 years, 7 months ago (2016-05-26 02:46:26 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/20001
4 years, 7 months ago (2016-05-26 15:19:29 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/12064) ios-simulator-gn on ...
4 years, 7 months ago (2016-05-26 15:30:23 UTC) #8
sdefresne
https://codereview.chromium.org/2006273005/diff/20001/ios/web/BUILD.gn File ios/web/BUILD.gn (right): https://codereview.chromium.org/2006273005/diff/20001/ios/web/BUILD.gn#newcode492 ios/web/BUILD.gn:492: data = [ "data" is not used in iOS, ...
4 years, 7 months ago (2016-05-26 17:45:19 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/40001
4 years, 7 months ago (2016-05-26 20:45:30 UTC) #12
Eugene But (OOO till 7-30)
Jackie, Ken, could you please review the test. I will work with Sylvain to fix ...
4 years, 7 months ago (2016-05-26 20:53:32 UTC) #15
Eugene But (OOO till 7-30)
Sylvain, GN build still fails: https://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/12292/steps/compile/logs/stdio Could you please take a look. Thanks!
4 years, 7 months ago (2016-05-26 20:54:35 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/12305)
4 years, 7 months ago (2016-05-26 20:59:54 UTC) #18
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2006273005/diff/40001/ios/web/webui/web_ui_mojo_inttest.mm File ios/web/webui/web_ui_mojo_inttest.mm (right): https://codereview.chromium.org/2006273005/diff/40001/ios/web/webui/web_ui_mojo_inttest.mm#newcode49 ios/web/webui/web_ui_mojo_inttest.mm:49: // Received "syn" message from WebUI page, send "ack" ...
4 years, 7 months ago (2016-05-26 21:11:51 UTC) #19
Eugene But (OOO till 7-30)
Thanks! https://codereview.chromium.org/2006273005/diff/40001/ios/web/webui/web_ui_mojo_inttest.mm File ios/web/webui/web_ui_mojo_inttest.mm (right): https://codereview.chromium.org/2006273005/diff/40001/ios/web/webui/web_ui_mojo_inttest.mm#newcode49 ios/web/webui/web_ui_mojo_inttest.mm:49: // Received "syn" message from WebUI page, send ...
4 years, 7 months ago (2016-05-26 21:52:05 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/60001
4 years, 7 months ago (2016-05-26 21:52:44 UTC) #22
Ken Rockot(use gerrit already)
lgtm with nits https://codereview.chromium.org/2006273005/diff/60001/ios/web/webui/web_ui_mojo_inttest.mm File ios/web/webui/web_ui_mojo_inttest.mm (right): https://codereview.chromium.org/2006273005/diff/60001/ios/web/webui/web_ui_mojo_inttest.mm#newcode74 ios/web/webui/web_ui_mojo_inttest.mm:74: // Bindings required by shell::InterfaceFactory. nit: ...
4 years, 7 months ago (2016-05-26 22:00:41 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/12363)
4 years, 7 months ago (2016-05-26 22:06:21 UTC) #25
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2006273005/diff/60001/ios/web/webui/web_ui_mojo_inttest.mm File ios/web/webui/web_ui_mojo_inttest.mm (right): https://codereview.chromium.org/2006273005/diff/60001/ios/web/webui/web_ui_mojo_inttest.mm#newcode74 ios/web/webui/web_ui_mojo_inttest.mm:74: // Bindings required by shell::InterfaceFactory. On 2016/05/26 22:00:40, Ken ...
4 years, 7 months ago (2016-05-26 22:38:52 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/80001
4 years, 7 months ago (2016-05-26 22:39:50 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/12401)
4 years, 7 months ago (2016-05-26 22:53:47 UTC) #30
Jackie Quinn
https://codereview.chromium.org/2006273005/diff/80001/ios/web/webui/web_ui_mojo_inttest.mm File ios/web/webui/web_ui_mojo_inttest.mm (right): https://codereview.chromium.org/2006273005/diff/80001/ios/web/webui/web_ui_mojo_inttest.mm#newcode36 ios/web/webui/web_ui_mojo_inttest.mm:36: // that communication was successfull. See test WebUI page ...
4 years, 7 months ago (2016-05-27 01:03:41 UTC) #31
Jackie Quinn
Meant to say lgtm with comment nits
4 years, 7 months ago (2016-05-27 01:04:27 UTC) #32
Eugene But (OOO till 7-30)
Thanks! +thestig@ for resources https://codereview.chromium.org/2006273005/diff/80001/ios/web/webui/web_ui_mojo_inttest.mm File ios/web/webui/web_ui_mojo_inttest.mm (right): https://codereview.chromium.org/2006273005/diff/80001/ios/web/webui/web_ui_mojo_inttest.mm#newcode36 ios/web/webui/web_ui_mojo_inttest.mm:36: // that communication was successfull. ...
4 years, 6 months ago (2016-05-27 15:29:01 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/120001
4 years, 6 months ago (2016-05-27 15:56:05 UTC) #36
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/12796)
4 years, 6 months ago (2016-05-27 16:06:41 UTC) #38
Lei Zhang
lgtm, but you have red bots
4 years, 6 months ago (2016-05-27 18:16:15 UTC) #39
Eugene But (OOO till 7-30)
Thanks. Yeah, I know about GN problem, hopefully Sylvain will help me to fix them ...
4 years, 6 months ago (2016-05-27 18:47:54 UTC) #40
sdefresne
https://codereview.chromium.org/2006273005/diff/20001/ios/web/test/BUILD.gn File ios/web/test/BUILD.gn (right): https://codereview.chromium.org/2006273005/diff/20001/ios/web/test/BUILD.gn#newcode15 ios/web/test/BUILD.gn:15: repack("repacked_resources") { On 2016/05/26 20:53:32, Eugene But wrote: > ...
4 years, 6 months ago (2016-05-28 13:04:02 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/140001
4 years, 6 months ago (2016-05-31 16:21:11 UTC) #43
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-simulator-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-gn/builds/13733)
4 years, 6 months ago (2016-05-31 17:23:15 UTC) #45
Eugene But (OOO till 7-30)
Sylvain, resource file is still not copied :( https://codereview.chromium.org/2006273005/diff/120001/ios/web/BUILD.gn File ios/web/BUILD.gn (right): https://codereview.chromium.org/2006273005/diff/120001/ios/web/BUILD.gn#newcode475 ios/web/BUILD.gn:475: "test:mojo_bindings", ...
4 years, 6 months ago (2016-05-31 17:26:57 UTC) #46
sdefresne
https://codereview.chromium.org/2006273005/diff/120001/ios/web/BUILD.gn File ios/web/BUILD.gn (right): https://codereview.chromium.org/2006273005/diff/120001/ios/web/BUILD.gn#newcode538 ios/web/BUILD.gn:538: source = "ios_web_resources.grd" On 2016/05/31 17:26:56, Eugene But wrote: ...
4 years, 6 months ago (2016-05-31 18:52:26 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/160001
4 years, 6 months ago (2016-05-31 21:27:30 UTC) #49
sdefresne
Looks like compilation with gn succeeded. Lgtm
4 years, 6 months ago (2016-05-31 22:27:05 UTC) #50
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-31 23:19:17 UTC) #52
Eugene But (OOO till 7-30)
Thanks! https://codereview.chromium.org/2006273005/diff/140001/ios/web/BUILD.gn File ios/web/BUILD.gn (right): https://codereview.chromium.org/2006273005/diff/140001/ios/web/BUILD.gn#newcode478 ios/web/BUILD.gn:478: "//ios/web/test:packed_resources", On 2016/05/31 18:52:25, sdefresne wrote: > On ...
4 years, 6 months ago (2016-05-31 23:20:35 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006273005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006273005/160001
4 years, 6 months ago (2016-05-31 23:21:15 UTC) #56
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 6 months ago (2016-05-31 23:27:20 UTC) #58
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/dc9e9709213948d4db6308f71c4097950b9da8fa Cr-Commit-Position: refs/heads/master@{#396972}
4 years, 6 months ago (2016-05-31 23:29:00 UTC) #60
stkhapugin
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2027983002/ by stkhapugin@chromium.org. ...
4 years, 6 months ago (2016-06-01 09:47:18 UTC) #61
stkhapugin
https://codereview.chromium.org/2006273005/diff/160001/ios/web/test/web_test_suite.mm File ios/web/test/web_test_suite.mm (right): https://codereview.chromium.org/2006273005/diff/160001/ios/web/test/web_test_suite.mm#newcode49 ios/web/test/web_test_suite.mm:49: // Load test resources if they are present in ...
4 years, 6 months ago (2016-06-01 09:47:40 UTC) #63
sdefresne
4 years, 6 months ago (2016-06-01 13:32:12 UTC) #64
Message was sent while issue was closed.
On 2016/06/01 09:47:40, stkhapugin wrote:
>
https://codereview.chromium.org/2006273005/diff/160001/ios/web/test/web_test_...
> File ios/web/test/web_test_suite.mm (right):
> 
>
https://codereview.chromium.org/2006273005/diff/160001/ios/web/test/web_test_...
> ios/web/test/web_test_suite.mm:49: // Load test resources if they are present
in
> the bundle.
> This code should be: 
> 
>   // Force unittests to run using en-US so if we test against string
>   // output, it'll pass regardless of the system language.
>   ui::ResourceBundle::InitSharedInstanceWithLocale(
>       "en-US", nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
>   base::FilePath resources_pack_path;
>   PathService::Get(ios::FILE_RESOURCES_PACK, &resources_pack_path);
>   ResourceBundle::GetSharedInstance().AddDataPackFromPath(
>       resources_pack_path, ui::SCALE_FACTOR_NONE);
> 
> because this code doesn't force locale to en-US and it should not use literal
> but should use PathService to get the name of the resource pack to load.

There is another problem with the patch as is, as the following messages are
printed to stderr when building with gyp+ninja:

ninja: Entering directory
`/b/build/slave/ios-simulator/build/src/out/Debug-iphonesimulator'
ninja: warning: multiple rules generate gen/ios/web/test/mojo_test.mojom.cc.
builds involving this target will not be correct; continuing anyway [-w
dupbuild=warn]
ninja: warning: multiple rules generate gen/ios/web/test/mojo_test.mojom.h.
builds involving this target will not be correct; continuing anyway [-w
dupbuild=warn]
ninja: warning: multiple rules generate
gen/ios/web/test/mojo_test.mojom-internal.h. builds involving this target will
not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate gen/ios/web/test/mojo_test.mojom.js.
builds involving this target will not be correct; continuing anyway [-w
dupbuild=warn]

https://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bu...

This should be fixed in any reland as it means that the build is currently
flaky.

Powered by Google App Engine
This is Rietveld 408576698