Skip to content

Commit d6d87d2

Browse files
authored
Merge pull request rdkcentral#5948 from asurdej-comcast/testing_main
Fix encrypted playback in TC subview and improve visibility handling
2 parents 49ce949 + 45c2e81 commit d6d87d2

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

WebKitBrowser/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
1515
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.
1616

1717
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
18+
19+
## [1.1.27] - 2024-12-18
20+
### Fixed
21+
- Testing: Fix encrypted playback in TC subview and improve visibility handling
22+
1823
## [1.1.26] - 2024-09-11
1924
### Added
2025
- Config entry to enable/disable WebRTC ICE candidate filtering

WebKitBrowser/Testing/testrunner.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class TestRunnerImpl : public Testing::TestRunner {
6060
void *userData);
6161
static void loadFailedCallback(WebKitWebView* webView, WebKitLoadEvent loadEvent,
6262
const gchar* failingURI, GError* error, void *userData);
63+
static bool decidePermissionCallback(WebKitWebView* webView,
64+
WebKitPermissionRequest* permissionRequest);
6365

6466
private:
6567
std::string m_extensionDir;
@@ -146,6 +148,7 @@ bool TestRunnerImpl::createSubView() {
146148
g_signal_connect(m_testCaseView, "user-message-received", G_CALLBACK(userMessageReceivedCallback), this);
147149
g_signal_connect(m_testCaseView, "web-process-terminated", G_CALLBACK(webProcessTerminatedCallback), this);
148150
g_signal_connect(m_testCaseView, "load-failed", G_CALLBACK(loadFailedCallback), this);
151+
g_signal_connect(m_testCaseView, "permission-request", G_CALLBACK(decidePermissionCallback), this);
149152
// TODO: need to handle those signals
150153
// g_signal_connect(m_testCaseView, "notify::is-web-process-responsive", G_CALLBACK(isWebProcessResponsiveCallback), this);
151154
return true;
@@ -155,9 +158,11 @@ void TestRunnerImpl::setParentVisibility(bool visible) {
155158
auto* backend = webkit_web_view_backend_get_wpe_backend(webkit_web_view_get_backend(m_parentView));
156159
assert(backend);
157160
if (visible) {
161+
// Setting the activity state to "visible" alone doesn’t bring the view back to the screen
158162
wpe_view_backend_add_activity_state(backend, wpe_view_activity_state_in_window);
163+
wpe_view_backend_add_activity_state(backend, wpe_view_activity_state_visible);
159164
} else {
160-
wpe_view_backend_remove_activity_state(backend, wpe_view_activity_state_in_window);
165+
wpe_view_backend_remove_activity_state(backend, wpe_view_activity_state_visible);
161166
}
162167
}
163168

@@ -261,6 +266,13 @@ void TestRunnerImpl::loadFailedCallback(WebKitWebView* webView, WebKitLoadEvent
261266
runner->sendTestCaseResponse(false, message.c_str());
262267
}
263268

269+
bool TestRunnerImpl::decidePermissionCallback(WebKitWebView* webView,
270+
WebKitPermissionRequest* permissionRequest)
271+
{
272+
webkit_permission_request_allow(permissionRequest);
273+
return true;
274+
}
275+
264276
} // namespace
265277

266278
namespace Testing {

0 commit comments

Comments
 (0)