]> git.saurik.com Git - wxWidgets.git/commitdiff
Update selection unit test to test GetSelectedHTML.
authorSteve Lamerton <steve.lamerton@gmail.com>
Tue, 12 Jul 2011 08:41:11 +0000 (08:41 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Tue, 12 Jul 2011 08:41:11 +0000 (08:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/controls/webtest.cpp

index d509c04a28116fb335abb6417038181b2a80f3cb..4f277475c07246fbaa3c7d24788cb7e6c343ffd9 100644 (file)
@@ -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();