Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2049)

Unified Diff: device/geolocation/geolocation_provider_impl_unittest.cc

Issue 2200483002: Geolocation cleanup: run clang-format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/geolocation/geolocation_provider_impl.cc ('k') | device/geolocation/geolocation_service_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/geolocation_provider_impl_unittest.cc
diff --git a/device/geolocation/geolocation_provider_impl_unittest.cc b/device/geolocation/geolocation_provider_impl_unittest.cc
index ded7d2b0c9d3fb775c805198d9d1a5e449c759e8..5eb1af9d34ede9a699fdc386c768015e4d035216 100644
--- a/device/geolocation/geolocation_provider_impl_unittest.cc
+++ b/device/geolocation/geolocation_provider_impl_unittest.cc
@@ -34,9 +34,7 @@ class LocationProviderForTestArbitrator : public GeolocationProviderImpl {
~LocationProviderForTestArbitrator() override {}
// Only valid for use on the geolocation thread.
- MockLocationArbitrator* mock_arbitrator() const {
- return mock_arbitrator_;
- }
+ MockLocationArbitrator* mock_arbitrator() const { return mock_arbitrator_; }
protected:
// GeolocationProviderImpl implementation:
@@ -78,8 +76,7 @@ class MockGeolocationCallbackWrapper {
MOCK_METHOD1(Callback, void(const Geoposition& position));
};
-class GeopositionEqMatcher
- : public MatcherInterface<const Geoposition&> {
+class GeopositionEqMatcher : public MatcherInterface<const Geoposition&> {
public:
explicit GeopositionEqMatcher(const Geoposition& expected)
: expected_(expected) {}
@@ -119,9 +116,7 @@ Matcher<const Geoposition&> GeopositionEq(const Geoposition& expected) {
class GeolocationProviderTest : public testing::Test {
protected:
GeolocationProviderTest()
- : message_loop_(),
- provider_(new LocationProviderForTestArbitrator) {
- }
+ : message_loop_(), provider_(new LocationProviderForTestArbitrator) {}
~GeolocationProviderTest() override {}
@@ -139,7 +134,6 @@ class GeolocationProviderTest : public testing::Test {
std::unique_ptr<LocationProviderForTestArbitrator> provider_;
};
-
bool GeolocationProviderTest::ProvidersStarted() {
DCHECK(provider_->IsRunning());
DCHECK(base::MessageLoop::current() == &message_loop_);
@@ -172,8 +166,7 @@ TEST_F(GeolocationProviderTest, OnPermissionGrantedWithoutObservers) {
EXPECT_TRUE(provider()->user_did_opt_into_location_services_for_testing());
}
-void DummyFunction(const Geoposition& position) {
-}
+void DummyFunction(const Geoposition& position) {}
TEST_F(GeolocationProviderTest, StartStop) {
EXPECT_FALSE(provider()->IsRunning());
@@ -198,9 +191,9 @@ TEST_F(GeolocationProviderTest, StalePositionNotSent) {
first_position.timestamp = base::Time::Now();
AsyncMockGeolocationObserver first_observer;
- GeolocationProviderImpl::LocationUpdateCallback first_callback = base::Bind(
- &MockGeolocationObserver::OnLocationUpdate,
- base::Unretained(&first_observer));
+ GeolocationProviderImpl::LocationUpdateCallback first_callback =
+ base::Bind(&MockGeolocationObserver::OnLocationUpdate,
+ base::Unretained(&first_observer));
EXPECT_CALL(first_observer, OnLocationUpdate(GeopositionEq(first_position)));
std::unique_ptr<GeolocationProvider::Subscription> subscription =
provider()->AddLocationUpdateCallback(first_callback, false);
@@ -220,9 +213,9 @@ TEST_F(GeolocationProviderTest, StalePositionNotSent) {
// After adding a second observer, check that no unexpected position update
// is sent.
EXPECT_CALL(second_observer, OnLocationUpdate(testing::_)).Times(0);
- GeolocationProviderImpl::LocationUpdateCallback second_callback = base::Bind(
- &MockGeolocationObserver::OnLocationUpdate,
- base::Unretained(&second_observer));
+ GeolocationProviderImpl::LocationUpdateCallback second_callback =
+ base::Bind(&MockGeolocationObserver::OnLocationUpdate,
+ base::Unretained(&second_observer));
std::unique_ptr<GeolocationProvider::Subscription> subscription2 =
provider()->AddLocationUpdateCallback(second_callback, false);
base::RunLoop().RunUntilIdle();
@@ -245,9 +238,9 @@ TEST_F(GeolocationProviderTest, OverrideLocationForTesting) {
// update the observer with our overridden position.
MockGeolocationObserver mock_observer;
EXPECT_CALL(mock_observer, OnLocationUpdate(GeopositionEq(position)));
- GeolocationProviderImpl::LocationUpdateCallback callback = base::Bind(
- &MockGeolocationObserver::OnLocationUpdate,
- base::Unretained(&mock_observer));
+ GeolocationProviderImpl::LocationUpdateCallback callback =
+ base::Bind(&MockGeolocationObserver::OnLocationUpdate,
+ base::Unretained(&mock_observer));
std::unique_ptr<GeolocationProvider::Subscription> subscription =
provider()->AddLocationUpdateCallback(callback, false);
subscription.reset();
« no previous file with comments | « device/geolocation/geolocation_provider_impl.cc ('k') | device/geolocation/geolocation_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698