• Andrew Moylan's avatar
    Reland "Add basic ServiceConnection unit test" · be88eebc
    Andrew Moylan authored
    This is a reland of 453eba23
    
    Removed the call to mojo::core::Init from the test startup. It
    caused a memory leak because //chromeos/run_all_unittests.cc
    already calls it.
    
    Original change's description:
    > Add basic ServiceConnection unit test
    >
    > The is just testing that ServiceConnection::BindModelProvider returns
    > successfully. The Mojo invitation won't go anywhere beyond the no-op
    > FakeMachineLearningClient D-Bus client.
    >
    > To make this test compile, I had to fix an #include from an
    > overlooked file rename in an earlier CL ...
    >
    > Bug: 863794
    >
    > Change-Id: Ifd31fea950145561cd5954ae16e930b801bfe49b
    > Reviewed-on: https://chromium-review.googlesource.com/1139942
    > Commit-Queue: Andrew Moylan <amoylan@chromium.org>
    > Reviewed-by: Ken Rockot <rockot@chromium.org>
    > Reviewed-by: Dan Erat <derat@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#578329}
    
    Tested by: manual detect_leaks=1 invocation of the test.
    
    TBR=rockot@chromium.org,derat@chromium.org
    
    Bug: 863794
    Change-Id: I1258de74273551cebdc9dd1a76f86a35ffa50147
    Reviewed-on: https://chromium-review.googlesource.com/1154647Reviewed-by: default avatarAndrew Moylan <amoylan@chromium.org>
    Commit-Queue: Andrew Moylan <amoylan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#579234}
    be88eebc
fake_machine_learning_client.cc 637 Bytes