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

Issue 152543005: Introduce a mock ui_unittests Framework for loading resources. (Closed)

Created:
6 years, 10 months ago by tapted
Modified:
6 years, 9 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Introduce a mock ui_unittests Framework for loading resources. This allows ui_unittests to stop depending on the chrome framework. On Mac, this creates (e.g.) - out/ui_unittests Framework.framework/ +-- Resources -> Versions/A/Resources \-- Versions \-- A \-- Resources +-- Info.plist +-- am.lproj | \-- locale.pak +-- ... +-- chrome_100_percent.pak -> ui_test.pak +-- ... +-- en.lproj | \-- locale.pak +-- ... On other platforms, out/ui_test.pak is loaded directly and out/ui_unittests_strings/ is set as the locale folder (for tests that load en-US.pak from there). ui_unittests currently depends on out/locales/ which is only created when Chrome is built. Note that ui_unittests does not currently succeed in a clobber build (crbug.com/347851), so that missing dependency is fixed by this change as well. BUG=331669, 35878, 347851 TEST=ui_unittests should build and run after clobbering the build folder Previously Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255512 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256419

Patch Set 1 #

Patch Set 2 : More tests passing #

Total comments: 4

Patch Set 3 : rebase+ #

Patch Set 4 : Do more tests fail without a framework bundle? #

Patch Set 5 : Symlink to chrome_100_percent inside the framework for Mac. Not sure what to do about non-Mac. What… #

Patch Set 6 : Fix clobber on other platforms #

Patch Set 7 : rebase for time_format_unittest.cc changes #

Patch Set 8 : Fix iOS with an explainer #

Total comments: 1

Patch Set 9 : fix android #

Total comments: 8

Patch Set 10 : respond to comments #

Total comments: 6

Patch Set 11 : rebase - maybe noop #

Patch Set 12 : Fix mac official builder, and missing dependency (thanks GTK). #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -34 lines) Patch
M ui/base/l10n/time_format_unittest.cc View 1 2 3 4 5 6 2 chunks +0 lines, -15 lines 0 comments Download
M ui/base/strings/ui_strings.gyp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
A + ui/base/test/framework-Info.plist View 0 chunks +-1 lines, --1 lines 0 comments Download
M ui/base/test/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -18 lines 0 comments Download
M ui/ui_unittests.gyp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +19 lines, -1 line 3 comments Download
A ui/ui_unittests_bundle.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +55 lines, -0 lines 1 comment Download

Messages

