git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68234
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void WebTestCase::Selection()
{
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(!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();
m_browser->DeleteSelection();