#include "services/device/geolocation/network_location_provider.h"
#include <stddef.h>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/values.h"
#include "build/build_config.h"
#include "net/base/net_errors.h"
#include "services/device/geolocation/fake_position_cache.h"
#include "services/device/geolocation/mock_wifi_data_provider.h"
#include "services/device/geolocation/wifi_data_provider.h"
#include "services/device/public/cpp/device_features.h"
#include "services/device/public/cpp/geolocation/geoposition.h"
#include "services/device/public/mojom/geolocation_internals.mojom.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/test/test_url_loader_factory.h"
#include "services/network/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
RunClosure;
TestFuture;
NiceMock;
mojom::NetworkLocationDiagnosticsPtr GetNetworkLocationDiagnostics(
LocationProvider& provider) { … }
struct LocationUpdateListener { … };
class GeolocationNetworkProviderTest : public testing::Test { … };
TEST_F(GeolocationNetworkProviderTest, CreateDestroy) { … }
TEST_F(GeolocationNetworkProviderTest, EmptyApiKey) { … }
TEST_F(GeolocationNetworkProviderTest, NonEmptyApiKey) { … }
TEST_F(GeolocationNetworkProviderTest, StartProvider) { … }
TEST_F(GeolocationNetworkProviderTest, StartProviderNoMacAddress) { … }
TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) { … }
TEST_F(GeolocationNetworkProviderTest, NoRequestOnStartupUntilWifiData) { … }
TEST_F(GeolocationNetworkProviderTest, NewDataReplacesExistingNetworkRequest) { … }
TEST_F(GeolocationNetworkProviderTest, NetworkRequestDeferredForPermission) { … }
TEST_F(GeolocationNetworkProviderTest,
NetworkRequestWithWifiDataDeferredForPermission) { … }
TEST_F(GeolocationNetworkProviderTest, NetworkRequestServiceBadRequest) { … }
TEST_F(GeolocationNetworkProviderTest, NetworkRequestResponseMalformed) { … }
TEST_F(GeolocationNetworkProviderTest, LastPositionCache) { … }
TEST_F(GeolocationNetworkProviderTest, LastPositionCacheUsed) { … }
TEST_F(GeolocationNetworkProviderTest, LastPositionNotUsedTooOld) { … }
TEST_F(GeolocationNetworkProviderTest, LastPositionNotUsedNewData) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsEmpty) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsNoAccessPoints) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsAccessPointData) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsAccessPointDataMissingKeys) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsNetworkRequestResponse) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsEmptyNetworkRequest) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsNoAccuracyInNetworkResponse) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsNoLocationInNetworkResponse) { … }
TEST_F(GeolocationNetworkProviderTest, DiagnosticsObserverDisabled) { … }
}