sendResult = function(port, request, result) {
    port.postMessage({
      result: result,
      requestId: request.id
    });
  }
Sends the result back to E2E.
@param {MessagePort} port Port to send the response through.
@param {Object} request The request object we're sending the response to.
@param {Object} result Result of the request.