Title: [117812] trunk/Source/WebKit2
Revision
117812
Author
[email protected]
Date
2012-05-21 13:48:22 -0700 (Mon, 21 May 2012)

Log Message

[Qt][WK2] REGRESSION, fix a failing API test in qmltests
https://bugs.webkit.org/show_bug.cgi?id=82700

Patch by Marcelo Lira <[email protected]> on 2012-05-21
Reviewed by Alexis Menard.

The value of a CSS font-family property is expected to have single
quotes when white space is present in its name, and no quotes otherwise.
Font family names returned by WebView.experimental.preferences never add quotes.

Since what matter to the test is only the identity of the font, an auxiliar
method to remove single quotes was added.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (117811 => 117812)


--- trunk/Source/WebKit2/ChangeLog	2012-05-21 20:34:21 UTC (rev 117811)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-21 20:48:22 UTC (rev 117812)
@@ -1,3 +1,19 @@
+2012-05-21  Marcelo Lira  <[email protected]>
+
+        [Qt][WK2] REGRESSION, fix a failing API test in qmltests
+        https://bugs.webkit.org/show_bug.cgi?id=82700
+
+        Reviewed by Alexis Menard.
+
+        The value of a CSS font-family property is expected to have single
+        quotes when white space is present in its name, and no quotes otherwise.
+        Font family names returned by WebView.experimental.preferences never add quotes.
+
+        Since what matter to the test is only the identity of the font, an auxiliar
+        method to remove single quotes was added.
+
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
+
 2012-05-21  Allan Sandfeld Jensen  <[email protected]>
 
         GCC 4.7 and C++11

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml (117811 => 117812)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml	2012-05-21 20:34:21 UTC (rev 117811)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml	2012-05-21 20:48:22 UTC (rev 117812)
@@ -195,6 +195,10 @@
                 compare(webView2.title, "New Title")
             }
 
+            function unquote(text) {
+                return text[0] === "'" ? text.slice(1, -1) : text
+            }
+
             function test_standardFontFamilyChanged() {
                 var url = ""
                 webView.url = ""
@@ -203,7 +207,7 @@
                 titleSpy.clear()
 
                 titleSpy.wait()
-                compare(webView.title, defaultStandardFontFamily)
+                compare(unquote(webView.title), defaultStandardFontFamily)
 
                 webView.experimental.preferences.standardFontFamily = "foobar"
                 standardFontFamilySpy.wait()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to