commit | 4fb34c25f489dea2e61cb552f984e0fa4a9ccf2f | [log] [tgz] |
---|---|---|
author | Roland Bock <rbock@google.com> | Wed Jun 09 12:03:34 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jun 09 12:03:34 2021 |
tree | 9883223878498c04c2ec52e52921b5557e16e494 | |
parent | ee0b79bfc0b440a27492743754511e6d48b3fac1 [diff] |
Refactor DeviceManagementService unit tests for more coverage The unit tests for DeviceManagementService use TestURLLoaderFactory to intercept and analyse the requests made by the DeviceManagementService. But they use service_->OnURLLoaderCompleteInternal( service_->GetSimpleURLLoaderForTesting(), ...); to simulate the answers from the DMServer. This is relying on implementation details and it is bypassing DeviceManagementService::OnURLLoaderComplete This CL uses the TestURLLoaderFactory to simulate DMServer replies instead. It fixes a few incorrect expectations in the tests, too, and it will make future strucural changes in the DeviceManagementService easier. Bug: 1217037 Change-Id: Idb0755427025c7ced64197493590219f6840d0a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2940806 Commit-Queue: Roland Bock <rbock@google.com> Reviewed-by: Maksim Ivanov <emaxx@chromium.org> Cr-Commit-Position: refs/heads/master@{#890711}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.