mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-25 01:40:57 +00:00
tests: cover WebMediaController lifecycle with wxWebView stub
This commit is contained in:
@@ -4,13 +4,23 @@
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
WebMediaController::WebMediaController(wxWebView* webview) : m_webview(webview)
|
||||
namespace {
|
||||
|
||||
void initialize_webview(wxWebView* webview)
|
||||
{
|
||||
if (!m_webview)
|
||||
if (!webview)
|
||||
return;
|
||||
|
||||
m_webview->SetBackgroundColour(*wxBLACK);
|
||||
m_webview->SetPage("<html><head><style>html,body{margin:0;height:100%;background:#000;}</style></head><body></body></html>", "");
|
||||
webview->SetBackgroundColour(*wxBLACK);
|
||||
webview->SetPage("<html><head><style>html,body{margin:0;height:100%;background:#000;}</style></head><body></body></html>", "");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
WebMediaController::WebMediaController(wxWebView* webview)
|
||||
: m_webview(webview)
|
||||
{
|
||||
initialize_webview(m_webview);
|
||||
}
|
||||
|
||||
void WebMediaController::Load(wxURI url)
|
||||
|
||||
Reference in New Issue
Block a user