From: Steve Block Date: Tue, 8 Sep 2009 11:04:42 +0000 (+0100) Subject: Updates mock Geolocation service to match final version submitted to WebKit. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=9c3710c76ea425248782469af80633fd63cb6f8d;p=android-x86%2Fexternal-webkit.git Updates mock Geolocation service to match final version submitted to WebKit. See https://bugs.webkit.org/show_bug.cgi?id=28264. Change-Id: I30900239108ea699f194fceb30626f41c928c08e --- diff --git a/Android.jsc.mk b/Android.jsc.mk index 4ced65686..24433cfa4 100644 --- a/Android.jsc.mk +++ b/Android.jsc.mk @@ -133,6 +133,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/WebCore/platform/graphics/skia \ $(LOCAL_PATH)/WebCore/platform/graphics/transforms \ $(LOCAL_PATH)/WebCore/platform/image-decoders \ + $(LOCAL_PATH)/WebCore/platform/mock \ $(LOCAL_PATH)/WebCore/platform/network \ $(LOCAL_PATH)/WebCore/platform/network/android \ $(LOCAL_PATH)/WebCore/platform/sql \ diff --git a/Android.v8.mk b/Android.v8.mk index 1ba09c6bc..a06591ebf 100644 --- a/Android.v8.mk +++ b/Android.v8.mk @@ -139,6 +139,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/WebCore/platform/graphics/skia \ $(LOCAL_PATH)/WebCore/platform/graphics/transforms \ $(LOCAL_PATH)/WebCore/platform/image-decoders \ + $(LOCAL_PATH)/WebCore/platform/mock \ $(LOCAL_PATH)/WebCore/platform/network \ $(LOCAL_PATH)/WebCore/platform/network/android \ $(LOCAL_PATH)/WebCore/platform/sql \ diff --git a/WebCore/Android.mk b/WebCore/Android.mk index 2eb9d76f3..8c6a926a9 100644 --- a/WebCore/Android.mk +++ b/WebCore/Android.mk @@ -609,7 +609,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/LinkHash.cpp \ platform/Logging.cpp \ platform/MIMETypeRegistry.cpp \ - platform/MockGeolocationService.cpp \ platform/ScrollView.cpp \ platform/Scrollbar.cpp \ platform/ScrollbarThemeComposite.cpp \ @@ -727,6 +726,8 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/image-decoders/gif/GIFImageDecoder.cpp \ platform/image-decoders/gif/GIFImageReader.cpp \ \ + platform/mock/GeolocationServiceMock.cpp \ + \ platform/network/AuthenticationChallengeBase.cpp \ platform/network/Credential.cpp \ platform/network/FormData.cpp \ diff --git a/WebCore/Android.v8.mk b/WebCore/Android.v8.mk index 91b475007..d60456437 100644 --- a/WebCore/Android.v8.mk +++ b/WebCore/Android.v8.mk @@ -434,7 +434,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/Length.cpp \ platform/LinkHash.cpp \ platform/Logging.cpp \ - platform/MockGeolocationService.cpp \ platform/MIMETypeRegistry.cpp \ platform/ScrollView.cpp \ platform/Scrollbar.cpp \ @@ -554,6 +553,8 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/image-decoders/gif/GIFImageReader.cpp \ platform/image-decoders/skia/ImageDecoderSkia.cpp \ \ + platform/mock/GeolocationServiceMock.cpp \ + \ platform/network/AuthenticationChallengeBase.cpp \ platform/network/Credential.cpp \ platform/network/FormData.cpp \ diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj index a56a10c43..c70f8d434 100644 --- a/WebCore/WebCore.xcodeproj/project.pbxproj +++ b/WebCore/WebCore.xcodeproj/project.pbxproj @@ -943,6 +943,8 @@ 54C50F7B0E801DF3009832A0 /* XMLTokenizerLibxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54C50F7A0E801DF3009832A0 /* XMLTokenizerLibxml2.cpp */; }; 550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; }; 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 59C77F2A10545B3B00506104 /* GeolocationServiceMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */; }; + 59C77F2B10545B3B00506104 /* GeolocationServiceMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 59C77F2910545B3B00506104 /* GeolocationServiceMock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5D15E3AB0F9E6AC1009E0E3F /* XMLTokenizerScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D15E3A90F9E6AC1009E0E3F /* XMLTokenizerScope.cpp */; }; 5D15E3AC0F9E6AC1009E0E3F /* XMLTokenizerScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D15E3AA0F9E6AC1009E0E3F /* XMLTokenizerScope.h */; }; 5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DD0AF589AD00D48324 /* NetscapePlugInStreamLoader.cpp */; }; @@ -3849,8 +3851,6 @@ B50F5B810E96CD9900AD71A6 /* WebCoreObjCExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = B50F5B800E96CD9900AD71A6 /* WebCoreObjCExtras.mm */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; B5A684220FFABE9800D24689 /* SQLiteFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A684210FFABE9800D24689 /* SQLiteFileSystem.h */; }; B5A684240FFABEAA00D24689 /* SQLiteFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5A684230FFABEAA00D24689 /* SQLiteFileSystem.cpp */; }; - B6D39711103AF29D00A83BC7 /* MockGeolocationService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D39710103AF29D00A83BC7 /* MockGeolocationService.cpp */; }; - B6D39715103AF2BB00A83BC7 /* MockGeolocationService.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D39714103AF2BB00A83BC7 /* MockGeolocationService.h */; }; BC00F0040E0A185500FD04E3 /* DOMFile.h in Headers */ = {isa = PBXBuildFile; fileRef = BC00EFFE0E0A185500FD04E3 /* DOMFile.h */; }; BC00F0050E0A185500FD04E3 /* DOMFile.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */; }; BC00F0060E0A185500FD04E3 /* DOMFileInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC00F0000E0A185500FD04E3 /* DOMFileInternal.h */; }; @@ -5989,6 +5989,8 @@ 54C50F7A0E801DF3009832A0 /* XMLTokenizerLibxml2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTokenizerLibxml2.cpp; sourceTree = ""; }; 550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = ""; tabWidth = 8; usesTabs = 0; }; 550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = ""; tabWidth = 8; usesTabs = 0; }; + 59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeolocationServiceMock.cpp; path = mock/GeolocationServiceMock.cpp; sourceTree = ""; }; + 59C77F2910545B3B00506104 /* GeolocationServiceMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GeolocationServiceMock.h; path = mock/GeolocationServiceMock.h; sourceTree = ""; }; 5D15E3A90F9E6AC1009E0E3F /* XMLTokenizerScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTokenizerScope.cpp; sourceTree = ""; }; 5D15E3AA0F9E6AC1009E0E3F /* XMLTokenizerScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTokenizerScope.h; sourceTree = ""; }; 5D925B650F64D4DD00B847F0 /* ScrollBehavior.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollBehavior.cpp; sourceTree = ""; }; @@ -8727,8 +8729,6 @@ B50F5B800E96CD9900AD71A6 /* WebCoreObjCExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreObjCExtras.mm; sourceTree = ""; }; B5A684210FFABE9800D24689 /* SQLiteFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteFileSystem.h; path = sql/SQLiteFileSystem.h; sourceTree = ""; }; B5A684230FFABEAA00D24689 /* SQLiteFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteFileSystem.cpp; path = sql/SQLiteFileSystem.cpp; sourceTree = ""; }; - B6D39710103AF29D00A83BC7 /* MockGeolocationService.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockGeolocationService.cpp; sourceTree = ""; }; - B6D39714103AF2BB00A83BC7 /* MockGeolocationService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockGeolocationService.h; sourceTree = ""; }; BC00EFFE0E0A185500FD04E3 /* DOMFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFile.h; sourceTree = ""; }; BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMFile.mm; sourceTree = ""; }; BC00F0000E0A185500FD04E3 /* DOMFileInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFileInternal.h; sourceTree = ""; }; @@ -10311,6 +10311,15 @@ path = websockets; sourceTree = ""; }; + 59C77F101054591C00506104 /* mock */ = { + isa = PBXGroup; + children = ( + 59C77F2810545B3B00506104 /* GeolocationServiceMock.cpp */, + 59C77F2910545B3B00506104 /* GeolocationServiceMock.h */, + ); + name = mock; + sourceTree = ""; + }; 5DA5E0F9102B950400088CF9 /* WebSockets */ = { isa = PBXGroup; children = ( @@ -14052,6 +14061,7 @@ BCF1A5BA097832090061A123 /* platform */ = { isa = PBXGroup; children = ( + 59C77F101054591C00506104 /* mock */, 49E912A40EFAC8E6009D0CAF /* animation */, 1AE42F670AA4B8CB00C8612D /* cf */, B2A015910AF6CD53006BCE0E /* graphics */, @@ -14103,8 +14113,6 @@ A8239DFF09B3CF8A00B60641 /* Logging.h */, BC772C4C0C4EB3040083285F /* MIMETypeRegistry.cpp */, BC772C4D0C4EB3040083285F /* MIMETypeRegistry.h */, - B6D39714103AF2BB00A83BC7 /* MockGeolocationService.h */, - B6D39710103AF29D00A83BC7 /* MockGeolocationService.cpp */, 4B2708C50AF19EE40065127F /* Pasteboard.h */, 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */, 932871BF0B20DEB70049035A /* PlatformMenuDescription.h */, @@ -17191,7 +17199,7 @@ 49484FC8102CF23C00187DD3 /* CanvasPixelArray.h in Headers */, 49484FCB102CF23C00187DD3 /* CanvasRenderingContext2D.h in Headers */, 49484FCE102CF23C00187DD3 /* CanvasStyle.h in Headers */, - B6D39715103AF2BB00A83BC7 /* MockGeolocationService.h in Headers */, + 59C77F2B10545B3B00506104 /* GeolocationServiceMock.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -19243,7 +19251,7 @@ 49484FC7102CF23C00187DD3 /* CanvasPixelArray.cpp in Sources */, 49484FCA102CF23C00187DD3 /* CanvasRenderingContext2D.cpp in Sources */, 49484FCD102CF23C00187DD3 /* CanvasStyle.cpp in Sources */, - B6D39711103AF29D00A83BC7 /* MockGeolocationService.cpp in Sources */, + 59C77F2A10545B3B00506104 /* GeolocationServiceMock.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WebCore/platform/GeolocationService.cpp b/WebCore/platform/GeolocationService.cpp index 4fd678b8f..e60ef0057 100644 --- a/WebCore/platform/GeolocationService.cpp +++ b/WebCore/platform/GeolocationService.cpp @@ -26,7 +26,7 @@ #include "config.h" #include "GeolocationService.h" #include "Geoposition.h" -#include "MockGeolocationService.h" +#include "GeolocationServiceMock.h" #include "PositionError.h" #include @@ -35,12 +35,12 @@ namespace WebCore { #if !ENABLE(GEOLOCATION) -GeolocationService* createNullGeolocationService(GeolocationServiceClient*) +static GeolocationService* createGeolocationServiceNull(GeolocationServiceClient*) { return 0; } -GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &createNullGeolocationService; +GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &createGeolocationServiceNull; #endif GeolocationService* GeolocationService::create(GeolocationServiceClient* client) @@ -50,7 +50,7 @@ GeolocationService* GeolocationService::create(GeolocationServiceClient* client) void GeolocationService::useMock() { - s_factoryFunction = &MockGeolocationService::create; + s_factoryFunction = &GeolocationServiceMock::create; } GeolocationService::GeolocationService(GeolocationServiceClient* client) diff --git a/WebCore/platform/GeolocationService.h b/WebCore/platform/GeolocationService.h index a99523f98..cebf31330 100644 --- a/WebCore/platform/GeolocationService.h +++ b/WebCore/platform/GeolocationService.h @@ -27,7 +27,6 @@ #define GeolocationService_h #include -#include namespace WebCore { diff --git a/WebCore/platform/MockGeolocationService.cpp b/WebCore/platform/mock/GeolocationServiceMock.cpp old mode 100755 new mode 100644 similarity index 64% rename from WebCore/platform/MockGeolocationService.cpp rename to WebCore/platform/mock/GeolocationServiceMock.cpp index b147f537f..f1871047c --- a/WebCore/platform/MockGeolocationService.cpp +++ b/WebCore/platform/mock/GeolocationServiceMock.cpp @@ -24,41 +24,43 @@ */ #include "config.h" -#include "MockGeolocationService.h" +#include "GeolocationServiceMock.h" +#include "Logging.h" +#include "Geolocation.h" #include "Geoposition.h" #include "PositionError.h" #include "PositionOptions.h" namespace WebCore { -MockGeolocationService::MockGeolocationServiceSet* MockGeolocationService::s_instances = 0; -RefPtr* MockGeolocationService::s_lastPosition; -RefPtr* MockGeolocationService::s_lastError; +GeolocationServiceMock::GeolocationServiceSet* GeolocationServiceMock::s_instances = 0; +RefPtr* GeolocationServiceMock::s_lastPosition; +RefPtr* GeolocationServiceMock::s_lastError; -GeolocationService* MockGeolocationService::create(GeolocationServiceClient* client) +GeolocationService* GeolocationServiceMock::create(GeolocationServiceClient* client) { initStatics(); - return new MockGeolocationService(client); + return new GeolocationServiceMock(client); } -MockGeolocationService::MockGeolocationService(GeolocationServiceClient* client) +GeolocationServiceMock::GeolocationServiceMock(GeolocationServiceClient* client) : GeolocationService(client) - , m_timer(this, &MockGeolocationService::timerFired) + , m_timer(this, &GeolocationServiceMock::timerFired) , m_isActive(false) { s_instances->add(this); } -MockGeolocationService::~MockGeolocationService() +GeolocationServiceMock::~GeolocationServiceMock() { - MockGeolocationServiceSet::iterator iter = s_instances->find(this); + GeolocationServiceSet::iterator iter = s_instances->find(this); ASSERT(iter != s_instances->end()); s_instances->remove(iter); cleanUpStatics(); } -void MockGeolocationService::setPosition(PassRefPtr position) +void GeolocationServiceMock::setPosition(PassRefPtr position) { initStatics(); GeolocationService::useMock(); @@ -67,7 +69,7 @@ void MockGeolocationService::setPosition(PassRefPtr position) makeGeolocationCallbackFromAllInstances(); } -void MockGeolocationService::setError(PassRefPtr error) +void GeolocationServiceMock::setError(PassRefPtr error) { initStatics(); GeolocationService::useMock(); @@ -76,56 +78,52 @@ void MockGeolocationService::setError(PassRefPtr error) makeGeolocationCallbackFromAllInstances(); } -bool MockGeolocationService::startUpdating(PositionOptions*) +bool GeolocationServiceMock::startUpdating(PositionOptions*) { m_isActive = true; m_timer.startOneShot(0); return true; } -void MockGeolocationService::stopUpdating() +void GeolocationServiceMock::stopUpdating() { m_isActive = false; } -void MockGeolocationService::timerFired(Timer* timer) +void GeolocationServiceMock::timerFired(Timer* timer) { ASSERT_UNUSED(timer, timer == &m_timer); makeGeolocationCallback(); } -void MockGeolocationService::makeGeolocationCallbackFromAllInstances() +void GeolocationServiceMock::makeGeolocationCallbackFromAllInstances() { - MockGeolocationServiceSet::const_iterator end = s_instances->end(); - for (MockGeolocationServiceSet::const_iterator iter = s_instances->begin(); - iter != end; - ++iter) { + GeolocationServiceSet::const_iterator end = s_instances->end(); + for (GeolocationServiceSet::const_iterator iter = s_instances->begin(); iter != end; ++iter) (*iter)->makeGeolocationCallback(); - } } -void MockGeolocationService::makeGeolocationCallback() +void GeolocationServiceMock::makeGeolocationCallback() { if (!m_isActive) return; - if (*s_lastPosition) { + if (*s_lastPosition) positionChanged(); - } else if (*s_lastError) { + else if (*s_lastError) errorOccurred(); - } } -void MockGeolocationService::initStatics() +void GeolocationServiceMock::initStatics() { - if (s_instances == 0) { - s_instances = new MockGeolocationServiceSet; + if (s_instances == 0) { + s_instances = new GeolocationServiceSet; s_lastPosition = new RefPtr; s_lastError = new RefPtr; } } -void MockGeolocationService::cleanUpStatics() +void GeolocationServiceMock::cleanUpStatics() { if (s_instances->size() == 0) { delete s_instances; diff --git a/WebCore/platform/MockGeolocationService.h b/WebCore/platform/mock/GeolocationServiceMock.h similarity index 84% rename from WebCore/platform/MockGeolocationService.h rename to WebCore/platform/mock/GeolocationServiceMock.h index 6cb24932c..7d0279739 100755 --- a/WebCore/platform/MockGeolocationService.h +++ b/WebCore/platform/mock/GeolocationServiceMock.h @@ -23,8 +23,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MockGeolocationService_h -#define MockGeolocationService_h +#ifndef GeolocationServiceMock_h +#define GeolocationServiceMock_h #include "GeolocationService.h" #include "Timer.h" @@ -39,12 +39,12 @@ namespace WebCore { // to be set manually using the setPosition and setError methods. Objects of // this class call back to their respective GeolocationServiceClient with the // position or error every time either of these is updated. -class MockGeolocationService : public GeolocationService { +class GeolocationServiceMock : public GeolocationService { public: static GeolocationService* create(GeolocationServiceClient*); - MockGeolocationService(GeolocationServiceClient*); - virtual ~MockGeolocationService(); + GeolocationServiceMock(GeolocationServiceClient*); + virtual ~GeolocationServiceMock(); virtual bool startUpdating(PositionOptions*); virtual void stopUpdating(); @@ -59,22 +59,22 @@ class MockGeolocationService : public GeolocationService { static void makeGeolocationCallbackFromAllInstances(); void makeGeolocationCallback(); - void timerFired(Timer*); + void timerFired(Timer*); static void initStatics(); static void cleanUpStatics(); - typedef HashSet MockGeolocationServiceSet; - static MockGeolocationServiceSet* s_instances; + typedef HashSet GeolocationServiceSet; + static GeolocationServiceSet* s_instances; static RefPtr* s_lastPosition; static RefPtr* s_lastError; - Timer m_timer; + Timer m_timer; bool m_isActive; }; } // namespace WebCore -#endif // MockGeolocationService_h +#endif // GeolocationServiceMock_h diff --git a/WebKit/android/jni/MockGeolocation.cpp b/WebKit/android/jni/MockGeolocation.cpp index 8c5f966f7..3e79680f0 100755 --- a/WebKit/android/jni/MockGeolocation.cpp +++ b/WebKit/android/jni/MockGeolocation.cpp @@ -30,10 +30,10 @@ #include #include "Coordinates.h" +#include "GeolocationServiceMock.h" #include "Geoposition.h" #include "JavaSharedClient.h" #include "jni_utility.h" -#include "MockGeolocationService.h" #include "PositionError.h" #include "WebCoreJni.h" #include @@ -54,7 +54,7 @@ static void setPosition(JNIEnv* env, jobject, double latitude, double longitude, false, 0.0, // heading false, 0.0); // speed RefPtr position = Geoposition::create(coordinates.release(), WTF::currentTime()); - MockGeolocationService::setPosition(position.release()); + GeolocationServiceMock::setPosition(position.release()); } static void setError(JNIEnv* env, jobject, int code, jstring message) @@ -62,7 +62,7 @@ static void setError(JNIEnv* env, jobject, int code, jstring message) PositionError::ErrorCode codeEnum = static_cast(code); String messageString = to_string(env, message); RefPtr error = PositionError::create(codeEnum, messageString); - MockGeolocationService::setError(error.release()); + GeolocationServiceMock::setError(error.release()); } static JNINativeMethod gMockGeolocationMethods[] = {