Changeset 99235 in webkit
- Timestamp:
- Nov 3, 2011 1:37:20 PM (12 years ago)
- Location:
- trunk/Source/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/qt/ChangeLog
r99202 r99235 1 2011-11-03 Rafael Brandao <rafael.lobo@openbossa.org> 2 3 Fix tst_QDeclarativeWebView::basicProperties() and historyNav() autotests 4 https://bugs.webkit.org/show_bug.cgi?id=61042 5 6 Reviewed by Simon Hausmann. 7 8 At some points we didn't have any guarantee that a favicon has been loaded, so now 9 it stops to wait for the IconChanged signal. It also had some file paths in wrong format, 10 making some files to not be resolved and comparing meaningless bitmaps. 11 12 * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp: 13 (tst_QDeclarativeWebView::initTestCase): 14 (tst_QDeclarativeWebView::basicProperties): 15 (tst_QDeclarativeWebView::historyNav): 16 1 17 2011-11-03 Simon Hausmann <simon.hausmann@nokia.com> 2 18 -
trunk/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp
r95901 r99235 27 27 28 28 private slots: 29 void initTestCase(); 29 30 void cleanupTestCase(); 30 31 … … 89 90 } 90 91 92 void tst_QDeclarativeWebView::initTestCase() 93 { 94 QWebSettings::setIconDatabasePath(tmpDir()); 95 QWebSettings::enablePersistentStorage(tmpDir()); 96 } 97 91 98 void tst_QDeclarativeWebView::cleanupTestCase() 92 99 { … … 103 110 QObject* wv = component.create(); 104 111 QVERIFY(wv); 112 waitForSignal(wv, SIGNAL(iconChanged())); 105 113 QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); 106 114 QCOMPARE(wv->property("title").toString(), QLatin1String("Basic")); 107 115 QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48); 108 QEXPECT_FAIL("", "'icon' property isn't working", Continue); 109 QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap("qrc:///resources/basic.png")); 116 QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap(":/resources/basic.png")); 110 117 QCOMPARE(wv->property("statusText").toString(), QLatin1String("status here")); 111 118 QCOMPARE(strippedHtml(fileContents(":/resources/basic.html")), strippedHtml(wv->property("html").toString())); … … 169 176 QObject* wv = component.create(); 170 177 QVERIFY(wv); 178 waitForSignal(wv, SIGNAL(iconChanged())); 171 179 172 180 QAction* reloadAction = wv->property("reload").value<QAction*>(); … … 183 191 QCOMPARE(wv->property("title").toString(), QLatin1String("Basic")); 184 192 QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48); 185 QEXPECT_FAIL("", "'icon' property isn't working", Continue); 186 QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap("qrc:///data/basic.png")); 193 QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap(":/resources/basic.png")); 187 194 QCOMPARE(wv->property("statusText").toString(), QLatin1String("status here")); 188 195 QCOMPARE(strippedHtml(fileContents(":/resources/basic.html")), strippedHtml(wv->property("html").toString())); … … 196 203 QVERIFY(!stopAction->isEnabled()); 197 204 reloadAction->trigger(); 205 waitForSignal(wv, SIGNAL(iconChanged())); 198 206 } 199 207 200 208 wv->setProperty("url", QUrl("qrc:///resources/forward.html")); 209 waitForSignal(wv, SIGNAL(iconChanged())); 201 210 QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); 202 211 QCOMPARE(wv->property("title").toString(), QLatin1String("Forward")); 203 212 QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 32); 204 QEXPECT_FAIL("", "'icon' property isn't working", Continue); 205 QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap("qrc:///resources/forward.png")); 213 QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap(":/resources/forward.png")); 206 214 QCOMPARE(strippedHtml(fileContents(":/resources/forward.html")), strippedHtml(wv->property("html").toString())); 207 215 QCOMPARE(wv->property("url").toUrl(), QUrl("qrc:///resources/forward.html")); … … 217 225 218 226 backAction->trigger(); 227 waitForSignal(wv, SIGNAL(loadFinished())); 219 228 220 229 QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
Note: See TracChangeset
for help on using the changeset viewer.