Changeset 84171 in webkit
- Timestamp:
- Apr 18, 2011 12:49:26 PM (13 years ago)
- Location:
- trunk/Source/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/qt/ChangeLog
r84168 r84171 1 2011-04-18 Yi Shen <yi.4.shen@nokia.com> 2 3 Reviewed by Laszlo Gombos. 4 5 [Qt] Fix Api tests for QWebPage on Symbian 6 https://bugs.webkit.org/show_bug.cgi?id=56924 7 8 Ignores the style attribute that selectedHtml() returns. 9 10 * tests/qwebpage/tst_qwebpage.cpp: 11 (tst_QWebPage::cursorMovements): 12 (tst_QWebPage::textSelection): 13 (tst_QWebPage::findText): 14 1 15 2011-04-18 Andreas Kling <kling@webkit.org> 2 16 -
trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r83108 r84171 987 987 page->mainFrame()->evaluateJavaScript(script); 988 988 QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox")); 989 QCOMPARE(page->selectedHtml().trimmed(), QString::fromLatin1("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \"><p id=\"one\">The quick brown fox</p></span>")); 989 990 QRegExp regExp(" style=\".*\""); 991 regExp.setMinimal(true); 992 QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<span class=\"Apple-style-span\"><p id=\"one\">The quick brown fox</p></span>")); 990 993 991 994 // these actions must exist … … 1218 1221 page->mainFrame()->evaluateJavaScript(selectScript); 1219 1222 QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox")); 1220 QCOMPARE(page->selectedHtml().trimmed(), QString::fromLatin1("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \"><p id=\"one\">The quick brown fox</p></span>")); 1223 QRegExp regExp(" style=\".*\""); 1224 regExp.setMinimal(true); 1225 QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<span class=\"Apple-style-span\"><p id=\"one\">The quick brown fox</p></span>")); 1221 1226 1222 1227 // Make sure hasSelection returns true, since there is selected text now... … … 2672 2677 QVERIFY(m_page->selectedHtml().isEmpty()); 2673 2678 QStringList words = (QStringList() << "foo" << "bar"); 2679 QRegExp regExp(" style=\".*\""); 2680 regExp.setMinimal(true); 2674 2681 foreach (QString subString, words) { 2675 2682 m_page->findText(subString, QWebPage::FindWrapsAroundDocument); 2676 2683 QCOMPARE(m_page->selectedText(), subString); 2677 QCOMPARE(m_page->selectedHtml() , QString("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium;\">%1</span>").arg(subString));2684 QCOMPARE(m_page->selectedHtml().trimmed().replace(regExp, ""), QString("<span class=\"Apple-style-span\">%1</span>").arg(subString)); 2678 2685 m_page->findText(""); 2679 2686 QVERIFY(m_page->selectedText().isEmpty());
Note: See TracChangeset
for help on using the changeset viewer.