summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-06 03:28:08 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-06 03:28:08 (GMT)
commit2e72795565ac73b95ada86a461735cbe8b7721ad (patch)
tree9056f9b2780e0900a724e4c52953144ff516e939
parent178ac95dcad8620003704dc12ff462df0df9c89e (diff)
downloadQt-2e72795565ac73b95ada86a461735cbe8b7721ad.zip
Qt-2e72795565ac73b95ada86a461735cbe8b7721ad.tar.gz
Qt-2e72795565ac73b95ada86a461735cbe8b7721ad.tar.bz2
better statusText test
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/data/basic.html5
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/declarative/qmlgraphicswebview/data/basic.html b/tests/auto/declarative/qmlgraphicswebview/data/basic.html
index c262f12..22e3e24 100644
--- a/tests/auto/declarative/qmlgraphicswebview/data/basic.html
+++ b/tests/auto/declarative/qmlgraphicswebview/data/basic.html
@@ -1,6 +1,11 @@
<html>
<head><title>Basic</title>
<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
</head>
<body leftmargin="0" marginwidth="0">
<table width="123">
diff --git a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
index e7e9204..6cf6741 100644
--- a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
+++ b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
@@ -131,7 +131,7 @@ void tst_qmlgraphicswebview::basicProperties()
QCOMPARE(wv->title(),QString("Basic"));
QTRY_COMPARE(wv->icon().width(), 48);
QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/basic.png"));
- QCOMPARE(wv->statusText(),QString(""));
+ QCOMPARE(wv->statusText(),QString("status here"));
QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html()));
QCOMPARE(wv->width(), 123.0);
QCOMPARE(wv->webPageWidth(), 0);
@@ -167,7 +167,7 @@ void tst_qmlgraphicswebview::historyNav()
QCOMPARE(wv->title(),QString("Basic"));
QTRY_COMPARE(wv->icon().width(), 48);
QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/basic.png"));
- QCOMPARE(wv->statusText(),QString(""));
+ QCOMPARE(wv->statusText(),QString("status here"));
QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html()));
QCOMPARE(wv->width(), 123.0);
QCOMPARE(wv->webPageWidth(), 0);
@@ -193,6 +193,7 @@ void tst_qmlgraphicswebview::historyNav()
QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/forward.html")), strippedHtml(wv->html()));
QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/forward.html"));
QCOMPARE(wv->status(), QmlGraphicsWebView::Ready);
+ QCOMPARE(wv->statusText(),QString(""));
QVERIFY(wv->reloadAction());
QVERIFY(wv->reloadAction()->isEnabled());
QVERIFY(wv->backAction());