| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "content/browser/geofencing/geofencing_manager.h" | 9 #include "content/browser/geofencing/geofencing_manager.h" |
| 10 #include "content/browser/geofencing/geofencing_service.h" | 10 #include "content/browser/geofencing/geofencing_service.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 for (RegionMap::const_iterator it = expected_regions.begin(); | 239 for (RegionMap::const_iterator it = expected_regions.begin(); |
| 240 it != expected_regions.end(); | 240 it != expected_regions.end(); |
| 241 ++it) { | 241 ++it) { |
| 242 EXPECT_THAT(regions[it->first], | 242 EXPECT_THAT(regions[it->first], |
| 243 WebCircularGeofencingRegionEq(it->second)); | 243 WebCircularGeofencingRegionEq(it->second)); |
| 244 } | 244 } |
| 245 } | 245 } |
| 246 | 246 |
| 247 protected: | 247 protected: |
| 248 TestBrowserThreadBundle threads_; | 248 TestBrowserThreadBundle threads_; |
| 249 scoped_ptr<EmbeddedWorkerTestHelper> helper_; | 249 std::unique_ptr<EmbeddedWorkerTestHelper> helper_; |
| 250 TestGeofencingService* service_; | 250 TestGeofencingService* service_; |
| 251 scoped_refptr<GeofencingManager> manager_; | 251 scoped_refptr<GeofencingManager> manager_; |
| 252 | 252 |
| 253 WebCircularGeofencingRegion test_region_; | 253 WebCircularGeofencingRegion test_region_; |
| 254 RegionMap expected_regions_; | 254 RegionMap expected_regions_; |
| 255 | 255 |
| 256 scoped_refptr<ServiceWorkerRegistration> worker1_; | 256 scoped_refptr<ServiceWorkerRegistration> worker1_; |
| 257 scoped_refptr<ServiceWorkerRegistration> worker2_; | 257 scoped_refptr<ServiceWorkerRegistration> worker2_; |
| 258 }; | 258 }; |
| 259 | 259 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 GEOFENCING_STATUS_OK, kTestGeofencingRegistrationId)); | 509 GEOFENCING_STATUS_OK, kTestGeofencingRegistrationId)); |
| 510 VerifyRegions(worker1_->id(), expected_regions_); | 510 VerifyRegions(worker1_->id(), expected_regions_); |
| 511 | 511 |
| 512 EXPECT_CALL(*service_, UnregisterRegion(kTestGeofencingRegistrationId)); | 512 EXPECT_CALL(*service_, UnregisterRegion(kTestGeofencingRegistrationId)); |
| 513 | 513 |
| 514 manager_->SetMockProvider(GeofencingMockState::SERVICE_AVAILABLE); | 514 manager_->SetMockProvider(GeofencingMockState::SERVICE_AVAILABLE); |
| 515 VerifyRegions(worker1_->id(), RegionMap()); | 515 VerifyRegions(worker1_->id(), RegionMap()); |
| 516 } | 516 } |
| 517 | 517 |
| 518 } // namespace content | 518 } // namespace content |
| OLD | NEW |