geolocation: Add the controller to shell and update tests to use factory
- Expose GeolocationController in ash::Shell
- Replace FakeGeolocationController in GeolocationControllerTest and
ScheduledFeatureTest with TestGeolocationUrlLoaderFactory, which allows
the tests to control the position responded from the server.
Bug: 1297761, 1302400
Test: `ash_unittests --gtest_filter=GeolocationControllerTest.* --vmodule=ash/system/geolocation/geolocation_controller.cc=1`
and `--gtest_filter=ScheduledFeatureTest.*`
Change-Id: I2629313276e93ac751e2084cdeab60280ec40fee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3465400
Reviewed-by: Ahmed Fakhry <[email protected]>
Commit-Queue: Cattalyya Nuengsigkapian <[email protected]>
Cr-Commit-Position: refs/heads/main@{#985578}
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index d1e9423..5f4da634 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -69,7 +69,7 @@
// Returns the geolocation loader factory used to initialize geolocation
// provider.
virtual scoped_refptr<network::SharedURLLoaderFactory>
- GetGeolocationSharedURLLoaderFactory() const = 0;
+ GetGeolocationUrlLoaderFactory() const = 0;
// Check whether the current tab of the browser window can go back.
virtual bool CanGoBack(gfx::NativeWindow window) const = 0;