Incorrect use of CommandLineParameter |
||
Issue description
I was adding the @CommandLineParameter to an instrumentation test as you have in UrlBarTest and OmniboxTest and found that it did not work.
The reason was that the test runner doesn't prepend '--' on command line flags in @CommandLineParameter (as it does on @CommandLineFlags.Add), so
@CommandLineParameter({"", "enable-features=" + ChromeFeatureList.SPANNABLE_INLINE_AUTOCOMPLETE})
won't actually work, but
@CommandLineParameter({"", "--enable-features=" + ChromeFeatureList.SPANNABLE_INLINE_AUTOCOMPLETE})
will.
Could you give OmniboxTest and UrlBarTest a look at to make sure they're running in both configurations?
John, would it be better to bring @CommandLineParameter in line with @CommandLineFlags.Add and not require the '--'? Or should we just wait until we can start using junit4 parameterized tests (is there anything stopping this?)?
,
Jul 18 2017
Sorry, I just created a fix CL(https://chromium-review.googlesource.com/c/576388/). @CommandLineParameter is temporary and should eventually be replace by junit4 parameterization, but we need to add support for TestRule parameterization in JUnit4 parameterization Cl (I will try to get to it as soon as possible)
,
Jul 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/22bd78d6a79d9ec99adf640ac5790573fa5bef17 commit 22bd78d6a79d9ec99adf640ac5790573fa5bef17 Author: yolandyan <yolandyan@chromium.org> Date: Tue Jul 18 22:37:44 2017 Fix CommandLine parameterization prefix dash problem @CommandLineParameter({"", "enable-features=xyz"} is supposed to return flags of ["--enable-features=xyz"], and it currently does not return the two dash prefix in our test harness Bug: 745839 Change-Id: I2d483c0c24b5627a2616e3c05d78192581348b06 Reviewed-on: https://chromium-review.googlesource.com/576388 Reviewed-by: Michael Case <mikecase@chromium.org> Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Yoland Yan <yolandyan@chromium.org> Cr-Commit-Position: refs/heads/master@{#487631} [modify] https://crrev.com/22bd78d6a79d9ec99adf640ac5790573fa5bef17/build/android/pylib/instrumentation/instrumentation_test_instance.py [modify] https://crrev.com/22bd78d6a79d9ec99adf640ac5790573fa5bef17/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
,
Jul 18 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by peconn@chromium.org
, Jul 18 2017