VirtualBox

Changeset 82900 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 29, 2020 9:34:10 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/x11: Fixed testcases, added documentation. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r82507 r82900  
    44
    55/*
    6  * Copyright (C) 2006-2019 Oracle Corporation
     6 * Copyright (C) 2006-2020 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    23232323 *
    23242324 * @returns VBox status code.
    2325  * @param  pCtx                 Context data for the clipboard backend.
    2326  * @param  Format               The format that the VBox would like to receive the data in.
    2327  * @param  pReq                 Read callback request to use. Must be free'd in the callback.
     2325 * @retval  VERR_NO_DATA if format is supported but no data is available currently.
     2326 * @retval  VERR_NOT_IMPLEMENTED if the format is not implemented.
     2327 * @param   pCtx                Context data for the clipboard backend.
     2328 * @param   Format              The format that the VBox would like to receive the data in.
     2329 * @param   pReq                Read callback request to use. Must be free'd in the callback.
    23282330 *
    23292331 * @note   We allocate a request structure which must be freed by the worker.
     
    29122914        char *pc;
    29132915        CLIPREADCBREQ *pReq = (CLIPREADCBREQ *)&pReq, *pReqRet = NULL;
    2914         ShClX11ReadDataFromX11(pCtx, 100, pReq);  /* Bad format. */
     2916        ShClX11ReadDataFromX11(pCtx, 0xF000 /* vboxFormat */, pReq);  /* Bad format. */
    29152917        int rc = VINF_SUCCESS;
    29162918        uint32_t cbActual = 0;
     
    30413043    /*** request for an invalid VBox format from X11 ***/
    30423044    RTTestSub(hTest, "a request for an invalid VBox format from X11");
    3043     ShClX11ReadDataFromX11(&X11Ctx, 0xffff, pReq);
     3045    /* Testing for 0xffff will go into handling VBOX_SHCL_FMT_UNICODETEXT, where we don't have
     3046     * have any data at the moment so far, so this will return VERR_NO_DATA. */
     3047    ShClX11ReadDataFromX11(&X11Ctx, 0xffff /* vboxFormat */, pReq);
    30443048    tstClipGetCompletedRequest(&rc, &pc, &cbActual, &pReqRet);
    3045     RTTEST_CHECK_MSG(hTest, rc == VERR_NOT_IMPLEMENTED,
    3046                      (hTest, "Returned %Rrc instead of VERR_NOT_IMPLEMENTED\n",
     3049    RTTEST_CHECK_MSG(hTest, rc == VERR_NO_DATA,
     3050                     (hTest, "Returned %Rrc instead of VERR_NO_DATA\n",
    30473051                      rc));
    30483052    RTTEST_CHECK_MSG(hTest, pReqRet == pReq,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette