[Qt][WK2] Cleanup QML tests.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Nov 2011 17:16:26 +0000 (17:16 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Nov 2011 17:16:26 +0000 (17:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=72259

Reviewed by Simon Hausmann.

Cleanup QML tests. This patch removes the duplicates after the merge of both views.
I also isolated the desktop specific bits into its own directory.

* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_download.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationPolicyForUrl.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml: Removed.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadZeroSizeView.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:

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

19 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_download.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml with 100% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml with 100% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml with 100% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationPolicyForUrl.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml with 100% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml with 81% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml with 85% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml with 94% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadZeroSizeView.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml with 94% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml with 95% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml [moved from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml with 94% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro

index 22d228e..924218d 100644 (file)
@@ -1,3 +1,32 @@
+2011-11-14  Alexis Menard  <alexis.menard@openbossa.org>
+
+        [Qt][WK2] Cleanup QML tests.
+        https://bugs.webkit.org/show_bug.cgi?id=72259
+
+        Reviewed by Simon Hausmann.
+
+        Cleanup QML tests. This patch removes the duplicates after the merge of both views.
+        I also isolated the desktop specific bits into its own directory.
+
+        * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_download.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml.
+        * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml.
+        * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml.
+        * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationPolicyForUrl.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml.
+        * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml: Removed.
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml.
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml.
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml.
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_loadZeroSizeView.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml.
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml.
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml.
+        * UIProcess/API/qt/tests/qmltests/qmltests.pro:
+
 2011-11-14  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Add support for the caretBrowsingEnabled preference in WebKit2
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml
deleted file mode 100644 (file)
index 56222cb..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-import QtWebKitTest 1.0
-
-DesktopWebView {
-    id: webView
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadSucceeded"
-    }
-
-    SignalSpy {
-        id: spyProgress
-        target: webView
-        signalName: "loadProgressChanged"
-    }
-
-    TestCase {
-        name: "DesktopWebViewLoadProgressSignal"
-
-        function test_loadProgressSignal() {
-            compare(spyProgress.count, 0)
-            compare(webView.loadProgress, 0)
-            webView.load(Qt.resolvedUrl("../common/test1.html"))
-            spyProgress.wait()
-            compare(true, webView.loadProgress > -1 && webView.loadProgress < 101)
-            if (webView.loadProgress > 0 && webView.loadProgress < 100) {
-                spy.wait()
-                spyProgress.wait()
-                compare(webView.loadProgress, 100)
-            }
-        }
-    }
-}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml
deleted file mode 100644 (file)
index 536627b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-import QtWebKitTest 1.0
-
-DesktopWebView {
-    id: webView
-    height: 0
-    width: 0
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadSucceeded"
-    }
-
-    TestCase {
-        name: "DesktopWebViewLoad"
-
-        function test_loadZeroSizeView() {
-            compare(spy.count, 0)
-            webView.load(Qt.resolvedUrl("../common/test1.html"))
-            spy.wait()
-            compare(webView.title, "Test page 1")
-            compare(webView.width, 0)
-            compare(webView.height, 0)
-        }
-    }
-}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml
deleted file mode 100644 (file)
index 5da8241..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-import QtWebKitTest 1.0
-
-DesktopWebView {
-    id: webView
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadSucceeded"
-    }
-
-    TestCase {
-        name: "DesktopWebViewProperties"
-
-        function test_title() {
-            compare(spy.count, 0)
-            webView.load(Qt.resolvedUrl("../common/test1.html"))
-            spy.wait()
-            compare(webView.title, "Test page 1")
-        }
-
-        function test_url() {
-            compare(spy.count, 1)
-            var testUrl = Qt.resolvedUrl("../common/test1.html")
-            webView.load(testUrl)
-            spy.wait()
-            compare(webView.url, testUrl)
-        }
-    }
-}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml
deleted file mode 100644 (file)
index 123f435..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-
-WebView {
-    id: webView
-    height: 600
-    width: 400
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadSucceeded"
-    }
-
-    TestCase {
-        name: "TouchWebViewLoad"
-
-        function test_load() {
-            compare(spy.count, 0)
-            webView.load(Qt.resolvedUrl("../common/test1.html"))
-            spy.wait()
-            compare(webView.title, "Test page 1")
-            compare(webView.width, 400)
-            compare(webView.height, 600)
-        }
-    }
-}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml
deleted file mode 100644 (file)
index 7539ebf..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-
-WebView {
-    id: webView
-
-    property variant testUrl
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadFailed"
-    }
-
-    TestCase {
-        id: test
-        name: "TouchWebViewLoadFail"
-
-        function test_fail() {
-            skip("Fails due to https://bugreports.qt.nokia.com/browse/QTBUG-21537")
-            compare(spy.count, 0)
-            testUrl = Qt.resolvedUrl("file_that_does_not_exist.html")
-            webView.load(testUrl)
-            spy.wait()
-            compare(spy.count, 1)
-        }
-    }
-    Connections {
-        target: webView
-        onLoadFailed: {
-            test.compare(url, testUrl)
-            test.compare(errorCode, NetworkReply.ContentNotFoundError)
-            test.compare(errorType, TouchWebView.NetworkError)
-        }
-    }
-}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml
deleted file mode 100644 (file)
index 0959012..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-
-WebView {
-    id: webView
-    height: -600
-    width: -400
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadSucceeded"
-    }
-
-    TestCase {
-        name: "TouchWebViewLoad"
-
-        function test_loadNegativeSizeView() {
-            compare(spy.count, 0)
-            webView.load(Qt.resolvedUrl("../common/test1.html"))
-            spy.wait()
-            compare(webView.title, "Test page 1")
-            compare(webView.width, -400)
-            compare(webView.height, -600)
-        }
-    }
-}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml
deleted file mode 100644 (file)
index d7901df..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import QtWebKit 3.0
-
-WebView {
-    id: webView
-
-    SignalSpy {
-        id: spy
-        target: webView
-        signalName: "loadSucceeded"
-    }
-
-    TestCase {
-        name: "TouchWebViewLoadProgress"
-
-        function test_loadProgress() {
-            compare(spy.count, 0)
-            var testUrl = Qt.resolvedUrl("../common/test1.html")
-            webView.load(testUrl)
-            compare(webView.loadProgress, 0)
-            spy.wait()
-            compare(webView.loadProgress, 100)
-        }
-    }
-}
@@ -1,9 +1,8 @@
 import QtQuick 2.0
 import QtTest 1.0
 import QtWebKit 3.0
