B2G/gecko/layout/tools/reftest/reftest-content.js
// Return true if a snapshot was taken.
Return true if a snapshot was taken.
Return true if a snapshot was taken .
function SendInitCanvasWithSnapshot()
{
     NB: this is a test-harness optimization only, it must not
     affect the validity of the tests.
    if (gBrowserIsRemote) {
        SynchronizeForSnapshot(SYNC_DEFAULT);
    }
     For in-process browser, we have to make a synchronous request
     here to make the above optimization valid, so that MozWaitPaint
     events dispatched (synchronously) during painting are received
     before we check the paint-wait counter.  For out-of-process
     browser though, it doesn't wrt correctness whether this request
     is sync or async.
    var ret = sendSyncMessage("reftest:InitCanvasWithSnapshot")[0];
    gHaveCanvasSnapshot = ret.painted;
    return ret.painted;
}
function SendInitCanvasWithSnapshot ( ) { if ( gBrowserIsRemote ) { SynchronizeForSnapshot ( SYNC_DEFAULT ) ; } var ret = sendSyncMessage ( "reftest:InitCanvasWithSnapshot" ) [ 0 ] ; gHaveCanvasSnapshot = ret . painted ; return ret . painted ; }
Return true if a snapshot was taken.
Return true if a snapshot was taken .
// If we're in the same process as the top-level XUL window, then // drawing that window will also update our layers, so no // synchronization is needed. // // NB: this is a test-harness optimization only, it must not // affect the validity of the tests. // For in-process browser, we have to make a synchronous request // here to make the above optimization valid, so that MozWaitPaint // events dispatched (synchronously) during painting are received // before we check the paint-wait counter.  For out-of-process // browser though, it doesn't wrt correctness whether this request // is sync or async.