• Sylvain Defresne's avatar
    Register factories for ExternalProviderImplChromeOSTest · d3adcc7e
    Sylvain Defresne authored
    When using IdentityTestEnvironmentProfileAdaptor, it is required
    to register the testing factories when creating the Profile, as
    the adaptor will expect the IdentityManager to have been created
    with certain fakes.
    
    If the factories are not set, then it is possible to encounter
    Undefined Behaviour (as IdentityTestEnvironment cast some of the
    objects to the expected fake subclasses) in the worst case or
    just non-fonctioning test (calling undefined methods) on certain
    platforms.
    
    Fix ExternalProviderImplChromeOSTest to use the proper factory
    by registering them in the super class.
    
    Bug: 982751
    Change-Id: Id116ee5b0df4b69ccf31a152c3c0318aaf94ef45
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809158
    Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
    Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
    Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#697571}
    d3adcc7e
extension_service_test_base.cc 13 KB