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

Unified Diff: content/browser/geolocation/network_location_provider_unittest.cc

Issue 10316007: Make the Geoposition helper class public (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix forward-declaration of struct as class. Created 8 years, 8 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
Index: content/browser/geolocation/network_location_provider_unittest.cc
diff --git a/content/browser/geolocation/network_location_provider_unittest.cc b/content/browser/geolocation/network_location_provider_unittest.cc
index a98b747d55e2a122304a835c72144d36fd7c961a..6735acc8ddb458cbccb790807b7e83d48af1aec5 100644
--- a/content/browser/geolocation/network_location_provider_unittest.cc
+++ b/content/browser/geolocation/network_location_provider_unittest.cc
@@ -16,6 +16,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::FakeAccessTokenStore;
+using content::Geoposition;
namespace {
@@ -373,7 +374,7 @@ TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) {
Geoposition position;
provider->GetPosition(&position);
- EXPECT_FALSE(position.IsValidFix());
+ EXPECT_FALSE(position.Validate());
// Now wifi data arrives -- SetData will notify listeners.
const int kFirstScanAps = 6;
@@ -406,8 +407,8 @@ TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) {
EXPECT_EQ(51.0, position.latitude);
EXPECT_EQ(-0.1, position.longitude);
EXPECT_EQ(1200.4, position.accuracy);
- EXPECT_TRUE(position.is_valid_timestamp());
- EXPECT_TRUE(position.IsValidFix());
+ EXPECT_FALSE(position.timestamp.is_null());
+ EXPECT_TRUE(position.Validate());
// Token should be in the store.
EXPECT_EQ(UTF8ToUTF16(REFERENCE_ACCESS_TOKEN),
@@ -424,7 +425,7 @@ TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) {
provider->GetPosition(&position);
EXPECT_EQ(51.0, position.latitude);
EXPECT_EQ(-0.1, position.longitude);
- EXPECT_TRUE(position.IsValidFix());
+ EXPECT_TRUE(position.Validate());
// Now a third scan with more than twice the original amount -> new request.
const int kThirdScanAps = kFirstScanAps * 2 + 1;
@@ -445,8 +446,7 @@ TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) {
// Error means we now no longer have a fix.
provider->GetPosition(&position);
- EXPECT_FALSE(position.is_valid_latlong());
- EXPECT_FALSE(position.IsValidFix());
+ EXPECT_FALSE(position.Validate());
// Wifi scan returns to original set: should be serviced from cache.
wifi_data_provider_->SetData(CreateReferenceWifiScanData(kFirstScanAps));
@@ -456,7 +456,7 @@ TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) {
provider->GetPosition(&position);
EXPECT_EQ(51.0, position.latitude);
EXPECT_EQ(-0.1, position.longitude);
- EXPECT_TRUE(position.IsValidFix());
+ EXPECT_TRUE(position.Validate());
}
TEST_F(GeolocationNetworkProviderTest, NoRequestOnStartupUntilWifiData) {
« no previous file with comments | « content/browser/geolocation/network_location_provider.cc ('k') | content/browser/geolocation/network_location_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698