• Guillaume Jenkins's avatar
    [iOS Policy] Improve policy mocking infra for unit tests · b446d0d8
    Guillaume Jenkins authored
    In preparation for CBCM reporting unit tests, this extends the mock
    infrastructure for policy objects that will be involved. In particular:
    
    - A new mock BrowserStatePolicyConnector was added
    - The TestChromeBrowserState builder now supports building the browser
      state with a mock BrowserStatePolicyConnector
    - The TestChromeBrowserStateManager can return a TestChromeBrowserState
      by path
    - The TestingApplicationContext now creates a real
      BrowserPolicyConnector if its accessor is called
    
    These are all needed for the ProfileReportGeneratorIOS unit tests, which
    will come in a separate CL.
    
    Bug: 1055318
    Change-Id: I3428e56d695c014d63245be6493d527787343cce
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495265Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
    Commit-Queue: Guillaume Jenkins <gujen@google.com>
    Cr-Commit-Position: refs/heads/master@{#820786}
    b446d0d8
testing_application_context.mm 7.35 KB