diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-15 23:14:02 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-15 23:14:02 (GMT) |
commit | cffa023dab05c8add3cd7cd71220975086eacbda (patch) | |
tree | 69fd3171654202535ff0ab4d55b2ce72bb274961 /tests | |
parent | cebb18bbffeb16a951dbe16dde2811284f359840 (diff) | |
download | Qt-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.qml | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp | 3 |
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() |