• Bernhard Bauer's avatar
    Add @UseMethodParamBefore and @UseMethodParamAfter annotations · 629200a5
    Bernhard Bauer authored
    The annotations can be used in conjunction with a newly added test rule
    to do setup and teardown for tests that use method parameters. The
    methods will be called iff a test method with the given parameter is
    executed, with the corresponding parameters.
    
    As an example, use @UseMethodParamBefore in HomeSheetUiCaptureTest to
    set the state of the SigninPromo feature before the activity is started.
    
    Also, for moar reusability, extract a MethodParamRule that can be used
    to build arbitrary rules that are applied to test statements that use
    method parameters and that have access to the parameter value.
    
    Bug: 783820
    Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
    Change-Id: If422eef9009c1e8721039d52f4979e5efda98089
    Reviewed-on: https://chromium-review.googlesource.com/757356
    Commit-Queue: Bernhard Bauer <bauerb@chromium.org>
    Reviewed-by: 's avataragrieve <agrieve@chromium.org>
    Reviewed-by: 's avatarNicolas Dossou-Gbété <dgn@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#515849}
    629200a5