function undoRedoTest_checkBlockVariableName(blockIndex, name) {
  var blockVarName = workspace.topBlocks_[blockIndex].getVarModels()[0].name;
  assertEquals(name, blockVarName);
}
Check that the top block with the given index contains a variable with
    the given name.
@param {number} blockIndex The index of the top block.
@param {string} name The expected name of the variable in the block.