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

Issue 172473002: Move many of the Autofill unittests into components_unittests. (Closed)

Created:
6 years, 10 months ago by blundell
Modified:
6 years, 7 months ago
CC:
chromium-reviews, benquan, browser-components-watch_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, rouslan+autofillwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Move many of the Autofill unittests into components_unittests. The Autofill unittests that remain in unit_tests all have non-trivial //chrome dependencies that must be removed before they can be moved to components_unittests. This CL also extends the components unittests to load resources, as many of the Autofill tests assume that resources are loaded. Currently //chrome's resources are loaded; in the long term this should be changed so that components_unittests has its own pakfile. TBR=ben Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254745

Patch Set 1 #

Patch Set 2 : Load chrome.pak #

Patch Set 3 : Register path providers #

Patch Set 4 : Load pakfile from same path on all platforms #

Total comments: 2

Patch Set 5 : Hopefully fix Linux/Windows #

Patch Set 6 : Rebase #

Total comments: 4

Patch Set 7 : Fix resource loading on iOS #

Patch Set 8 : Address review comments, add bug reference #

Patch Set 9 : Rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -25 lines) Patch
chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -23 lines 0 comments Download
M components/autofill/core/browser/credit_card_unittest.cc View 1 3 chunks +11 lines, -1 line 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 8 chunks +53 lines, -0 lines 0 comments Download
M components/test/DEPS View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M components/test/run_all_unittests.cc View 1 2 3 4 5 6 7 2 chunks +29 lines, -1 line 4 comments Download

Messages

