Title: [115843] trunk
Revision
115843
Author
[email protected]
Date
2012-05-02 09:52:02 -0700 (Wed, 02 May 2012)

Log Message

[EFL] EFL's LayoutTestController overridePreference implementation
https://bugs.webkit.org/show_bug.cgi?id=83007

Tools:

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-05-02
Reviewed by Antonio Gomes.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(toBool): aux function converting JSStringRef to bool
(toInt): aux function converting JSStringRef to int
(LayoutTestController::overridePreference): added implementation

LayoutTests:

Unskip tescases depending on LayoutTestController overridePreference method.

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-05-02
Reviewed by Antonio Gomes.

* platform/efl/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (115842 => 115843)


--- trunk/LayoutTests/ChangeLog	2012-05-02 16:38:51 UTC (rev 115842)
+++ trunk/LayoutTests/ChangeLog	2012-05-02 16:52:02 UTC (rev 115843)
@@ -1,3 +1,14 @@
+2012-05-02  Mikhail Pozdnyakov  <[email protected]>
+
+        [EFL] EFL's LayoutTestController overridePreference implementation
+        https://bugs.webkit.org/show_bug.cgi?id=83007
+
+        Unskip tescases depending on LayoutTestController overridePreference method.
+
+        Reviewed by Antonio Gomes.
+
+        * platform/efl/Skipped:
+
 2012-05-02  Andrey Kosyakov  <[email protected]>
 
         Unreviewed. Refining expectations for passing tests.

Modified: trunk/LayoutTests/platform/efl/Skipped (115842 => 115843)


--- trunk/LayoutTests/platform/efl/Skipped	2012-05-02 16:38:51 UTC (rev 115842)
+++ trunk/LayoutTests/platform/efl/Skipped	2012-05-02 16:52:02 UTC (rev 115843)
@@ -382,52 +382,14 @@
 # EFL's LayoutTestController does not implement setDomainRelaxationForbiddenForURLScheme
 http/tests/security/setDomainRelaxationForbiddenForURLScheme.html
 
-# EFL's LayoutTestController does not implement overridePreference
-compositing/webgl/webgl-background-color.html
-compositing/webgl/webgl-no-alpha.html
-compositing/webgl/webgl-nonpremultiplied-blend.html
-compositing/webgl/webgl-reflection.html
-editing/selection/caret-mode-paragraph-keys-navigation.html
-fast/canvas/webgl
-fast/dom/Window/timer-resume-on-navigation-back.html
-fast/events/onunload-back-to-page-cache.html
-fast/events/pagehide-timeout.html
-fast/events/pageshow-pagehide-on-back-cached-with-frames.html
-fast/events/pageshow-pagehide-on-back-cached.html
-fast/events/tab-focus-anchor.html
-fast/frames/frame-crash-with-page-cache.html
-fast/harness/override-preferences-2.html
-fast/harness/override-preferences.html
-fast/harness/page-cache-crash-on-data-urls.html
-fast/harness/use-page-cache.html
-fast/history/back-forward-reset-after-error-handling.html
-fast/history/timed-refresh-in-cached-frame.html
-fast/images/animated-gif-restored-from-bfcache.html
-fast/loader/frames-with-unload-handlers-in-page-cache.html
-fast/loader/input-element-page-cache-crash.html
-fast/loader/scroll-position-restored-on-back.html
-fast/loader/stateobjects/popstate-fires-with-page-cache.html
-fast/loader/unschedule-relayout-after-unload.html
-fast/media/media-query-list-04.html
-fast/overflow/horizontal-scroll-after-back.html
-fast/parser/noscript-with-_javascript_-disabled.html
-fast/parser/noscript-with-_javascript_-enabled.html
+# EFL's LayoutTestController overridePreference does not implement WebKitUsePreHTML5ParserQuirks preference
 fast/parser/pre-html5-parser-quirks.html
-fast/repaint/no-caret-repaint-in-non-content-editable-element.html
-fast/spatial-navigation
-fast/text/zero-font-size.html
-fast/viewport/viewport-128.html
+
+# EFL's LayoutTestController overridePreference does not implement WebKitOfflineWebApplicationCacheEnabled preference
 http/tests/appcache/disabled.html
-http/tests/canvas/webgl/origin-clean-conformance.html
-http/tests/inspector/network/ping.html
-http/tests/media/reload-after-dialog.html
+
+# EFL's LayoutTestController overridePreference does not implement WebKitLoadSiteIconsKey preference
 http/tests/misc/favicon-loads-with-icon-loading-override.html
-http/tests/navigation/go-back-to-error-page.html
-http/tests/navigation/ping-cookie.html
-http/tests/navigation/ping-cross-origin.html
-http/tests/navigation/ping-same-origin.html
-loader/go-back-to-different-window-size.html
-media/restore-from-page-cache.html
 
 # EFL's LayoutTestController does not implement addUserScript
 userscripts/document-element-available-at-start.html
@@ -1120,6 +1082,31 @@
 fast/text/complex-synthetic-bold-space-width.html
 fast/text/justification-padding-mid-word.html
 fast/text/midword-break-after-breakable-char.html
