summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-15 23:14:02 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-15 23:14:02 (GMT)
commitcffa023dab05c8add3cd7cd71220975086eacbda (patch)
tree69fd3171654202535ff0ab4d55b2ce72bb274961 /tests
parentcebb18bbffeb16a951dbe16dde2811284f359840 (diff)
downloadQt-cffa023dab05c8add3cd7cd71220975086eacbda.zip
Qt-cffa023dab05c8add3cd7cd71220975086eacbda.tar.gz
Qt-cffa023dab05c8add3cd7cd71220975086eacbda.tar.bz2
Ensure new WebView windows are notified correctly. Improve test.
Change 282a46ab5edafa7b82e9c58658143cb979db2d85 prevents itemChange() notification. That seems wrong, but this change is a work-around.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml1
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml b/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml
index b8524af..0bc8263 100644
--- a/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml
+++ b/tests/auto/declarative/qmlgraphicswebview/data/newwindows.qml
@@ -17,6 +17,7 @@ Grid {
WebView {
id: webView
+ width: 150 // force predictable for test
newWindowComponent: webViewPage
newWindowParent: pages
url: "newwindows.html"
diff --git a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
index 6996a6c..d48f11d 100644
--- a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
+++ b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
@@ -304,6 +304,9 @@ void tst_qmlgraphicswebview::multipleWindows()
QmlGraphicsGrid *grid = qobject_cast<QmlGraphicsGrid*>(component.create());
QVERIFY(grid != 0);
QTRY_COMPARE(grid->children().count(), 2+5); // Component, Loader, 5 WebViews
+ QmlGraphicsItem* popup = qobject_cast<QmlGraphicsItem*>(grid->children().at(3)); // first popup after Component, Loaded, original.
+ QVERIFY(popup != 0);
+ QTRY_COMPARE(popup->x(), 150.0);
}
void tst_qmlgraphicswebview::loadError()