Title: [121370] trunk/Source/WebKit2
Revision
121370
Author
commit-qu...@webkit.org
Date
2012-06-27 14:18:53 -0700 (Wed, 27 Jun 2012)

Log Message

REGRESSION(r121135): It made qmltests::WebViewColorChooser::test_accept() fail
https://bugs.webkit.org/show_bug.cgi?id=89871

Patch by Thiago Marcos P. Santos <thiago.san...@intel.com> on 2012-06-27
Reviewed by Simon Hausmann.

Added proper event synchronization to the test case.

* UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (121369 => 121370)


--- trunk/Source/WebKit2/ChangeLog	2012-06-27 21:14:11 UTC (rev 121369)
+++ trunk/Source/WebKit2/ChangeLog	2012-06-27 21:18:53 UTC (rev 121370)
@@ -1,3 +1,14 @@
+2012-06-27  Thiago Marcos P. Santos  <thiago.san...@intel.com>
+
+        REGRESSION(r121135): It made qmltests::WebViewColorChooser::test_accept() fail
+        https://bugs.webkit.org/show_bug.cgi?id=89871
+
+        Reviewed by Simon Hausmann.
+
+        Added proper event synchronization to the test case.
+
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml:
+
 2012-06-27  Brady Eidson  <beid...@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=87513

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml (121369 => 121370)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml	2012-06-27 21:14:11 UTC (rev 121369)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml	2012-06-27 21:18:53 UTC (rev 121370)
@@ -46,14 +46,23 @@
             webView.url = ""
             verify(webView.waitForLoadSucceeded())
 
+            while (webView.title != "Feature enabled" && webView.title != "Feature disabled")
+                wait(0)
+
             webView.featureEnabled = (webView.title == "Feature enabled")
+            if (!webView.featureEnabled)
+                return
 
             titleSpy.clear()
 
-            webView.shouldReject = false;
-            webView.shouldAcceptCurrent = false;
+            webView.shouldReject = false
+            webView.shouldAcceptCurrent = false
         }
 
+        function cleanup() {
+            titleSpy.clear()
+        }
+
         function test_accept() {
             if (!webView.featureEnabled)
                 return
@@ -64,8 +73,8 @@
             // pick a new color with the chooser.
             webView.selectedColor = "#020020"
             openColorChooser()
-            titleSpy.wait()
-            compare(titleSpy.count, 2)
+            while (titleSpy.count != 2)
+                wait(0)
             compare(webView.title, "#020020")
         }
 

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/colorChooser.html (121369 => 121370)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/colorChooser.html	2012-06-27 21:14:11 UTC (rev 121369)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/colorChooser.html	2012-06-27 21:18:53 UTC (rev 121370)
@@ -1,13 +1,15 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>Feature disabled</title>
+<title>Title</title>
 <script>
 function detectInputTypeColorEnabled() {
     var element = document.getElementById('test')
     element.value = 'should sanitize';
     if (element.value != 'should sanitize')
         document.title = 'Feature enabled';
+    else
+        document.title = 'Feature disabled';
 }
 function updateTitle(element) {
     document.title = element.value;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to