[Webkit-unassigned] [Bug 254814] New: [GTK] Remove TEST_RUNNER_TEST_PLUGIN_PATH

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 31 08:02:19 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=254814

            Bug ID: 254814
           Summary: [GTK] Remove TEST_RUNNER_TEST_PLUGIN_PATH
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aboya at igalia.com
                CC: bugs-noreply at webkitgtk.org

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230331/1b4f9f9f/attachment-0001.htm>


More information about the webkit-unassigned mailing list