| Index: third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.cpp
|
| diff --git a/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.cpp b/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.cpp
|
| index 54b624787e4e48504f67d32be54d33cca47d85c0..d593cad4df52b932b8820a0f0d15b50294396ea6 100644
|
| --- a/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.cpp
|
| +++ b/third_party/WebKit/Source/modules/geolocation/testing/InternalsGeolocation.cpp
|
| @@ -45,14 +45,7 @@ namespace blink {
|
| void InternalsGeolocation::setGeolocationClientMock(Internals&, Document* document)
|
| {
|
| ASSERT(document);
|
| - if (!document->frame())
|
| - return;
|
| -
|
| - GeolocationClientMock* client = new GeolocationClientMock();
|
| - for (Frame* childFrame = document->page()->mainFrame(); childFrame; childFrame = childFrame->tree().traverseNext()) {
|
| - if (childFrame->isLocalFrame())
|
| - GeolocationController::from(toLocalFrame(childFrame))->setClientForTest(client);
|
| - }
|
| + GeolocationClientMock::from(document);
|
| }
|
|
|
| void InternalsGeolocation::setGeolocationPosition(Internals&, Document* document, double latitude, double longitude, double accuracy)
|
| @@ -106,13 +99,7 @@ int InternalsGeolocation::numberOfPendingGeolocationPermissionRequests(Internals
|
| GeolocationClientMock* InternalsGeolocation::geolocationClient(Document* document)
|
| {
|
| ASSERT(document);
|
| - if (!document->frame())
|
| - return nullptr;
|
| -
|
| - GeolocationController* controller = GeolocationController::from(document->frame());
|
| - if (!controller->hasClientForTest())
|
| - return nullptr;
|
| - return static_cast<GeolocationClientMock*>(controller->client());
|
| + return GeolocationClientMock::from(document);
|
| }
|
|
|
| } // namespace blink
|
|
|