VirtualBox

Changeset 47746 in vbox


Ignore:
Timestamp:
Aug 15, 2013 7:44:17 AM (11 years ago)
Author:
vboxsync
Message:

Main/MouseImpl: use real CFGM in test case instead of faking APIs.

Location:
trunk/src/VBox/Main/testcase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/Makefile.kmk

    r47277 r47746  
    226226        $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
    227227        $(dir $(VBOX_XML_SCHEMADEFS_H))
    228 tstMouseImpl_LIBS      = $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB)
     228tstMouseImpl_LIBS      = \
     229        $(PATH_STAGE_LIB)/VBoxAPIWrap$(VBOX_SUFF_LIB) \
     230        $(LIB_VMM)
    229231# Super ugly hack to make the code work well enough without having ATL/COM
    230232# completely initialized, without it there are crashes caused by ComObjPtr
  • trunk/src/VBox/Main/testcase/tstMouseImpl.cpp

    r47428 r47746  
    253253}
    254254
    255 DECLEXPORT(bool) CFGMR3AreValuesValid(PCFGMNODE, const char *)
    256 {
    257     return true;
    258 }
    259 
    260 DECLEXPORT(int) CFGMR3QueryPtr(PCFGMNODE, const char *, void **pv)
    261 {
    262     *pv = pMouse;
    263     return VINF_SUCCESS;
    264 }
    265 
    266255/******************************************************************************
    267256*   Main test code                                                            *
     
    270259static int setup(void)
    271260{
     261    PCFGMNODE pCfg = NULL;
     262    Mouse *pMouse2;
     263    int rc;
    272264    VMMDevPort.pfnSetAbsoluteMouse = setAbsoluteMouse;
    273265    VMMDevPort.pfnUpdateMouseCapabilities = updateMouseCapabilities;
     
    281273                                                  + Mouse::DrvReg.cbInstance);
    282274    *ppdmdrvIns = pdmdrvInsCore;
    283     Mouse::DrvReg.pfnConstruct(ppdmdrvIns, NULL, 0);
    284     return VINF_SUCCESS;
     275    pMouse2 = pMouse;
     276    pCfg = CFGMR3CreateTree(NULL);
     277    if (pCfg)
     278        rc = CFGMR3InsertInteger(pCfg, "Object", (uintptr_t)pMouse2);
     279    if (RT_SUCCESS(rc))
     280        Mouse::DrvReg.pfnConstruct(ppdmdrvIns, pCfg, 0);
     281    return rc;
    285282}
    286283
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