Total messages: 36 (0 generated)
blundell
Hi Thiago, Do you have any idea why the resources aren't being loaded on several ...
6 years, 10 months ago (2014-02-19 16:44:47 UTC) #1
blundell
+joi@ in case you have any insight
6 years, 10 months ago (2014-02-19 16:45:10 UTC) #2
Jói
I don't remember the specifics but I seem to recall that you might need to ...
6 years, 10 months ago (2014-02-19 17:27:20 UTC) #3
Ilya Sherman
Drive-by: Can we create an autofill_unittests suite, rather than bundling all the components together? One ...
6 years, 10 months ago (2014-02-19 20:02:33 UTC) #4
tfarina
Hi Colin, I'm looking now.
6 years, 10 months ago (2014-02-19 22:11:27 UTC) #5
tfarina
Colin, lets try this incantation: base::FilePath resources_pack_path; #if defined(OS_MACOSX) && !defined(OS_IOS) PathService::Get(base::DIR_MODULE, &resources_pack_path); resources_pack_path = ...
6 years, 10 months ago (2014-02-19 22:21:03 UTC) #6
Jói
> Drive-by: Can we create an autofill_unittests suite, rather than bundling > all the components ...
6 years, 10 months ago (2014-02-20 10:59:09 UTC) #7
blundell
Hi Thiago, Thanks for the pointer! I made some progress: things work on Mac but ...
6 years, 10 months ago (2014-02-20 15:39:57 UTC) #8
blundell
Ilya, I agree that there would be benefits to having the components each have their ...
6 years, 10 months ago (2014-02-20 15:42:54 UTC) #9
tfarina
Hi Colin, On 2014/02/20 15:39:57, blundell wrote: > Hi Thiago, > > Thanks for the ...
6 years, 10 months ago (2014-02-20 18:42:56 UTC) #10
Ilya Sherman
On 2014/02/20 10:59:09, Jói wrote: > > Drive-by: Can we create an autofill_unittests suite, rather ...
6 years, 10 months ago (2014-02-20 23:04:12 UTC) #11
Jói
I think the components_unittests executable builds pretty quickly, but that may change over time. Please ...
6 years, 10 months ago (2014-02-21 10:29:34 UTC) #12
tfarina
https://codereview.chromium.org/172473002/diff/420001/components/components_tests.gyp File components/components_tests.gyp (right): https://codereview.chromium.org/172473002/diff/420001/components/components_tests.gyp#newcode173 components/components_tests.gyp:173: '../webkit/webkit_resources.gyp:webkit_resources', we need to see if webkit needs to ...
6 years, 10 months ago (2014-02-21 19:20:34 UTC) #13
Ilya Sherman
https://codereview.chromium.org/172473002/diff/420001/components/components_tests.gyp File components/components_tests.gyp (right): https://codereview.chromium.org/172473002/diff/420001/components/components_tests.gyp#newcode173 components/components_tests.gyp:173: '../webkit/webkit_resources.gyp:webkit_resources', On 2014/02/21 19:20:34, tfarina wrote: > we need ...
6 years, 10 months ago (2014-02-22 00:30:14 UTC) #14
tfarina
On 2014/02/22 00:30:14, Ilya Sherman wrote: > https://codereview.chromium.org/172473002/diff/420001/components/components_tests.gyp > File components/components_tests.gyp (right): > > https://codereview.chromium.org/172473002/diff/420001/components/components_tests.gyp#newcode173 ...
6 years, 10 months ago (2014-02-22 01:40:46 UTC) #15
blundell
On 2014/02/22 01:40:46, tfarina wrote: > On 2014/02/22 00:30:14, Ilya Sherman wrote: > > > ...
6 years, 10 months ago (2014-02-25 15:33:07 UTC) #16
blundell
Hi Jói, The bots seem to be happy now :). If you're OK with the ...
6 years, 10 months ago (2014-02-26 12:16:56 UTC) #17
tfarina
https://codereview.chromium.org/172473002/diff/520001/components/test/run_all_unittests.cc File components/test/run_all_unittests.cc (right): https://codereview.chromium.org/172473002/diff/520001/components/test/run_all_unittests.cc#newcode65 components/test/run_all_unittests.cc:65: resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); you can inline this in AddDataPackFromPath call as: ...
6 years, 10 months ago (2014-02-26 12:51:43 UTC) #18
Jói
Yes, the approach LGTM, sounds good to file that bug. On Wed, Feb 26, 2014 ...
6 years, 10 months ago (2014-02-26 13:12:21 UTC) #19
blundell
Addressed review comments, added bug references, and made some fixes to enable the resources to ...
6 years, 9 months ago (2014-03-03 14:57:51 UTC) #20
Jói
LGTM
6 years, 9 months ago (2014-03-03 14:59:34 UTC) #21
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 9 months ago (2014-03-03 20:34:10 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/172473002/580001
6 years, 9 months ago (2014-03-03 20:35:39 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-03 20:35:43 UTC) #24
commit-bot: I haz the power
Failed to apply patch for components/components_tests.gyp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-03 20:35:44 UTC) #25
blundell
TBR=ben@ for the addition of //ui in //components/test/DEPS
6 years, 9 months ago (2014-03-03 20:55:20 UTC) #26
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 9 months ago (2014-03-03 20:55:28 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/172473002/620001
6 years, 9 months ago (2014-03-03 20:56:00 UTC) #28
Ben Goodger (Google)
lgtm
6 years, 9 months ago (2014-03-03 21:03:14 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-03 23:05:14 UTC) #30
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=273355
6 years, 9 months ago (2014-03-03 23:05:15 UTC) #31
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 9 months ago (2014-03-04 10:11:42 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/172473002/620001
6 years, 9 months ago (2014-03-04 10:24:03 UTC) #33
commit-bot: I haz the power
Change committed as 254745
6 years, 9 months ago (2014-03-04 11:22:50 UTC) #34
tfarina
After-the-fact review. I think this needs a follow-up. https://codereview.chromium.org/172473002/diff/620001/components/test/run_all_unittests.cc File components/test/run_all_unittests.cc (right): https://codereview.chromium.org/172473002/diff/620001/components/test/run_all_unittests.cc#newcode55 components/test/run_all_unittests.cc:55: PathService::Get(base::DIR_EXE, ...
6 years, 9 months ago (2014-03-05 18:28:21 UTC) #35
blundell
6 years, 7 months ago (2014-04-29 15:31:43 UTC) #36
Message was sent while issue was closed.
On 2014/03/05 18:28:21, tfarina wrote:
> After-the-fact review.
> 
> I think this needs a follow-up.
> 
>
https://codereview.chromium.org/172473002/diff/620001/components/test/run_all...
> File components/test/run_all_unittests.cc (right):
> 
>
https://codereview.chromium.org/172473002/diff/620001/components/test/run_all...
> components/test/run_all_unittests.cc:55: PathService::Get(base::DIR_EXE,
&path);
> tiny-nit: I'd name this exe_path.
> 
>
https://codereview.chromium.org/172473002/diff/620001/components/test/run_all...
> components/test/run_all_unittests.cc:60:
> base::mac::SetOverrideFrameworkBundlePath(path);
> nit:
> 
> base::mac::SetOverrideFrameworkBundlePath(
>   path.AppendASCII(chrome::kFrameworkName));
> 
>
https://codereview.chromium.org/172473002/diff/620001/components/test/run_all...
> components/test/run_all_unittests.cc:63: ui::RegisterPathProvider();
> this is to register ui::DIR_LOCALES, ui::DIR_TEST_DATA and
> ui::DIR_RESOURCE_PAKS_ANDROID.
> 
> Why you call this here?
> 
>
https://codereview.chromium.org/172473002/diff/620001/components/test/run_all...
> components/test/run_all_unittests.cc:77: base::TestSuite::Shutdown();
> you also need to add the following here:
> 
> #if defined(OS_MACOSX) && !defined(OS_IOS)
>   base::mac::SetOverrideFrameworkBundle(NULL);
> #endif

I'm addressing these comments as part of
https://codereview.chromium.org/258043003/. Thanks!

Powered by Google App Engine
This is Rietveld 408576698