Update selection unit test to test GetSelectedHTML.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0fe8a1b6ca
commit
a9c153392c
@ -185,13 +185,16 @@ void WebTestCase::Editable()
|
||||
|
||||
void WebTestCase::Selection()
|
||||
{
|
||||
m_browser->SetPage("<html><body>Some text</body></html>", "");
|
||||
m_browser->SetPage("<html><body>Some <strong>strong</strong> text</body></html>", "");
|
||||
CPPUNIT_ASSERT(!m_browser->HasSelection());
|
||||
|
||||
m_browser->SelectAll();
|
||||
|
||||
CPPUNIT_ASSERT(m_browser->HasSelection());
|
||||
CPPUNIT_ASSERT_EQUAL("Some text", m_browser->GetSelectedText());
|
||||
CPPUNIT_ASSERT_EQUAL("Some strong text", m_browser->GetSelectedText());
|
||||
//We lower case the result as ie returns tags in uppercase
|
||||
CPPUNIT_ASSERT_EQUAL("some <strong>strong</strong> text",
|
||||
m_browser->GetSelectedHTML().Lower());
|
||||
|
||||
m_browser->DeleteSelection();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user