Changeset 87818 in webkit
- Timestamp:
- Jun 1, 2011 9:58:35 AM (13 years ago)
- Location:
- trunk/Source/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/qt/ChangeLog
r87797 r87818 1 2011-06-01 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt]Fix tst_QWebFrame::setUrlToInvalid() autotest after r84762 6 https://bugs.webkit.org/show_bug.cgi?id=59345 7 8 KURL and QUrl disagree whether certain URLs are valid or not. The regression here 9 was caused by the fact that now KURL accepts "http:/example.com" (note only one 10 slash) and our test case used a strange edge case that's transformed into a 11 "one-slash" URL that now KURL can handle. 12 13 QtWebKit approach in this case is to do a best effort and accept the QUrl if KURL 14 can understand it. So I've updated the test to use a more meaningful example and 15 show that an invalid URL gets converted to a valid URL if possible. 16 17 * tests/qwebframe/tst_qwebframe.cpp: 18 (tst_QWebFrame::setUrlToInvalid): 19 1 20 2011-06-01 Andreas Kling <kling@webkit.org> 2 21 -
trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r87767 r87818 3457 3457 QWebFrame* frame = page.mainFrame(); 3458 3458 3459 const QUrl invalidUrl("http:/ /strange;hostname/here");3459 const QUrl invalidUrl("http:/example.com"); 3460 3460 QVERIFY(!invalidUrl.isEmpty()); 3461 3461 QVERIFY(!invalidUrl.isValid()); 3462 3462 QVERIFY(invalidUrl != QUrl()); 3463 3463 3464 // QWebFrame will do its best to accept the URL, possible converting it to a valid equivalent URL. 3465 const QUrl validUrl("http://example.com/"); 3464 3466 frame->setUrl(invalidUrl); 3465 QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=59345", Continue); 3466 QCOMPARE(frame->url(), invalidUrl); 3467 QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=59345", Continue); 3468 QCOMPARE(frame->requestedUrl(), invalidUrl); 3469 QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=59345", Continue); 3470 QCOMPARE(frame->baseUrl(), invalidUrl); 3467 QCOMPARE(frame->url(), validUrl); 3468 QCOMPARE(frame->requestedUrl(), validUrl); 3469 QCOMPARE(frame->baseUrl(), validUrl); 3471 3470 3472 3471 // QUrls equivalent to QUrl() will be treated as such.
Note: See TracChangeset
for help on using the changeset viewer.