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

Unified Diff: content/browser/geolocation/win7_location_provider_unittest_win.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/win7_location_provider_unittest_win.cc
diff --git a/content/browser/geolocation/win7_location_provider_unittest_win.cc b/content/browser/geolocation/win7_location_provider_unittest_win.cc
index d4b09b08bb5805b905ade6b7e4b537afaa525c0a..d67be500c2e109bc35948c516232fe27a4b9e50c 100644
--- a/content/browser/geolocation/win7_location_provider_unittest_win.cc
+++ b/content/browser/geolocation/win7_location_provider_unittest_win.cc
@@ -1,15 +1,14 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/message_loop.h"
#include "content/browser/geolocation/win7_location_provider_win.h"
#include "content/browser/geolocation/win7_location_api_win.h"
+#include "content/public/common/geoposition.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-struct Geoposition;
-
using testing::_;
using testing::AtLeast;
using testing::DoDefault;
@@ -27,26 +26,27 @@ class MockWin7LocationApi : public Win7LocationApi {
// Used to signal when the destructor is called.
MOCK_METHOD0(Die, void());
// Win7LocationApi
- MOCK_METHOD1(GetPosition, void(Geoposition*));
+ MOCK_METHOD1(GetPosition, void(content::Geoposition*));
MOCK_METHOD1(SetHighAccuracy, bool(bool));
virtual ~MockWin7LocationApi() {
Die();
}
- void GetPositionValid(Geoposition* position) {
+ void GetPositionValid(content::Geoposition* position) {
position->latitude = 4.5;
position->longitude = -34.1;
position->accuracy = 0.5;
position->timestamp = base::Time::FromDoubleT(200);
- position->error_code = Geoposition::ERROR_CODE_NONE;
+ position->error_code = content::Geoposition::ERROR_CODE_NONE;
}
- void GetPositionInvalid(Geoposition* position) {
+ void GetPositionInvalid(content::Geoposition* position) {
position->latitude = 4.5;
position->longitude = -340000.1;
position->accuracy = 0.5;
position->timestamp = base::Time::FromDoubleT(200);
- position->error_code = Geoposition::ERROR_CODE_POSITION_UNAVAILABLE;
+ position->error_code =
+ content::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE;
}
private:
@@ -119,9 +119,9 @@ TEST_F(GeolocationProviderWin7Tests, GetValidPosition) {
.WillOnce(Return(true));
EXPECT_TRUE(provider_->StartProvider(true));
main_message_loop_.Run();
- Geoposition position;
+ content::Geoposition position;
provider_->GetPosition(&position);
- EXPECT_TRUE(position.IsValidFix());
+ EXPECT_TRUE(position.Validate());
}
TEST_F(GeolocationProviderWin7Tests, GetInvalidPosition) {
@@ -133,9 +133,9 @@ TEST_F(GeolocationProviderWin7Tests, GetInvalidPosition) {
.WillOnce(Return(true));
EXPECT_TRUE(provider_->StartProvider(true));
main_message_loop_.Run();
- Geoposition position;
+ content::Geoposition position;
provider_->GetPosition(&position);
- EXPECT_FALSE(position.IsValidFix());
+ EXPECT_FALSE(position.Validate());
}
} // namespace
« no previous file with comments | « content/browser/geolocation/win7_location_api_win.cc ('k') | content/browser/geolocation/win7_location_provider_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698