summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
diff options
context:
space:
mode:
authorCary Clark <>2009-04-14 06:33:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-14 06:33:00 -0700
commit563af33bc48281d19dce701398dbb88cb54fd7ec (patch)
tree395b4502f029dea8b25b342d66dc06b5d8f99985 /WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
parent5cfedfef172691d0f4bcf2be5ca3cddd8c9a47f4 (diff)
downloadexternal_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.zip
external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.tar.gz
external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.tar.bz2
AI 146110: add missing files to webkit
brings it in sync with webkit svn cl 42046 Automated import of CL 146110
Diffstat (limited to 'WebKit/qt/tests/qwebpage/tst_qwebpage.cpp')
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 6f2ce3b..d85e880 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -879,6 +879,7 @@ void tst_QWebPage::textSelection()
QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
// these actions must exist
+ QVERIFY(page->action(QWebPage::SelectAll) != 0);
QVERIFY(page->action(QWebPage::SelectNextChar) != 0);
QVERIFY(page->action(QWebPage::SelectPreviousChar) != 0);
QVERIFY(page->action(QWebPage::SelectNextWord) != 0);
@@ -906,10 +907,14 @@ void tst_QWebPage::textSelection()
QCOMPARE(page->action(QWebPage::SelectStartOfDocument)->isEnabled(), false);
QCOMPARE(page->action(QWebPage::SelectEndOfDocument)->isEnabled(), false);
+ // ..but SelectAll is awalys enabled
+ QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
+
// make it editable before navigating the cursor
page->setContentEditable(true);
// here the actions are enabled after contentEditable is true
+ QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), true);
@@ -951,6 +956,8 @@ void tst_QWebPage::textEditing()
QVERIFY(page->action(QWebPage::ToggleBold) != 0);
QVERIFY(page->action(QWebPage::ToggleItalic) != 0);
QVERIFY(page->action(QWebPage::ToggleUnderline) != 0);
+ QVERIFY(page->action(QWebPage::InsertParagraphSeparator) != 0);
+ QVERIFY(page->action(QWebPage::InsertLineSeparator) != 0);
// right now they are disabled because contentEditable is false
QCOMPARE(page->action(QWebPage::DeleteStartOfWord)->isEnabled(), false);
@@ -961,6 +968,8 @@ void tst_QWebPage::textEditing()
QCOMPARE(page->action(QWebPage::ToggleBold)->isEnabled(), false);
QCOMPARE(page->action(QWebPage::ToggleItalic)->isEnabled(), false);
QCOMPARE(page->action(QWebPage::ToggleUnderline)->isEnabled(), false);
+ QCOMPARE(page->action(QWebPage::InsertParagraphSeparator)->isEnabled(), false);
+ QCOMPARE(page->action(QWebPage::InsertLineSeparator)->isEnabled(), false);
// make it editable before navigating the cursor
page->setContentEditable(true);
@@ -974,6 +983,8 @@ void tst_QWebPage::textEditing()
QCOMPARE(page->action(QWebPage::ToggleBold)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::ToggleItalic)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::ToggleUnderline)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::InsertParagraphSeparator)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::InsertLineSeparator)->isEnabled(), true);
delete page;
}