+fast/canvas/webgl
+fast/dom/Window/timer-resume-on-navigation-back.html
+fast/events/pagehide-timeout.html
+fast/events/pageshow-pagehide-on-back-cached-with-frames.html
+fast/events/pageshow-pagehide-on-back-cached.html
+fast/events/tab-focus-anchor.html
+fast/harness/page-cache-crash-on-data-urls.html
+fast/harness/use-page-cache.html
+fast/history/back-forward-reset-after-error-handling.html
+fast/history/timed-refresh-in-cached-frame.html
+fast/images/animated-gif-restored-from-bfcache.html
+fast/media/media-query-list-04.html
+fast/overflow/horizontal-scroll-after-back.html
+fast/repaint/no-caret-repaint-in-non-content-editable-element.html
+fast/viewport/viewport-128.html
+http/tests/canvas/webgl/origin-clean-conformance.html
+http/tests/inspector/network/ping.html
+http/tests/navigation/go-back-to-error-page.html
+loader/go-back-to-different-window-size.html
+media/restore-from-page-cache.html
+fast/spatial-navigation/snav-container-white-space.html
+fast/spatial-navigation/snav-fully-aligned-horizontally.html
+fast/spatial-navigation/snav-iframe-no-scrollable-content.html
+fast/spatial-navigation/snav-multiple-select.html
+fast/spatial-navigation/snav-single-select.html
 
 # BUG: Needs a grayish canvas background. See DumpRenderTree/chromium/WebViewHost::displayRepaintMask().
 fast/repaint/absolute-position-change-containing-block.html
@@ -2144,6 +2131,12 @@
 media/video-colorspace-yuv420.html
 media/video-colorspace-yuv422.html
 perf/nested-combined-selectors.html
+compositing/webgl/webgl-background-color.html
+compositing/webgl/webgl-no-alpha.html
+compositing/webgl/webgl-nonpremultiplied-blend.html
+compositing/webgl/webgl-reflection.html
+fast/text/zero-font-size.html
+fast/spatial-navigation/snav-multiple-select-focusring.html
 
 # This test requires flac codec
 media/media-can-play-flac-audio.html

Modified: trunk/Tools/ChangeLog (115842 => 115843)


--- trunk/Tools/ChangeLog	2012-05-02 16:38:51 UTC (rev 115842)
+++ trunk/Tools/ChangeLog	2012-05-02 16:52:02 UTC (rev 115843)
@@ -1,3 +1,17 @@
+2012-05-02  Mikhail Pozdnyakov  <[email protected]>
+
+        [EFL] EFL's LayoutTestController overridePreference implementation
+        https://bugs.webkit.org/show_bug.cgi?id=83007
+
+        Reviewed by Antonio Gomes.
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (toBool): aux function converting JSStringRef to bool
+        (toInt): aux function converting JSStringRef to int
+        (LayoutTestController::overridePreference): added implementation
+
 2012-05-01  Raphael Kubo da Costa  <[email protected]>
 
         webkitpy: Fix sys.platform check in find_files_unittest.

Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (115842 => 115843)


--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2012-05-02 16:38:51 UTC (rev 115842)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2012-05-02 16:52:02 UTC (rev 115843)
@@ -227,6 +227,9 @@
     ewk_view_setting_enable_xss_auditor_set(browser->mainView(), EINA_TRUE);
     ewk_view_setting_enable_developer_extras_set(browser->mainView(), EINA_FALSE);
     ewk_view_setting_minimum_timer_interval_set(browser->mainView(), 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
+    ewk_view_setting_enable_webgl_set(mainView(), EINA_TRUE);
+    ewk_view_setting_enable_hyperlink_auditing_set(mainView(), EINA_FALSE);
+    ewk_view_setting_include_links_in_focus_chain_set(mainView(), EINA_TRUE);
 
     ewk_view_zoom_set(mainView(), 1.0, 0, 0);
     ewk_view_scale_set(mainView(), 1.0, 0, 0);

Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (115842 => 115843)


--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2012-05-02 16:38:51 UTC (rev 115842)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2012-05-02 16:52:02 UTC (rev 115843)
@@ -663,11 +663,40 @@
     DumpRenderTreeSupportEfl::resumeAnimations(browser->mainFrame());
 }
 
-void LayoutTestController::overridePreference(JSStringRef, JSStringRef)
+static inline bool toBool(JSStringRef value)
 {
-    notImplemented();
+    return equals(value, "true") || equals(value, "1");
 }
 
+static inline int toInt(JSStringRef value)
+{
+    return atoi(value->ustring().utf8().data());
+}
+
+void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
+{
+    if (equals(key, "WebKitJavaScriptEnabled"))
+        ewk_view_setting_enable_scripts_set(browser->mainView(), toBool(value));
+    else if (equals(key, "WebKitDefaultFontSize"))
+        ewk_view_setting_font_default_size_set(browser->mainView(), toInt(value));
+    else if (equals(key, "WebKitMinimumFontSize"))
+        ewk_view_setting_font_minimum_size_set(browser->mainView(), toInt(value));
+    else if (equals(key, "WebKitPluginsEnabled"))
+        ewk_view_setting_enable_plugins_set(browser->mainView(), toBool(value));
+    else if (equals(key, "WebKitWebGLEnabled"))
+        ewk_view_setting_enable_webgl_set(browser->mainView(), toBool(value));
+    else if (equals(key, "WebKitEnableCaretBrowsing"))
+        ewk_view_setting_caret_browsing_set(browser->mainView(), toBool(value));
+    else if (equals(key, "WebKitUsesPageCachePreferenceKey"))
+        ewk_view_setting_page_cache_set(browser->mainView(), toBool(value));
+    else if (equals(key, "WebKitHyperlinkAuditingEnabled"))
+        ewk_view_setting_enable_hyperlink_auditing_set(browser->mainView(), toBool(value));
+    else if (equals(key, "WebKitTabToLinksPreferenceKey"))
+        ewk_view_setting_include_links_in_focus_chain_set(browser->mainView(), toBool(value));
+    else
+        fprintf(stderr, "LayoutTestController::overridePreference tried to override unknown preference '%s'.\n", value->ustring().utf8().data());
+}
+
 void LayoutTestController::addUserScript(JSStringRef, bool, bool)
 {
     notImplemented();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to