Code review comment for lp:~uriboni/webbrowser-app/new-tab-wide-format

Revision history for this message
Olivier Tilloy (osomon) wrote :

Regarding drag and drop in unit tests: I just did a quick test, modifying test_drag() to do the following:

    function log_item_pos() { console.log("item.pos =", item.x, item.y) }
    log_item_pos()
    item.xChanged.connect(log_item_pos)
    item.yChanged.connect(log_item_pos)
    var c = centerOf(grip)
    mouseDrag(grip, c.x, c.y, -200, 100)

When running it, even though I’m not visualizing the item move, logging proves that it’s actually moving:

    qml: item.pos = 0 56
    qml: item.pos = -11 78
    qml: item.pos = -11 78
    qml: item.pos = -22 133
    qml: item.pos = -22 133
    qml: item.pos = -233 222
    qml: item.pos = -233 222
    qml: item.pos = 0 222
    qml: item.pos = 0 56

« Back to merge proposal