gpu: Make the mus-gpu client-lib test-friendly

Desktop / Chromium - sadrul [chromium.org] - 5 July 2017 20:10 UTC

Use a factory for the mojom::GpuPtr in ui::Gpu, so that tests can inject fake implementations. Add a simple test that verifies that callbacks to establishing a gpu channel are run correctly.

BUG=none

Review-Url: https://codereview.chromium.org/2965103002 Cr-Commit-Position: refs/heads/master@{#484379}

7626778 gpu: Make the mus-gpu client-lib test-friendly.
services/ui/public/cpp/gpu/gpu.cc | 32 ++++---
services/ui/public/cpp/gpu/gpu.h | 9 +-
services/ui/public/cpp/tests/BUILD.gn | 1 +
services/ui/public/cpp/tests/gpu_unittest.cc | 124 +++++++++++++++++++++++++++
4 files changed, 148 insertions(+), 18 deletions(-)

Upstream: git.chromium.org


  • Share