Diff
Modified: trunk/LayoutTests/ChangeLog (116505 => 116506)
--- trunk/LayoutTests/ChangeLog 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/LayoutTests/ChangeLog 2012-05-09 09:04:02 UTC (rev 116506)
@@ -1,3 +1,14 @@
+2012-05-09 Mikhail Pozdnyakov <[email protected]>
+
+ [EFL][DRT] LayoutTestController addUserScript implementation
+ https://bugs.webkit.org/show_bug.cgi?id=84718
+
+ Reviewed by Antonio Gomes.
+
+ Unskipped corresponding testcases.
+
+ * platform/efl/Skipped:
+
2012-05-09 Kent Tamura <[email protected]>
[Chromium] Test expectation update.
Modified: trunk/LayoutTests/platform/efl/Skipped (116505 => 116506)
--- trunk/LayoutTests/platform/efl/Skipped 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/LayoutTests/platform/efl/Skipped 2012-05-09 09:04:02 UTC (rev 116506)
@@ -351,21 +351,6 @@
# EFL's LayoutTestController overridePreference does not implement WebKitOfflineWebApplicationCacheEnabled preference
http/tests/appcache/disabled.html
-# EFL's LayoutTestController does not implement addUserScript
-userscripts/document-element-available-at-start.html
-userscripts/script-not-run-for-fragments.html
-userscripts/script-run-at-end.html
-userscripts/script-run-at-start.html
-userscripts/user-script-all-frames.html
-userscripts/user-script-audio-document.html
-userscripts/user-script-image-document.html
-userscripts/user-script-plugin-document.html
-userscripts/user-script-top-frame-only.html
-userscripts/user-script-video-document.html
-userscripts/user-style-top-frame-only.html
-userscripts/window-onerror-for-isolated-world-1.html
-userscripts/window-onerror-for-isolated-world-2.html
-
# EFL's LayoutTestController does not implement setAsynchronousSpellCheckingEnabled
editing/spelling/spellcheck-paste.html
editing/spelling/spellcheck-paste-disabled.html
@@ -1007,6 +992,7 @@
fast/spatial-navigation/snav-iframe-no-scrollable-content.html
fast/spatial-navigation/snav-multiple-select.html
fast/spatial-navigation/snav-single-select.html
+userscripts/user-script-plugin-document.html
# BUG: Needs a grayish canvas background. See DumpRenderTree/chromium/WebViewHost::displayRepaintMask().
fast/repaint/absolute-position-change-containing-block.html
@@ -1349,6 +1335,8 @@
http/tests/websocket/tests/hixie76/url-no-trailing-slash.html
http/tests/websocket/tests/hixie76/url-with-credential.html
http/tests/websocket/tests/hixie76/websocket-protocol-ignored.html
+userscripts/user-style-top-frame-only.html
+userscripts/window-onerror-for-isolated-world-2.html
# Unexpected flakiness (tests timed out)
http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc.html
@@ -1945,6 +1933,7 @@
compositing/webgl/webgl-reflection.html
fast/text/zero-font-size.html
fast/spatial-navigation/snav-multiple-select-focusring.html
+userscripts/script-run-at-end.html
# This test requires flac codec
media/media-can-play-flac-audio.html
Modified: trunk/Source/WebKit/efl/ChangeLog (116505 => 116506)
--- trunk/Source/WebKit/efl/ChangeLog 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-05-09 09:04:02 UTC (rev 116506)
@@ -1,3 +1,17 @@
+2012-05-09 Mikhail Pozdnyakov <[email protected]>
+
+ [EFL][DRT] LayoutTestController addUserScript implementation
+ https://bugs.webkit.org/show_bug.cgi?id=84718
+
+ Reviewed by Antonio Gomes.
+
+ Added helper functions for adding/clearing of user scripts.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::addUserScript):
+ (DumpRenderTreeSupportEfl::clearUserScripts):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
2012-05-08 Kangil Han <[email protected]>
[EFL][DRT] Implement TextInputController.
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp (116505 => 116506)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2012-05-09 09:04:02 UTC (rev 116506)
@@ -380,6 +380,26 @@
page->settings()->setLoadsSiteIconsIgnoringImageLoadingSetting(loadsSiteIconsIgnoringImageLoadingPreferences);
}
+void DumpRenderTreeSupportEfl::addUserScript(const Evas_Object* ewkView, const String& sourceCode, bool runAtStart, bool allFrames)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ page->group().addUserScriptToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(),
+ nullptr, nullptr, runAtStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd,
+ allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
+}
+
+void DumpRenderTreeSupportEfl::clearUserScripts(const Evas_Object* ewkView)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ page->group().removeUserScriptsFromWorld(WebCore::mainThreadNormalWorld());
+}
+
void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, const String& sourceCode, bool allFrames)
{
WebCore::Page* page = EWKPrivate::corePage(ewkView);
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h (116505 => 116506)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2012-05-09 09:04:02 UTC (rev 116506)
@@ -71,6 +71,8 @@
static void setDefersLoading(Evas_Object* ewkView, bool defers);
static void setLoadsSiteIconsIgnoringImageLoadingSetting(Evas_Object* ewkView, bool loadsSiteIconsIgnoringImageLoadingPreferences);
+ static void addUserScript(const Evas_Object* ewkView, const String& sourceCode, bool runAtStart, bool allFrames);
+ static void clearUserScripts(const Evas_Object* ewkView);
static void addUserStyleSheet(const Evas_Object* ewkView, const String& sourceCode, bool allFrames);
static void executeCoreCommandByName(const Evas_Object* ewkView, const char* name, const char* value);
static bool findString(const Evas_Object* ewkView, const String& text, WebCore::FindOptions);
Modified: trunk/Tools/ChangeLog (116505 => 116506)
--- trunk/Tools/ChangeLog 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/Tools/ChangeLog 2012-05-09 09:04:02 UTC (rev 116506)
@@ -1,3 +1,17 @@
+2012-05-09 Mikhail Pozdnyakov <[email protected]>
+
+ [EFL][DRT] LayoutTestController addUserScript implementation
+ https://bugs.webkit.org/show_bug.cgi?id=84718
+
+ Reviewed by Antonio Gomes.
+
+ Added implementation of addUserScript() to LayoutTestController.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues): clear added user scripts
+ * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+ (LayoutTestController::addUserScript): added implementation
+
2012-05-09 Dan Bernstein <[email protected]>
Made build-webkit copy WebKitLibraries to the right location again after r116257
Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (116505 => 116506)
--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-05-09 09:04:02 UTC (rev 116506)
@@ -253,6 +253,7 @@
DumpRenderTreeSupportEfl::clearFrameName(mainFrame());
DumpRenderTreeSupportEfl::clearOpener(mainFrame());
+ DumpRenderTreeSupportEfl::clearUserScripts(mainView());
DumpRenderTreeSupportEfl::setInteractiveFormValidationEnabled(mainView(), true);
DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(mainView(), true);
DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(mainView(), false);
Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (116505 => 116506)
--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 2012-05-09 08:42:14 UTC (rev 116505)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 2012-05-09 09:04:02 UTC (rev 116506)
@@ -694,9 +694,9 @@
fprintf(stderr, "LayoutTestController::overridePreference tried to override unknown preference '%s'.\n", value->ustring().utf8().data());
}
-void LayoutTestController::addUserScript(JSStringRef, bool, bool)
+void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
{
- notImplemented();
+ DumpRenderTreeSupportEfl::addUserScript(browser->mainView(), String(source->ustring().impl()), runAtStart, allFrames);
}
void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames)