macOS: Document missing wxWebView features and don't test for them

This commit is contained in:
Tobias Taschner
2020-12-14 13:40:32 +01:00
parent b509b0d687
commit 10398b8f72
2 changed files with 10 additions and 4 deletions

View File

@@ -643,6 +643,8 @@ public:
Set the editable property of the web control. Enabling allows the user Set the editable property of the web control. Enabling allows the user
to edit the page even if the @c contenteditable attribute is not set. to edit the page even if the @c contenteditable attribute is not set.
The exact capabilities vary with the backend being used. The exact capabilities vary with the backend being used.
@note This is not implemented on macOS.
*/ */
virtual void SetEditable(bool enable = true) = 0; virtual void SetEditable(bool enable = true) = 0;
@@ -773,14 +775,14 @@ public:
/** /**
Clear the history, this will also remove the visible page. Clear the history, this will also remove the visible page.
@note This is not implemented on the WebKit2GTK+ backend. @note This is not implemented on the WebKit2GTK+ backend and macOS.
*/ */
virtual void ClearHistory() = 0; virtual void ClearHistory() = 0;
/** /**
Enable or disable the history. This will also clear the history. Enable or disable the history. This will also clear the history.
@note This is not implemented on the WebKit2GTK+ backend. @note This is not implemented on the WebKit2GTK+ backend and macOS.
*/ */
virtual void EnableHistory(bool enable = true) = 0; virtual void EnableHistory(bool enable = true) = 0;

View File

@@ -123,7 +123,7 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]")
CHECK(m_browser->CanGoForward()); CHECK(m_browser->CanGoForward());
} }
#if !wxUSE_WEBVIEW_WEBKIT2 #if !wxUSE_WEBVIEW_WEBKIT2 && !defined(__WXOSX__)
SECTION("HistoryEnable") SECTION("HistoryEnable")
{ {
LoadUrl(); LoadUrl();
@@ -139,7 +139,7 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]")
} }
#endif #endif
#if !wxUSE_WEBVIEW_WEBKIT2 #if !wxUSE_WEBVIEW_WEBKIT2 && !defined(__WXOSX__)
SECTION("HistoryClear") SECTION("HistoryClear")
{ {
LoadUrl(2); LoadUrl(2);
@@ -174,6 +174,7 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]")
CHECK(m_browser->GetBackwardHistory().size() == 2); CHECK(m_browser->GetBackwardHistory().size() == 2);
} }
#if !defined(__WXOSX__)
SECTION("Editable") SECTION("Editable")
{ {
CHECK(!m_browser->IsEditable()); CHECK(!m_browser->IsEditable());
@@ -186,6 +187,7 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]")
CHECK(!m_browser->IsEditable()); CHECK(!m_browser->IsEditable());
} }
#endif
SECTION("Selection") SECTION("Selection")
{ {
@@ -207,6 +209,7 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]")
CHECK(m_browser->HasSelection()); CHECK(m_browser->HasSelection());
CHECK(m_browser->GetSelectedText() == "Some strong text"); CHECK(m_browser->GetSelectedText() == "Some strong text");
#if !defined(__WXOSX__)
// The web engine doesn't necessarily represent the HTML in the same way as // The web engine doesn't necessarily represent the HTML in the same way as
// we used above, e.g. IE uses upper case for all the tags while WebKit // we used above, e.g. IE uses upper case for all the tags while WebKit
// under OS X inserts plenty of its own <span> tags, so don't test for // under OS X inserts plenty of its own <span> tags, so don't test for
@@ -218,6 +221,7 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]")
("Unexpected selection source: \"%s\"", selSource), ("Unexpected selection source: \"%s\"", selSource),
selSource.Lower().Matches("*some*<strong*strong</strong>*text*") selSource.Lower().Matches("*some*<strong*strong</strong>*text*")
); );
#endif // !defined(__WXOSX__)
m_browser->ClearSelection(); m_browser->ClearSelection();
CHECK(!m_browser->HasSelection()); CHECK(!m_browser->HasSelection());