Index: Source/modules/geolocation/testing/InternalsGeolocation.cpp |
diff --git a/Source/modules/geolocation/testing/InternalsGeolocation.cpp b/Source/modules/geolocation/testing/InternalsGeolocation.cpp |
index 06a1e6a07d8161344dda08c09758b0ca5045844f..a349b47576bc2c9dcd5cf5a0e12d8e612c60052e 100644 |
--- a/Source/modules/geolocation/testing/InternalsGeolocation.cpp |
+++ b/Source/modules/geolocation/testing/InternalsGeolocation.cpp |
@@ -47,8 +47,10 @@ void InternalsGeolocation::setGeolocationClientMock(Internals&, Document* docume |
ASSERT(document && document->frame()); |
GeolocationClientMock* client = new GeolocationClientMock(); |
- for (LocalFrame* childFrame = document->page()->mainFrame(); childFrame; childFrame = childFrame->tree().traverseNext()) |
- GeolocationController::from(childFrame)->setClientForTest(client); |
+ for (Frame* childFrame = document->page()->mainFrame(); childFrame; childFrame = childFrame->tree().traverseNext()) { |
+ if (childFrame->isLocalFrame()) |
+ GeolocationController::from(toLocalFrame(childFrame))->setClientForTest(client); |
+ } |
} |
void InternalsGeolocation::setGeolocationPosition(Internals&, Document* document, double latitude, double longitude, double accuracy) |