Diff
Modified: trunk/LayoutTests/ChangeLog (133265 => 133266)
--- trunk/LayoutTests/ChangeLog 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/LayoutTests/ChangeLog 2012-11-02 05:54:31 UTC (rev 133266)
@@ -1,3 +1,14 @@
+2012-11-01 Seonae Kim <sunaeluv....@samsung.com>
+
+ [EFL][DRT] Support Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=97427
+
+ Reviewed by Gyuyoung Kim.
+
+ Change the comment of Geolocation test cases.
+
+ * platform/efl/TestExpectations:
+
2012-11-01 Simon Fraser <simon.fra...@apple.com>
New image results for compositing tests. Cross-platform image results seem
Modified: trunk/LayoutTests/platform/efl/TestExpectations (133265 => 133266)
--- trunk/LayoutTests/platform/efl/TestExpectations 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2012-11-02 05:54:31 UTC (rev 133266)
@@ -1337,7 +1337,7 @@
webkit.org/b/68591 http/tests/security/mixedContent/filesystem-url-in-iframe.html
webkit.org/b/68591 http/tests/inspector/filesystem
-# The EFL port has no support for the Geolocation
+# EFL's TestRunner should support for the Geolocation API
webkit.org/b/82140 fast/dom/Geolocation [ Skip ]
webkit.org/b/82140 fast/dom/Window/window-properties-geolocation.html [ Failure ]
webkit.org/b/82140 inspector/geolocation-error.html [ Failure ]
Modified: trunk/Source/WebKit/ChangeLog (133265 => 133266)
--- trunk/Source/WebKit/ChangeLog 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Source/WebKit/ChangeLog 2012-11-02 05:54:31 UTC (rev 133266)
@@ -1,3 +1,14 @@
+2012-11-01 Seonae Kim <sunaeluv....@samsung.com>
+
+ [EFL][DRT] Support Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=97427
+
+ Reviewed by Gyuyoung Kim.
+
+ Add a mock directory to use GeolocationClientMock in DumpRenderTree.
+
+ * PlatformEfl.cmake:
+
2012-10-31 Otto Derek Cheung <otche...@rim.com>
[BlackBerry] Adding window.external to our port
Modified: trunk/Source/WebKit/PlatformEfl.cmake (133265 => 133266)
--- trunk/Source/WebKit/PlatformEfl.cmake 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Source/WebKit/PlatformEfl.cmake 2012-11-02 05:54:31 UTC (rev 133266)
@@ -7,6 +7,7 @@
"${WEBCORE_DIR}/platform/efl"
"${WEBCORE_DIR}/platform/graphics/cairo"
"${WEBCORE_DIR}/platform/graphics/efl"
+ "${WEBCORE_DIR}/platform/mock"
"${WEBCORE_DIR}/platform/network/soup"
${CAIRO_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
@@ -86,6 +87,12 @@
)
ENDIF ()
+IF (ENABLE_GEOLOCATION)
+ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/Modules/geolocation"
+ )
+ENDIF ()
+
LIST(APPEND WebKit_SOURCES
efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
efl/WebCoreSupport/AssertMatchingEnums.cpp
Modified: trunk/Source/WebKit/efl/ChangeLog (133265 => 133266)
--- trunk/Source/WebKit/efl/ChangeLog 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-11-02 05:54:31 UTC (rev 133266)
@@ -1,3 +1,22 @@
+2012-11-01 Seonae Kim <sunaeluv....@samsung.com>
+
+ [EFL][DRT] Support Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=97427
+
+ Reviewed by Gyuyoung Kim.
+
+ Implement methods to use GeolocationClientMock in DumpRenderTree.
+ This client attaches to the page whenever a view is created.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::attachClientToPage):
+ (DumpRenderTreeSupportEfl::resetGeolocationClientMock):
+ (DumpRenderTreeSupportEfl::setMockGeolocationPermission):
+ (DumpRenderTreeSupportEfl::setMockGeolocationPosition):
+ (DumpRenderTreeSupportEfl::setMockGeolocationPositionUnavailableError):
+ (DumpRenderTreeSupportEfl::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
2012-10-31 Michał Pakuła vel Rutka <m.pak...@samsung.com>
[EFL][DRT] EventSender requires contextClick implementation
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp (133265 => 133266)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2012-11-02 05:54:31 UTC (rev 133266)
@@ -62,6 +62,14 @@
#include <workers/WorkerThread.h>
#include <wtf/HashMap.h>
+#if ENABLE(GEOLOCATION)
+#include <GeolocationClientMock.h>
+#include <GeolocationController.h>
+#include <GeolocationError.h>
+#include <GeolocationPosition.h>
+#include <wtf/CurrentTime.h>
+#endif
+
#define DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, ...) \
WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame); \
if (!frame) \
@@ -71,7 +79,19 @@
WebCore::Page* page = EWKPrivate::corePage(ewkView); \
if (!page) \
return __VA_ARGS__;
-
+
+bool DumpRenderTreeSupportEfl::s_drtRun = false;
+
+void DumpRenderTreeSupportEfl::setDumpRenderTreeModeEnabled(bool enabled)
+{
+ s_drtRun = enabled;
+}
+
+bool DumpRenderTreeSupportEfl::dumpRenderTreeModeEnabled()
+{
+ return s_drtRun;
+}
+
unsigned DumpRenderTreeSupportEfl::activeAnimationsCount(const Evas_Object* ewkFrame)
{
DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, 0);
@@ -779,3 +799,77 @@
{
WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
}
+
+void DumpRenderTreeSupportEfl::resetGeolocationClientMock(const Evas_Object* ewkView)
+{
+#if ENABLE(GEOLOCATION)
+ DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
+
+ WebCore::GeolocationClientMock* mock = static_cast<WebCore::GeolocationClientMock*>(WebCore::GeolocationController::from(page)->client());
+ mock->reset();
+#else
+ UNUSED_PARAM(ewkView);
+#endif
+}
+
+void DumpRenderTreeSupportEfl::setMockGeolocationPermission(const Evas_Object* ewkView, bool allowed)
+{
+#if ENABLE(GEOLOCATION)
+ DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
+
+ WebCore::GeolocationClientMock* mock = static_cast<WebCore::GeolocationClientMock*>(WebCore::GeolocationController::from(page)->client());
+ mock->setPermission(allowed);
+#else
+ UNUSED_PARAM(ewkView);
+ UNUSED_PARAM(allowed);
+#endif
+}
+
+void DumpRenderTreeSupportEfl::setMockGeolocationPosition(const Evas_Object* ewkView, double latitude, double longitude, double accuracy, bool canProvideAltitude, double altitude, bool canProvideAltitudeAccuracy, double altitudeAccuracy, bool canProvideHeading, double heading, bool canProvideSpeed, double speed)
+{
+#if ENABLE(GEOLOCATION)
+ DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
+
+ WebCore::GeolocationClientMock* mock = static_cast<WebCore::GeolocationClientMock*>(WebCore::GeolocationController::from(page)->client());
+ mock->setPosition(WebCore::GeolocationPosition::create(currentTime(), latitude, longitude, accuracy, canProvideAltitude, altitude, canProvideAltitudeAccuracy, altitudeAccuracy, canProvideHeading, heading, canProvideSpeed, speed));
+#else
+ UNUSED_PARAM(ewkView);
+ UNUSED_PARAM(latitude);
+ UNUSED_PARAM(longitude);
+ UNUSED_PARAM(accuracy);
+ UNUSED_PARAM(canProvideAltitude);
+ UNUSED_PARAM(altitude);
+ UNUSED_PARAM(canProvideAltitudeAccuracy);
+ UNUSED_PARAM(altitudeAccuracy);
+ UNUSED_PARAM(canProvideHeading);
+ UNUSED_PARAM(heading);
+ UNUSED_PARAM(canProvideSpeed);
+ UNUSED_PARAM(speed);
+#endif
+}
+
+void DumpRenderTreeSupportEfl::setMockGeolocationPositionUnavailableError(const Evas_Object* ewkView, const char* errorMessage)
+{
+#if ENABLE(GEOLOCATION)
+ DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
+
+ WebCore::GeolocationClientMock* mock = static_cast<WebCore::GeolocationClientMock*>(WebCore::GeolocationController::from(page)->client());
+ mock->setPositionUnavailableError(errorMessage);
+#else
+ UNUSED_PARAM(ewkView);
+ UNUSED_PARAM(errorMessage);
+#endif
+}
+
+int DumpRenderTreeSupportEfl::numberOfPendingGeolocationPermissionRequests(const Evas_Object* ewkView)
+{
+#if ENABLE(GEOLOCATION)
+ DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page, -1);
+
+ WebCore::GeolocationClientMock* mock = static_cast<WebCore::GeolocationClientMock*>(WebCore::GeolocationController::from(page)->client());
+ return mock->numberOfPendingPermissionRequests();
+#else
+ UNUSED_PARAM(ewkView);
+ return 0;
+#endif
+}
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h (133265 => 133266)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2012-11-02 05:54:31 UTC (rev 133266)
@@ -49,6 +49,9 @@
~DumpRenderTreeSupportEfl() { }
+ static void setDumpRenderTreeModeEnabled(bool);
+ static bool dumpRenderTreeModeEnabled();
+
static unsigned activeAnimationsCount(const Evas_Object* ewkFrame);
static bool callShouldCloseOnWebView(Evas_Object* ewkFrame);
static void clearFrameName(Evas_Object* ewkFrame);
@@ -127,6 +130,16 @@
static void confirmComposition(Evas_Object*, const char*);
static WebCore::IntRect firstRectForCharacterRange(Evas_Object*, int, int);
static bool selectedRange(Evas_Object*, int*, int*);
+
+ // Geolocation
+ static void resetGeolocationClientMock(const Evas_Object*);
+ static void setMockGeolocationPermission(const Evas_Object*, bool allowed);
+ static void setMockGeolocationPosition(const Evas_Object*, double latitude, double longitude, double accuracy, bool canProvideAltitude, double altitude, bool canProvideAltitudeAccuracy, double altitudeAccuracy, bool canProvideHeading, double heading, bool canProvideSpeed, double speed);
+ static void setMockGeolocationPositionUnavailableError(const Evas_Object*, const char* errorMessage);
+ static int numberOfPendingGeolocationPermissionRequests(const Evas_Object*);
+
+private:
+ static bool s_drtRun;
};
#endif // DumpRenderTreeSupportEfl_h
Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (133265 => 133266)
--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp 2012-11-02 05:54:31 UTC (rev 133266)
@@ -31,6 +31,7 @@
#include "ContextMenuController.h"
#include "DocumentLoader.h"
#include "DragClientEfl.h"
+#include "DumpRenderTreeSupportEfl.h"
#include "EditorClientEfl.h"
#include "EflScreenUtilities.h"
#include "EventHandler.h"
@@ -85,6 +86,11 @@
#include "DeviceOrientationClientEfl.h"
#endif
+#if ENABLE(GEOLOCATION)
+#include "GeolocationClientMock.h"
+#include "GeolocationController.h"
+#endif
+
#if ENABLE(VIBRATION)
#include "VibrationClientEfl.h"
#endif
@@ -784,6 +790,14 @@
WebCore::provideNavigatorContentUtilsTo(priv->page.get(), priv->navigatorContentUtilsClient.get());
#endif
+#if ENABLE(GEOLOCATION)
+ if (DumpRenderTreeSupportEfl::dumpRenderTreeModeEnabled()) {
+ WebCore::GeolocationClientMock* mock = new WebCore::GeolocationClientMock;
+ WebCore::provideGeolocationTo(priv->page.get(), mock);
+ mock->setController(WebCore::GeolocationController::from(priv->page.get()));
+ }
+#endif
+
priv->pageSettings = priv->page->settings();
WebCore::LayoutMilestones layoutMilestones = WebCore::DidFirstLayout | WebCore::DidFirstVisuallyNonEmptyLayout;
Modified: trunk/Tools/ChangeLog (133265 => 133266)
--- trunk/Tools/ChangeLog 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Tools/ChangeLog 2012-11-02 05:54:31 UTC (rev 133266)
@@ -1,3 +1,22 @@
+2012-11-01 Seonae Kim <sunaeluv....@samsung.com>
+
+ [EFL][DRT] Support Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=97427
+
+ Reviewed by Gyuyoung Kim.
+
+ Implement methods to use GeolocationClientMock in DumpRenderTree.
+ This client attaches to the page whenever a view is created.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::createView):
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ (TestRunner::setGeolocationPermission):
+ (TestRunner::numberOfPendingGeolocationPermissionRequests):
+
2012-11-01 Ryosuke Niwa <rn...@webkit.org>
Remove tests no longer needed after r133229.
Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (133265 => 133266)
--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-11-02 05:54:31 UTC (rev 133266)
@@ -196,6 +196,8 @@
bool DumpRenderTreeChrome::initialize()
{
+ // Notifies that DRT is running for ewkView to create testable objects.
+ DumpRenderTreeSupportEfl::setDumpRenderTreeModeEnabled(true);
DumpRenderTreeSupportEfl::setMockScrollbarsEnabled(true);
m_mainView = createView();
@@ -308,6 +310,7 @@
DumpRenderTreeSupportEfl::clearOpener(mainFrame());
DumpRenderTreeSupportEfl::clearUserScripts(mainView());
DumpRenderTreeSupportEfl::clearUserStyleSheets(mainView());
+ DumpRenderTreeSupportEfl::resetGeolocationClientMock(mainView());
DumpRenderTreeSupportEfl::setInteractiveFormValidationEnabled(mainView(), true);
DumpRenderTreeSupportEfl::setValidationMessageTimerMagnification(mainView(), -1);
DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(mainView(), true);
Modified: trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp (133265 => 133266)
--- trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2012-11-02 04:41:41 UTC (rev 133265)
+++ trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2012-11-02 05:54:31 UTC (rev 133266)
@@ -365,30 +365,41 @@
notImplemented();
}
-void TestRunner::setMockGeolocationPosition(double, double, double, bool, double, bool, double, bool, double, bool, double)
+void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool canProvideAltitude, double altitude, bool canProvideAltitudeAccuracy, double altitudeAccuracy, bool canProvideHeading, double heading, bool canProvideSpeed, double speed)
{
- // FIXME: Implement for Geolocation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=28264.
- notImplemented();
+ Evas_Object* view = browser->mainView();
+ if (browser->extraViews().size() > 0)
+ view = browser->extraViews().last();
+
+ DumpRenderTreeSupportEfl::setMockGeolocationPosition(view, latitude, longitude, accuracy, canProvideAltitude, altitude, canProvideAltitudeAccuracy, altitudeAccuracy, canProvideHeading, heading, canProvideSpeed, speed);
}
-void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
- // FIXME: Implement for Geolocation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=28264.
- notImplemented();
+ Evas_Object* view = browser->mainView();
+ if (browser->extraViews().size() > 0)
+ view = browser->extraViews().last();
+
+ DumpRenderTreeSupportEfl::setMockGeolocationPositionUnavailableError(view, message->string().utf8().data());
}
void TestRunner::setGeolocationPermission(bool allow)
{
- // FIXME: Implement for Geolocation layout tests.
setGeolocationPermissionCommon(allow);
+ Evas_Object* view = browser->mainView();
+ if (browser->extraViews().size() > 0)
+ view = browser->extraViews().last();
+
+ DumpRenderTreeSupportEfl::setMockGeolocationPermission(view, allow);
}
int TestRunner::numberOfPendingGeolocationPermissionRequests()
{
- // FIXME: Implement for Geolocation layout tests.
- return -1;
+ Evas_Object* view = browser->mainView();
+ if (browser->extraViews().size() > 0)
+ view = browser->extraViews().last();
+
+ return DumpRenderTreeSupportEfl::numberOfPendingGeolocationPermissionRequests(view);
}
void TestRunner::addMockSpeechInputResult(JSStringRef, double, JSStringRef)