Total messages: 26 (0 generated)
tfarina
https://codereview.chromium.org/152543005/diff/60001/ui/base/test/run_all_unittests.cc File ui/base/test/run_all_unittests.cc (right): https://codereview.chromium.org/152543005/diff/60001/ui/base/test/run_all_unittests.cc#newcode59 ui/base/test/run_all_unittests.cc:59: path = path.AppendASCII("ui_unittests Framework.framework"); Can we get this chunk ...
6 years, 10 months ago (2014-02-07 01:06:26 UTC) #1
tfarina
https://codereview.chromium.org/152543005/diff/60001/ui/base/test/run_all_unittests.cc File ui/base/test/run_all_unittests.cc (right): https://codereview.chromium.org/152543005/diff/60001/ui/base/test/run_all_unittests.cc#newcode59 ui/base/test/run_all_unittests.cc:59: path = path.AppendASCII("ui_unittests Framework.framework"); For reference, content_shell has a ...
6 years, 10 months ago (2014-02-07 03:57:24 UTC) #2
tapted
https://codereview.chromium.org/152543005/diff/60001/ui/base/test/run_all_unittests.cc File ui/base/test/run_all_unittests.cc (right): https://codereview.chromium.org/152543005/diff/60001/ui/base/test/run_all_unittests.cc#newcode59 ui/base/test/run_all_unittests.cc:59: path = path.AppendASCII("ui_unittests Framework.framework"); On 2014/02/07 03:57:24, tfarina wrote: ...
6 years, 9 months ago (2014-02-28 08:10:55 UTC) #3
tapted
Hi Ben, PTAL. This gets rid of one of the nastier gyp file-dependency loops in ...
6 years, 9 months ago (2014-02-28 08:12:06 UTC) #4
tfarina
Trent is the locales fix necessary for the Mac changes? I'd like to get it ...
6 years, 9 months ago (2014-02-28 14:11:16 UTC) #5
tapted
On 2014/02/28 14:11:16, tfarina wrote: > Trent is the locales fix necessary for the Mac ...
6 years, 9 months ago (2014-02-28 21:45:37 UTC) #6
tfarina
I'm not comfortable in approving this change alone. +Tony for a more high/expert level review. ...
6 years, 9 months ago (2014-02-28 22:44:58 UTC) #7
tony
Seems reasonable to me. ui/base/l10n LGTM https://codereview.chromium.org/152543005/diff/360001/ui/ui_unittests.gyp File ui/ui_unittests.gyp (right): https://codereview.chromium.org/152543005/diff/360001/ui/ui_unittests.gyp#newcode60 ui/ui_unittests.gyp:60: 'target_name': 'ui_test_dll', Why ...
6 years, 9 months ago (2014-03-01 00:42:27 UTC) #8
tapted
+thakis - could you please have a look at the Mac changes here (ui/base/test/* and ...
6 years, 9 months ago (2014-03-03 12:40:40 UTC) #9
tony
gyp(i) files look much better. Thanks!
6 years, 9 months ago (2014-03-03 17:49:36 UTC) #10
Nico
lgtm https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests_bundle.gypi File ui/ui_unittests_bundle.gypi (right): https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests_bundle.gypi#newcode25 ui/ui_unittests_bundle.gypi:25: '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) ...
6 years, 9 months ago (2014-03-04 21:14:27 UTC) #11
tapted
On 2014/03/04 21:14:27, Nico wrote: > lgtm > > https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests_bundle.gypi > File ui/ui_unittests_bundle.gypi (right): > ...
6 years, 9 months ago (2014-03-05 00:18:19 UTC) #12
tapted
ben: friendly ping. Since this came up in crrev.com/131843004 - does it lgty?
6 years, 9 months ago (2014-03-05 00:23:47 UTC) #13
tfarina
https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests.gyp File ui/ui_unittests.gyp (right): https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests.gyp#newcode351 ui/ui_unittests.gyp:351: 'includes': [ 'ui_unittests_bundle.gypi' ], Trent, instead of going with ...
6 years, 9 months ago (2014-03-05 18:39:31 UTC) #14
tapted
https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests.gyp File ui/ui_unittests.gyp (right): https://codereview.chromium.org/152543005/diff/400001/ui/ui_unittests.gyp#newcode351 ui/ui_unittests.gyp:351: 'includes': [ 'ui_unittests_bundle.gypi' ], On 2014/03/05 18:39:31, tfarina wrote: ...
6 years, 9 months ago (2014-03-05 23:03:26 UTC) #15
Ben Goodger (Google)
lgtm if macxperts are happy.
6 years, 9 months ago (2014-03-06 03:17:13 UTC) #16
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 9 months ago (2014-03-06 22:23:06 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/152543005/400001
6 years, 9 months ago (2014-03-06 22:31:35 UTC) #18
commit-bot: I haz the power
Change committed as 255512
6 years, 9 months ago (2014-03-07 03:41:45 UTC) #19
tapted
This got through the CQ but I had to revert it soon after it landed ...
6 years, 9 months ago (2014-03-11 11:11:02 UTC) #20
Ben Goodger (Google)
slgtm
6 years, 9 months ago (2014-03-11 18:08:40 UTC) #21
tfarina
https://codereview.chromium.org/152543005/diff/460001/ui/ui_unittests.gyp File ui/ui_unittests.gyp (right): https://codereview.chromium.org/152543005/diff/460001/ui/ui_unittests.gyp#newcode350 ui/ui_unittests.gyp:350: 'resources/ui_resources.gyp:ui_test_pak', if you include this at line 76 regardless ...
6 years, 9 months ago (2014-03-11 18:22:02 UTC) #22
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 9 months ago (2014-03-11 22:33:26 UTC) #23
tapted
https://codereview.chromium.org/152543005/diff/460001/ui/ui_unittests.gyp File ui/ui_unittests.gyp (right): https://codereview.chromium.org/152543005/diff/460001/ui/ui_unittests.gyp#newcode350 ui/ui_unittests.gyp:350: 'resources/ui_resources.gyp:ui_test_pak', On 2014/03/11 18:22:03, tfarina wrote: > if you ...
6 years, 9 months ago (2014-03-11 22:35:36 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/152543005/460001
6 years, 9 months ago (2014-03-11 22:47:25 UTC) #25
commit-bot: I haz the power
6 years, 9 months ago (2014-03-12 04:33:58 UTC) #26
Message was sent while issue was closed.
Change committed as 256419

Powered by Google App Engine
This is Rietveld 408576698