https://bugs.webkit.org/show_bug.cgi?id=68280
Patch by Gopal Raghavan <gopal.1.raghavan@nokia.com> on 2011-09-20
Reviewed by Andreas Kling.
Added test case to check load progress property and signal for QDesktopWebView
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95537
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-20 Gopal Raghavan <gopal.1.raghavan@nokia.com>
+
+ [Qt] QDesktopWebView missing loadProgress tests
+ https://bugs.webkit.org/show_bug.cgi?id=68280
+
+ Reviewed by Andreas Kling.
+
+ Added test case to check load progress property and signal for QDesktopWebView
+
+ * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml: Added.
+ * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Added.
+ * UIProcess/API/qt/tests/qmltests/qmltests.pro:
+
2011-09-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebProcess shouldn't use the GTK+ API
--- /dev/null
+import QtQuick 2.0
+import QtTest 1.0
+import QtWebKit.experimental 5.0
+
+DesktopWebView {
+ id: webView
+
+ SignalSpy {
+ id: spy
+ target: webView
+ signalName: "loadSucceeded"
+ }
+
+ TestCase {
+ name: "DesktopWebViewLoadProgress"
+
+ function test_loadProgress() {
+ compare(spy.count, 0)
+ compare(webView.loadProgress, 0)
+ webView.load(Qt.resolvedUrl("../common/test1.html"))
+ compare(webView.loadProgress, 0)
+ spy.wait()
+ compare(webView.loadProgress, 100)
+ }
+ }
+}
--- /dev/null
+import QtQuick 2.0
+import QtTest 1.0
+import QtWebKit.experimental 5.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)
+ }
+ }
+ }
+}
OTHER_FILES += \
DesktopWebView/tst_properties.qml \
DesktopWebView/tst_navigationPolicyForUrl.qml \
+ DesktopWebView/tst_loadProgress.qml \
+ DesktopWebView/tst_loadProgressSignal.qml \
TouchWebView/tst_properties.qml \
TouchWebView/tst_loadZeroSizeView.qml \
TouchWebView/tst_loadNegativeSizeView.qml \