[Gtk] Properly set forms tests-specific settings
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2012 07:57:34 +0000 (07:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2012 07:57:34 +0000 (07:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81237

Patch by Zan Dobersek <zandobersek@gmail.com> on 2012-03-16
Reviewed by Philippe Normand.

Source/WebKit/gtk:

Call Settings::setInteractiveFormValidationEnabled and
Settings::setValidationMessageTimerMagnification with
proper values when in testing mode.

* webkit/webkitwebview.cpp:
(webkit_web_view_init):

LayoutTests:

Unskip newly-passing tests.

* platform/gtk/Skipped:
* platform/gtk/fast/forms/validation-message-appearance-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/gtk/fast/forms/validation-message-appearance-expected.txt [new file with mode: 0644]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp

index 128b7d3ca3da31b6f5004651b4c3046b46b71f3c..223db81596781591aeacf79a13923f2d5ae093af 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-16  Zan Dobersek  <zandobersek@gmail.com>
+
+        [Gtk] Properly set forms tests-specific settings
+        https://bugs.webkit.org/show_bug.cgi?id=81237
+
+        Reviewed by Philippe Normand.
+
+        Unskip newly-passing tests.
+
+        * platform/gtk/Skipped:
+        * platform/gtk/fast/forms/validation-message-appearance-expected.txt: Added.
+
 2012-03-16  Hajime Morrita  <morrita@chromium.org>
 
         Unreviewed expectations update.
index 49e4d7bc1cb00cf719268063837b9dd80b7526e0..2803feafc669c8e3ad92cc8ecc5ae2e8d616b03c 100644 (file)
@@ -1015,23 +1015,6 @@ fast/files/workers/worker-apply-blob-url-to-xhr.html
 # https://bugs.webkit.org/show_bug.cgi?id=52094
 editing/pasteboard/files-during-page-drags.html
 
-# Need to call Settings::setInteractiveFormValidationEnabled(true).
-fast/forms/interactive-validation-prevented.html
-fast/forms/interactive-validation-attach-assertion.html
-fast/forms/interactive-validation-assertion-by-validate-twice.html
-fast/forms/interactive-validation-select-crash.html
-fast/forms/interactive-validation-crash-by-style-override.html
-# Need to call Settings::setValidationMessageTimerMagnification(-1) in DRT.
-fast/forms/validation-message-appearance.html
-fast/forms/validation-message-clone.html
-fast/forms/validation-message-in-relative-body.html
-fast/forms/validation-message-on-checkbox.html
-fast/forms/validation-message-on-listbox.html
-fast/forms/validation-message-on-menulist.html
-fast/forms/validation-message-on-radio.html
-fast/forms/validation-message-on-range.html
-fast/forms/validation-message-on-textarea.html
-
 # Tests that seem to be Mac only, assume that smart drag-and-drop
 # is enabled or assume platform-dependent sizing.
 http/tests/security/dataTransfer-set-data-file-url.html
diff --git a/LayoutTests/platform/gtk/fast/forms/validation-message-appearance-expected.txt b/LayoutTests/platform/gtk/fast/forms/validation-message-appearance-expected.txt
new file mode 100644 (file)
index 0000000..d69c7db
--- /dev/null
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x47
+  RenderBlock {HTML} at (0,0) size 800x47
+    RenderBody {BODY} at (8,8) size 784x31
+      RenderBlock {FORM} at (0,0) size 784x31
+        RenderTextControl {INPUT} at (2,3) size 193x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+          RenderBlock {DIV} at (3,3) size 187x18
+        RenderText {#text} at (197,6) size 4x17
+          text run at (197,6) width 4: " "
+        RenderButton {INPUT} at (203,2) size 66x27 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+          RenderBlock (anonymous) at (8,4) size 50x18
+            RenderText at (0,0) size 50x17
+              text run at (0,0) width 50: "Submit"
+        RenderText {#text} at (0,0) size 0x0
+layer at (10,35) size 220x108
+  RenderBlock (positioned) zI: 2147483647 {DIV} at (10,35) size 220x108
+layer at (10,35) size 220x16 scrollHeight 26
+  RenderBlock {DIV} at (0,0) size 220x16
+layer at (10,47) size 220x92
+  RenderDeprecatedFlexibleBox (relative positioned) zI: 2147483644 {DIV} at (0,16) size 220x92 [border: (2px solid #440000)]
+    RenderBlock {DIV} at (10,10) size 0x72
+    RenderBlock {DIV} at (10,10) size 200x72
+      RenderBlock {DIV} at (0,0) size 200x18
+        RenderText {#text} at (0,0) size 106x17
+          text run at (0,0) width 106: "value missing"
+      RenderBlock {DIV} at (0,18) size 200x54
+        RenderText {#text} at (0,0) size 169x17
+          text run at (0,0) width 169: "Needs at least 8 letters."
+        RenderBR {BR} at (168,0) size 1x17
+        RenderText {#text} at (0,18) size 195x35
+          text run at (0,18) width 195: "Should not be identical with"
+          text run at (0,36) width 154: "the current password."
+layer at (42,35) size 18x18 backgroundClip at (10,35) size 220x16 clip at (10,35) size 220x16 outlineClip at (10,35) size 220x16
+  RenderBlock (relative positioned) zI: 2147483645 {DIV} at (0,0) size 18x18 [bgcolor=#F8ECEC] [border: (2px solid #440000) none (2px solid #440000)]
+caret: position 0 of child 0 {DIV} of {#shadow-root} of child 1 {INPUT} of child 0 {FORM} of body
index 40ae039e28eed6e0f96f6efef08587efbe3fa93a..91183eb82db0e07f9f21bbbda55af4cbfa45fa78 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-16  Zan Dobersek  <zandobersek@gmail.com>
+
+        [Gtk] Properly set forms tests-specific settings
+        https://bugs.webkit.org/show_bug.cgi?id=81237
+
+        Reviewed by Philippe Normand.
+
+        Call Settings::setInteractiveFormValidationEnabled and
+        Settings::setValidationMessageTimerMagnification with
+        proper values when in testing mode.
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_init):
+
 2012-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Implement unicode submenu items
index d29935702fef643f8ef613ad7d31ec3d7d20b620..1459d3c1d81aea5ece639796504179cfdbe4227a 100644 (file)
@@ -3519,8 +3519,12 @@ static void webkit_web_view_init(WebKitWebView* webView)
     WebCore::provideDeviceOrientationTo(priv->corePage, new DeviceOrientationClientGtk);
 #endif
 
-    if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
+    if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled()) {
         static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(priv->corePage->geolocationController());
+        // Set some testing-specific settings
+        priv->corePage->settings()->setInteractiveFormValidationEnabled(true);
+        priv->corePage->settings()->setValidationMessageTimerMagnification(-1);
+    }
 
     // Pages within a same session need to be linked together otherwise some functionalities such
     // as visited link coloration (across pages) and changing popup window location will not work.