need to run ImeTest with and without ImeThread feature |
|||
Issue description
Currently, tests are run with the default value of enabled / disabled as defined in content_features.cc and other places where features are defined.
We should be able to test both with and without features, when a feature is getting ready to be launched. We want to enable it but when launch fails for the milestone, we should be able to disable it safely.
For ImeThread feature, we'd like to run ImeTest.java with and without the feature, with some exceptions marked as @CommandLineFlags.Add("enable-features=ImeThread").
When we need to run some test with and without the feature, I hope we can annotate the test with something like the following:
@FeatureTest.EnableOnce(ContentFeatures.ImeThread)
@FeatureTest.DisableOnce(ContentFeatures.ImeThread)
And when we have a specific test that should only run with the feature, then we can annotate the test with
@FeatureTest.EnableOnce(ContentFeatures.ImeThread)
Is this feasible?
CommandLineFlags and BaseChromiumInstrumentationTestRunner has some mechanism to apply command line flags before we start a test.
And ContentShellTestBase has a mechanism to rerun a test: RerunWithUpdatedContainerView.
However, is it possible to have the combination of applying something early on and re-running a test? InstrumentationTestRunner does not seem to support rerun from Java side. Or Is it possible to replicate the test with a different option somehow?
If this annotation is not feasible, how can we test both with and without a feature?
,
Sep 20 2016
Thanks for the quick answer, John! This will perfectly serve our needs! I've changed the title to make it specific to the ImeThread feature.
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d6a84dbb67c7d6a8eb47d76a34d0e2627670f026 commit d6a84dbb67c7d6a8eb47d76a34d0e2627670f026 Author: changwan <changwan@chromium.org> Date: Wed Sep 21 05:41:24 2016 Run IME tests with and without ImeThread feature We are about to launch ImeThread (targeting M54), and in case we fail to launch, we should be able to disable the feature safely. BUG= 648482 Review-Url: https://codereview.chromium.org/2349973008 Cr-Commit-Position: refs/heads/master@{#419980} [modify] https://crrev.com/d6a84dbb67c7d6a8eb47d76a34d0e2627670f026/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java [modify] https://crrev.com/d6a84dbb67c7d6a8eb47d76a34d0e2627670f026/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
,
Sep 21 2016
,
Oct 26 2016
Sometimes IME thread was not enabled when running ImeTest. I.E, each ImeTest ran twice, both with Ime Thread disabled. In that case, the default content-shell-command-line is: '_ --strict-mode=testing --disable-features=ImeThread --enable-features=ImeThread --enable-test-intents' BTW, if it's '' or 'chrome --enable-features=ImeThread', it will work well. Is it supposed to be that? |
|||
►
Sign in to add a comment |
|||
Comment 1 by jbudorick@chromium.org
, Sep 20 2016