#include "services/device/geolocation/public_ip_address_location_notifier.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/task_environment.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/device/device_service_test_base.h"
#include "services/device/public/cpp/geolocation/geoposition.h"
#include "services/device/public/mojom/geoposition.mojom.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
class PublicIpAddressLocationNotifierTest : public testing::Test { … };
TEST_F(PublicIpAddressLocationNotifierTest, SingleQueryReturns) { … }
TEST_F(PublicIpAddressLocationNotifierTest, OlderQueryReturnsCached) { … }
TEST_F(PublicIpAddressLocationNotifierTest,
SubsequentQueryWaitsForNetworkChange) { … }
TEST_F(PublicIpAddressLocationNotifierTest,
ConsecutiveNetworkChangesRequestsOnlyOnce) { … }
TEST_F(PublicIpAddressLocationNotifierTest, MutipleWaitingQueries) { … }
TEST_F(PublicIpAddressLocationNotifierTest, ServerError) { … }
}