-import QtWebKitTest 1.0
 
-DesktopWebView {
+WebView {
     id: webView
 
     property variant testUrl
@@ -16,7 +15,7 @@ DesktopWebView {
 
     TestCase {
         id: test
-        name: "DesktopWebViewLoadFail"
+        name: "WebViewLoadFail"
         function test_fail() {
             compare(spy.count, 0)
             testUrl = Qt.resolvedUrl("file_that_does_not_exist.html")
@@ -29,6 +28,6 @@ DesktopWebView {
     onLoadFailed: {
         test.compare(url, testUrl)
         test.compare(errorCode, NetworkReply.ContentNotFoundError)
-        test.compare(errorType, DesktopWebView.NetworkError)
+        test.compare(errorType, WebView.NetworkError)
     }
 }
@@ -1,9 +1,8 @@
 import QtQuick 2.0
 import QtTest 1.0
 import QtWebKit 3.0
-import QtWebKitTest 1.0
 
-DesktopWebView {
+WebView {
     id: webView
 
     SignalSpy {
@@ -13,7 +12,7 @@ DesktopWebView {
     }
 
     TestCase {
-        name: "DesktopWebViewLoadProgress"
+        name: "WebViewLoadProgress"
 
         function test_loadProgress() {
             compare(spy.count, 0)
@@ -18,7 +18,7 @@ WebView {
     }
 
     TestCase {
-        name: "TouchWebViewLoadProgressSignal"
+        name: "WebViewLoadProgressSignal"
 
         function test_loadProgressSignal() {
             compare(spyProgress.count, 0)
@@ -1,9 +1,8 @@
 import QtQuick 2.0
 import QtTest 1.0
 import QtWebKit 3.0
-import QtWebKitTest 1.0
 
-DesktopWebView {
+WebView {
     id: webView
 
     preferences {
@@ -19,7 +18,7 @@ DesktopWebView {
     }
 
     TestCase {
-        name: "DesktopWebViewPreferences"
+        name: "WebViewPreferences"
 
         function init() {
             webView.preferences.javascriptEnabled = true
@@ -12,7 +12,7 @@ WebView {
     }
 
     TestCase {
-        name: "TouchWebViewProperties"
+        name: "WebViewProperties"
 
         function test_title() {
             compare(spy.count, 0)
@@ -28,6 +28,5 @@ WebView {
             spy.wait()
             compare(webView.url, testUrl)
         }
-
     }
 }
index b6647b0..269da74 100644 (file)
@@ -14,19 +14,14 @@ load(webkit2)
 DEFINES += QUICK_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
 
 OTHER_FILES += \
-    DesktopWebView/tst_properties.qml \
-    DesktopWebView/tst_navigationPolicyForUrl.qml \
-    DesktopWebView/tst_loadZeroSizeView.qml \
-    DesktopWebView/tst_loadProgress.qml \
-    DesktopWebView/tst_loadProgressSignal.qml \
-    DesktopWebView/tst_linkHovered.qml \
-    DesktopWebView/tst_messaging.qml \
-    DesktopWebView/tst_download.qml \
-    TouchWebView/tst_properties.qml \
-    TouchWebView/tst_load.qml \
-    TouchWebView/tst_loadZeroSizeView.qml \
-    TouchWebView/tst_loadNegativeSizeView.qml \
-    TouchWebView/tst_loadProgress.qml \
-    TouchWebView/tst_loadProgressSignal.qml
-
-
+    WebView/tst_properties.qml \
+    WebView/tst_loadZeroSizeView.qml \
+    WebView/tst_loadFail.qml \
+    WebView/tst_loadProgress.qml \
+    WebView/tst_loadProgressSignal.qml \
+    WebView/tst_loadZeroSizeView.qml \
+    WebView/tst_preferences.qml \
+    DesktopBehavior/tst_linkHovered.qml \
+    DesktopBehavior/tst_messaging.qml \
+    DesktopBehavior/tst_download.qml \
+    DesktopBehavior/tst_navigationPolicyForUrl.qml