[Qt] Fix API test failure after r92823 and r93001.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Sep 2011 22:15:38 +0000 (22:15 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Sep 2011 22:15:38 +0000 (22:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=67676

Reviewed by Kenneth Rohde Christiansen.

r92823 and r93001 make WebKit no longer produce wrapping style
spans on copy and paste and class="Apple-style-span" anymore.
Our expectations need to be updated.

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::cursorMovements):
(tst_QWebPage::textSelection):
(tst_QWebPage::findText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94601 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/qt/ChangeLog
Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

index 4564580..5169744 100644 (file)
@@ -1,3 +1,19 @@
+2011-09-06  Alexis Menard  <alexis.menard@openbossa.org>
+
+        [Qt] Fix API test failure after r92823 and r93001.
+        https://bugs.webkit.org/show_bug.cgi?id=67676
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        r92823 and r93001 make WebKit no longer produce wrapping style 
+        spans on copy and paste and class="Apple-style-span" anymore.
+        Our expectations need to be updated.
+
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::cursorMovements):
+        (tst_QWebPage::textSelection):
+        (tst_QWebPage::findText):
+
 2011-09-06  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
 
         [Qt][Symbian] REGRESSION[94105] DumpRenderTree.exe doesn't build on Symbian
index 68bb59b..b1d855f 100644 (file)
@@ -1037,7 +1037,7 @@ void tst_QWebPage::cursorMovements()
 
     QRegExp regExp(" style=\".*\"");
     regExp.setMinimal(true);
-    QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<span class=\"Apple-style-span\"><p id=\"one\">The quick brown fox</p></span>"));
+    QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<p id=\"one\">The quick brown fox</p>"));
 
     // these actions must exist
     QVERIFY(page->action(QWebPage::MoveToNextChar) != 0);
@@ -1270,7 +1270,7 @@ void tst_QWebPage::textSelection()
     QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
     QRegExp regExp(" style=\".*\"");
     regExp.setMinimal(true);
-    QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<span class=\"Apple-style-span\"><p id=\"one\">The quick brown fox</p></span>"));
+    QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<p id=\"one\">The quick brown fox</p>"));
 
     // Make sure hasSelection returns true, since there is selected text now...
     QCOMPARE(page->hasSelection(), true);
@@ -2880,7 +2880,7 @@ void tst_QWebPage::findText()
     foreach (QString subString, words) {
         m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
         QCOMPARE(m_page->selectedText(), subString);
-        QCOMPARE(m_page->selectedHtml().trimmed().replace(regExp, ""), QString("<span class=\"Apple-style-span\">%1</span>").arg(subString));
+        QCOMPARE(m_page->selectedHtml().trimmed().replace(regExp, ""), QString("<span>%1</span>").arg(subString));
         m_page->findText("");
         QVERIFY(m_page->selectedText().isEmpty());
         QVERIFY(m_page->selectedHtml().isEmpty());