From a9c153392c132b64cd200a84194095e0db049ea6 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Tue, 12 Jul 2011 08:41:11 +0000 Subject: [PATCH] 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 --- tests/controls/webtest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index d509c04a28..4f277475c0 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -185,13 +185,16 @@ void WebTestCase::Editable() void WebTestCase::Selection() { - m_browser->SetPage("Some text", ""); + m_browser->SetPage("Some strong text", ""); 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 text", + m_browser->GetSelectedHTML().Lower()); m_browser->DeleteSelection();