Skip to content
  • Stefano Crocco's avatar
    Add test to check that cookies are imported from KCookieServer at creation · 4ff9f87b
    Stefano Crocco authored
    Summary:
    In theory it should be possible to test this by connecting to
    QWebEngineCookieStore::cookieAdded signal. However, in tests this signal
    is not emitted (or, at least, it's emitted after the test has run). To
    work around this issue, if the BUILD_TESTING cmake variable is true, a new
    instance variable is created for WebEnginePartCookieJar and cookies added on
    creation are stored there. The contents of this variable are then checked by
    tests.
    
    Currently, the tests fail because there's a small difference (of the
    order of milliseconds, it seems) on the expiration dates. These tests
    are currently marked as expected failures
    
    Test Plan: run autotests
    
    Reviewers: dfaure
    
    Reviewed By: dfaure
    
    Differential Revision: https://phabricator.kde.org/D16407
    4ff9f87b