WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
254814
[GTK] Remove TEST_RUNNER_TEST_PLUGIN_PATH
https://bugs.webkit.org/show_bug.cgi?id=254814
Summary
[GTK] Remove TEST_RUNNER_TEST_PLUGIN_PATH
Alicia Boya García
Reported
2023-03-31 08:02:19 PDT
TEST_RUNNER_TEST_PLUGIN_PATH seems to be just a leftover from NPAPI plugins. It's only read by the GTK WebKitTestRunner, which will fail if not provided that environment variable. void TestController::initializeTestPluginDirectory() { GUniquePtr<char> testPluginPath(getEnvironmentVariableAsUTF8String("TEST_RUNNER_TEST_PLUGIN_PATH")); m_testPluginDirectory.adopt(WKStringCreateWithUTF8CString(testPluginPath.get())); } Where is m_testPluginDirectory used? Tools/WebKitTestRunner/TestController.h 108: WKStringRef testPluginDirectory() const { return m_testPluginDirectory.get(); } 617: WKRetainPtr<WKStringRef> m_testPluginDirectory; Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp 108: m_testPluginDirectory.adopt(WKStringCreateWithUTF8CString(testPluginPath.get())); Tools/WebKitTestRunner/win/TestControllerWin.cpp 194: m_testPluginDirectory.adopt(WKStringCreateWithUTF8CString(bundleDirUTF8)); Tools/WebKitTestRunner/ios/TestControllerIOS.mm 180: m_testPluginDirectory.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath])); Tools/WebKitTestRunner/mac/TestControllerMac.mm 169: m_testPluginDirectory.adopt(WKStringCreateWithCFString((__bridge CFStringRef)[[NSBundle mainBundle] bundlePath])); Okay, there is a testPluginDirectory() getter. Who uses it? This is the only use: Tools/WebKitTestRunner/TestController.cpp WKRetainPtr<WKPageConfigurationRef> TestController::generatePageConfiguration(const TestOptions& options) 772: if (testPluginDirectory()) 773: WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory()); Finally, what does WKContextSetAdditionalPluginsDirectory() do? Source/WebKit/UIProcess/API/C/WKContext.cpp void WKContextSetAdditionalPluginsDirectory(WKContextRef contextRef, WKStringRef pluginsDirectory) { UNUSED_PARAM(contextRef); UNUSED_PARAM(pluginsDirectory); } Nothing. Seems to be left just to not cause API breakage.
Attachments
Add attachment
proposed patch, testcase, etc.
Alicia Boya García
Comment 1
2023-04-25 05:36:37 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/13144
EWS
Comment 2
2023-04-25 07:23:33 PDT
Committed
263369@main
(984732ae28a9): <
https://commits.webkit.org/263369@main
> Reviewed commits have been landed. Closing PR #13144 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug